diff --git a/services/modelserving/api_default.go b/services/modelserving/api_default.go index 7912b20d3..960ffc7ab 100644 --- a/services/modelserving/api_default.go +++ b/services/modelserving/api_default.go @@ -256,6 +256,9 @@ type ApiListModelsRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListTokensRequest interface { + // Filter token resource by labels + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + LabelSelector(labelSelector string) ApiListTokensRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListTokenResp, error) } @@ -1287,10 +1290,18 @@ func (a *APIClient) ListModelsExecute(ctx context.Context, regionId string) (*Li // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListTokensRequest struct { - ctx context.Context - apiService *DefaultApiService - regionId string - projectId string + ctx context.Context + apiService *DefaultApiService + regionId string + projectId string + labelSelector *string +} + +// Filter token resource by labels +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListTokensRequest) LabelSelector(labelSelector string) ApiListTokensRequest { + r.labelSelector = &labelSelector + return r } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -1319,6 +1330,9 @@ func (r ListTokensRequest) Execute() (*ListTokenResp, error) { localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.labelSelector != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/services/modelserving/model_create_token_payload.go b/services/modelserving/model_create_token_payload.go index 26f1b015b..ab74d00ac 100644 --- a/services/modelserving/model_create_token_payload.go +++ b/services/modelserving/model_create_token_payload.go @@ -45,6 +45,33 @@ type CreateTokenPayloadGetDescriptionArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateTokenPayloadGetDescriptionRetType = string +/* + types and functions for labels +*/ + +// isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateTokenPayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateTokenPayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateTokenPayloadGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateTokenPayloadGetLabelsAttributeTypeOk(arg CreateTokenPayloadGetLabelsAttributeType) (ret CreateTokenPayloadGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateTokenPayloadGetLabelsAttributeType(arg *CreateTokenPayloadGetLabelsAttributeType, val CreateTokenPayloadGetLabelsRetType) { + *arg = &val +} + /* types and functions for name */ @@ -103,6 +130,8 @@ type CreateTokenPayloadGetTtlDurationRetType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateTokenPayload struct { Description CreateTokenPayloadGetDescriptionAttributeType `json:"description,omitempty"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys. + Labels CreateTokenPayloadGetLabelsAttributeType `json:"labels,omitempty"` // REQUIRED Name CreateTokenPayloadGetNameAttributeType `json:"name" required:"true"` // time to live duration. Must be valid duration string. If not set the token will never expire. @@ -159,6 +188,33 @@ func (o *CreateTokenPayload) SetDescription(v CreateTokenPayloadGetDescriptionRe setCreateTokenPayloadGetDescriptionAttributeType(&o.Description, v) } +// GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateTokenPayload) GetLabels() (res CreateTokenPayloadGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateTokenPayload) GetLabelsOk() (ret CreateTokenPayloadGetLabelsRetType, ok bool) { + return getCreateTokenPayloadGetLabelsAttributeTypeOk(o.Labels) +} + +// HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateTokenPayload) HasLabels() bool { + _, ok := o.GetLabelsOk() + return ok +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateTokenPayload) SetLabels(v CreateTokenPayloadGetLabelsRetType) { + setCreateTokenPayloadGetLabelsAttributeType(&o.Labels, v) +} + // GetName returns the Name field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateTokenPayload) GetName() (ret CreateTokenPayloadGetNameRetType) { @@ -212,6 +268,9 @@ func (o CreateTokenPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateTokenPayloadGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } + if val, ok := getCreateTokenPayloadGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } if val, ok := getCreateTokenPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } diff --git a/services/modelserving/model_partial_update_token_payload.go b/services/modelserving/model_partial_update_token_payload.go index 46045bd96..f139915c7 100644 --- a/services/modelserving/model_partial_update_token_payload.go +++ b/services/modelserving/model_partial_update_token_payload.go @@ -45,6 +45,33 @@ type PartialUpdateTokenPayloadGetDescriptionArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateTokenPayloadGetDescriptionRetType = string +/* + types and functions for labels +*/ + +// isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateTokenPayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateTokenPayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateTokenPayloadGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPartialUpdateTokenPayloadGetLabelsAttributeTypeOk(arg PartialUpdateTokenPayloadGetLabelsAttributeType) (ret PartialUpdateTokenPayloadGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPartialUpdateTokenPayloadGetLabelsAttributeType(arg *PartialUpdateTokenPayloadGetLabelsAttributeType, val PartialUpdateTokenPayloadGetLabelsRetType) { + *arg = &val +} + /* types and functions for name */ @@ -76,7 +103,9 @@ type PartialUpdateTokenPayloadGetNameRetType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateTokenPayload struct { Description PartialUpdateTokenPayloadGetDescriptionAttributeType `json:"description,omitempty"` - Name PartialUpdateTokenPayloadGetNameAttributeType `json:"name,omitempty"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys. + Labels PartialUpdateTokenPayloadGetLabelsAttributeType `json:"labels,omitempty"` + Name PartialUpdateTokenPayloadGetNameAttributeType `json:"name,omitempty"` } // NewPartialUpdateTokenPayload instantiates a new PartialUpdateTokenPayload object @@ -125,6 +154,33 @@ func (o *PartialUpdateTokenPayload) SetDescription(v PartialUpdateTokenPayloadGe setPartialUpdateTokenPayloadGetDescriptionAttributeType(&o.Description, v) } +// GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PartialUpdateTokenPayload) GetLabels() (res PartialUpdateTokenPayloadGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PartialUpdateTokenPayload) GetLabelsOk() (ret PartialUpdateTokenPayloadGetLabelsRetType, ok bool) { + return getPartialUpdateTokenPayloadGetLabelsAttributeTypeOk(o.Labels) +} + +// HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PartialUpdateTokenPayload) HasLabels() bool { + _, ok := o.GetLabelsOk() + return ok +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PartialUpdateTokenPayload) SetLabels(v PartialUpdateTokenPayloadGetLabelsRetType) { + setPartialUpdateTokenPayloadGetLabelsAttributeType(&o.Labels, v) +} + // GetName returns the Name field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateTokenPayload) GetName() (res PartialUpdateTokenPayloadGetNameRetType) { @@ -158,6 +214,9 @@ func (o PartialUpdateTokenPayload) ToMap() (map[string]interface{}, error) { if val, ok := getPartialUpdateTokenPayloadGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } + if val, ok := getPartialUpdateTokenPayloadGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } if val, ok := getPartialUpdateTokenPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } diff --git a/services/modelserving/model_token.go b/services/modelserving/model_token.go index 16caffe8f..f73a2a322 100644 --- a/services/modelserving/model_token.go +++ b/services/modelserving/model_token.go @@ -74,6 +74,33 @@ type TokenGetIdArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TokenGetIdRetType = string +/* + types and functions for labels +*/ + +// isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type TokenGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type TokenGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type TokenGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getTokenGetLabelsAttributeTypeOk(arg TokenGetLabelsAttributeType) (ret TokenGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setTokenGetLabelsAttributeType(arg *TokenGetLabelsAttributeType, val TokenGetLabelsRetType) { + *arg = &val +} + /* types and functions for name */ @@ -314,6 +341,8 @@ type Token struct { Description TokenGetDescriptionAttributeType `json:"description,omitempty"` // REQUIRED Id TokenGetIdAttributeType `json:"id" required:"true"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys. + Labels TokenGetLabelsAttributeType `json:"labels,omitempty"` // REQUIRED Name TokenGetNameAttributeType `json:"name" required:"true"` // REQUIRED @@ -398,6 +427,33 @@ func (o *Token) SetId(v TokenGetIdRetType) { setTokenGetIdAttributeType(&o.Id, v) } +// GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Token) GetLabels() (res TokenGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Token) GetLabelsOk() (ret TokenGetLabelsRetType, ok bool) { + return getTokenGetLabelsAttributeTypeOk(o.Labels) +} + +// HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Token) HasLabels() bool { + _, ok := o.GetLabelsOk() + return ok +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Token) SetLabels(v TokenGetLabelsRetType) { + setTokenGetLabelsAttributeType(&o.Labels, v) +} + // GetName returns the Name field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Token) GetName() (ret TokenGetNameRetType) { @@ -487,6 +543,9 @@ func (o Token) ToMap() (map[string]interface{}, error) { if val, ok := getTokenGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } + if val, ok := getTokenGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } if val, ok := getTokenGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } diff --git a/services/modelserving/model_token_created.go b/services/modelserving/model_token_created.go index fb614050e..fb47cba3c 100644 --- a/services/modelserving/model_token_created.go +++ b/services/modelserving/model_token_created.go @@ -101,6 +101,33 @@ type TokenCreatedGetIdArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TokenCreatedGetIdRetType = string +/* + types and functions for labels +*/ + +// isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type TokenCreatedGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type TokenCreatedGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type TokenCreatedGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getTokenCreatedGetLabelsAttributeTypeOk(arg TokenCreatedGetLabelsAttributeType) (ret TokenCreatedGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setTokenCreatedGetLabelsAttributeType(arg *TokenCreatedGetLabelsAttributeType, val TokenCreatedGetLabelsRetType) { + *arg = &val +} + /* types and functions for name */ @@ -340,6 +367,8 @@ type TokenCreated struct { Description TokenCreatedGetDescriptionAttributeType `json:"description,omitempty"` // REQUIRED Id TokenCreatedGetIdAttributeType `json:"id" required:"true"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys. + Labels TokenCreatedGetLabelsAttributeType `json:"labels,omitempty"` // REQUIRED Name TokenCreatedGetNameAttributeType `json:"name" required:"true"` // REQUIRED @@ -445,6 +474,33 @@ func (o *TokenCreated) SetId(v TokenCreatedGetIdRetType) { setTokenCreatedGetIdAttributeType(&o.Id, v) } +// GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *TokenCreated) GetLabels() (res TokenCreatedGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *TokenCreated) GetLabelsOk() (ret TokenCreatedGetLabelsRetType, ok bool) { + return getTokenCreatedGetLabelsAttributeTypeOk(o.Labels) +} + +// HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *TokenCreated) HasLabels() bool { + _, ok := o.GetLabelsOk() + return ok +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *TokenCreated) SetLabels(v TokenCreatedGetLabelsRetType) { + setTokenCreatedGetLabelsAttributeType(&o.Labels, v) +} + // GetName returns the Name field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *TokenCreated) GetName() (ret TokenCreatedGetNameRetType) { @@ -537,6 +593,9 @@ func (o TokenCreated) ToMap() (map[string]interface{}, error) { if val, ok := getTokenCreatedGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } + if val, ok := getTokenCreatedGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } if val, ok := getTokenCreatedGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } diff --git a/services/modelserving/oas_commit b/services/modelserving/oas_commit index 6501dbdd4..338ccfc45 100644 --- a/services/modelserving/oas_commit +++ b/services/modelserving/oas_commit @@ -1 +1 @@ -c7768ad04c6cf3a6fffee98596d5e90a1bfe5891 +c4128703f9d3ed3951e55d042b5a6ecc57011f2e diff --git a/services/modelserving/v1api/api_default.go b/services/modelserving/v1api/api_default.go index e748540b0..fc42b22d6 100644 --- a/services/modelserving/v1api/api_default.go +++ b/services/modelserving/v1api/api_default.go @@ -1110,10 +1110,17 @@ func (a *DefaultAPIService) ListModelsExecute(r ApiListModelsRequest) (*ListMode } type ApiListTokensRequest struct { - ctx context.Context - ApiService DefaultAPI - regionId string - projectId string + ctx context.Context + ApiService DefaultAPI + regionId string + projectId string + labelSelector *string +} + +// Filter token resource by labels +func (r ApiListTokensRequest) LabelSelector(labelSelector string) ApiListTokensRequest { + r.labelSelector = &labelSelector + return r } func (r ApiListTokensRequest) Execute() (*ListTokenResp, error) { @@ -1163,6 +1170,9 @@ func (a *DefaultAPIService) ListTokensExecute(r ApiListTokensRequest) (*ListToke localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.labelSelector != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/services/modelserving/v1api/model_create_token_payload.go b/services/modelserving/v1api/model_create_token_payload.go index 78af8e527..f52ca4eb5 100644 --- a/services/modelserving/v1api/model_create_token_payload.go +++ b/services/modelserving/v1api/model_create_token_payload.go @@ -22,7 +22,9 @@ var _ MappedNullable = &CreateTokenPayload{} // CreateTokenPayload struct for CreateTokenPayload type CreateTokenPayload struct { Description *string `json:"description,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s.:\\/\\\\-]+$"` - Name string `json:"name" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` + Name string `json:"name" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` // time to live duration. Must be valid duration string. If not set the token will never expire. TtlDuration *string `json:"ttlDuration,omitempty"` AdditionalProperties map[string]interface{} @@ -80,6 +82,38 @@ func (o *CreateTokenPayload) SetDescription(v string) { o.Description = &v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateTokenPayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateTokenPayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateTokenPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateTokenPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value func (o *CreateTokenPayload) GetName() string { if o == nil { @@ -149,6 +183,9 @@ func (o CreateTokenPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } toSerialize["name"] = o.Name if !IsNil(o.TtlDuration) { toSerialize["ttlDuration"] = o.TtlDuration @@ -197,6 +234,7 @@ func (o *CreateTokenPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "description") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "ttlDuration") o.AdditionalProperties = additionalProperties diff --git a/services/modelserving/v1api/model_partial_update_token_payload.go b/services/modelserving/v1api/model_partial_update_token_payload.go index a73368161..3b83435c5 100644 --- a/services/modelserving/v1api/model_partial_update_token_payload.go +++ b/services/modelserving/v1api/model_partial_update_token_payload.go @@ -20,8 +20,10 @@ var _ MappedNullable = &PartialUpdateTokenPayload{} // PartialUpdateTokenPayload struct for PartialUpdateTokenPayload type PartialUpdateTokenPayload struct { - Description *string `json:"description,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s.:\\/\\\\-]+$"` - Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` + Description *string `json:"description,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s.:\\/\\\\-]+$"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` AdditionalProperties map[string]interface{} } @@ -76,6 +78,38 @@ func (o *PartialUpdateTokenPayload) SetDescription(v string) { o.Description = &v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PartialUpdateTokenPayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateTokenPayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *PartialUpdateTokenPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *PartialUpdateTokenPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value if set, zero value otherwise. func (o *PartialUpdateTokenPayload) GetName() string { if o == nil || IsNil(o.Name) { @@ -121,6 +155,9 @@ func (o PartialUpdateTokenPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } if !IsNil(o.Name) { toSerialize["name"] = o.Name } @@ -147,6 +184,7 @@ func (o *PartialUpdateTokenPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "description") + delete(additionalProperties, "labels") delete(additionalProperties, "name") o.AdditionalProperties = additionalProperties } diff --git a/services/modelserving/v1api/model_token.go b/services/modelserving/v1api/model_token.go index f3b71b607..c6593ee32 100644 --- a/services/modelserving/v1api/model_token.go +++ b/services/modelserving/v1api/model_token.go @@ -22,12 +22,14 @@ var _ MappedNullable = &Token{} // Token struct for Token type Token struct { - Description *string `json:"description,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s.:\\/\\\\-]+$"` - Id string `json:"id"` - Name string `json:"name" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` - Region string `json:"region"` - State TokenState `json:"state"` - ValidUntil time.Time `json:"validUntil"` + Description *string `json:"description,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s.:\\/\\\\-]+$"` + Id string `json:"id"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` + Name string `json:"name" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` + Region string `json:"region"` + State TokenState `json:"state"` + ValidUntil time.Time `json:"validUntil"` AdditionalProperties map[string]interface{} } @@ -111,6 +113,38 @@ func (o *Token) SetId(v string) { o.Id = v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Token) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Token) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Token) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *Token) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value func (o *Token) GetName() string { if o == nil { @@ -221,6 +255,9 @@ func (o Token) ToMap() (map[string]interface{}, error) { toSerialize["description"] = o.Description } toSerialize["id"] = o.Id + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } toSerialize["name"] = o.Name toSerialize["region"] = o.Region toSerialize["state"] = o.State @@ -274,6 +311,7 @@ func (o *Token) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "description") delete(additionalProperties, "id") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "region") delete(additionalProperties, "state") diff --git a/services/modelserving/v1api/model_token_created.go b/services/modelserving/v1api/model_token_created.go index f702e4e5e..e29481328 100644 --- a/services/modelserving/v1api/model_token_created.go +++ b/services/modelserving/v1api/model_token_created.go @@ -22,13 +22,15 @@ var _ MappedNullable = &TokenCreated{} // TokenCreated struct for TokenCreated type TokenCreated struct { - Content string `json:"content" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` - Description *string `json:"description,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s.:\\/\\\\-]+$"` - Id string `json:"id"` - Name string `json:"name" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` - Region string `json:"region"` - State TokenCreatedState `json:"state"` - ValidUntil time.Time `json:"validUntil"` + Content string `json:"content" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` + Description *string `json:"description,omitempty" validate:"regexp=^[0-9a-zA-Z\\\\s.:\\/\\\\-]+$"` + Id string `json:"id"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` + Name string `json:"name" validate:"regexp=^[0-9a-zA-Z\\\\s_-]+$"` + Region string `json:"region"` + State TokenCreatedState `json:"state"` + ValidUntil time.Time `json:"validUntil"` AdditionalProperties map[string]interface{} } @@ -137,6 +139,38 @@ func (o *TokenCreated) SetId(v string) { o.Id = v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *TokenCreated) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenCreated) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *TokenCreated) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *TokenCreated) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value func (o *TokenCreated) GetName() string { if o == nil { @@ -248,6 +282,9 @@ func (o TokenCreated) ToMap() (map[string]interface{}, error) { toSerialize["description"] = o.Description } toSerialize["id"] = o.Id + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } toSerialize["name"] = o.Name toSerialize["region"] = o.Region toSerialize["state"] = o.State @@ -303,6 +340,7 @@ func (o *TokenCreated) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "content") delete(additionalProperties, "description") delete(additionalProperties, "id") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "region") delete(additionalProperties, "state")