diff --git a/services/certificates/model_create_certificate_payload.go b/services/certificates/model_create_certificate_payload.go index 42ecd1249..c6ecee4d5 100644 --- a/services/certificates/model_create_certificate_payload.go +++ b/services/certificates/model_create_certificate_payload.go @@ -18,6 +18,33 @@ import ( // checks if the CreateCertificatePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateCertificatePayload{} +/* + 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 CreateCertificatePayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateCertificatePayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateCertificatePayloadGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateCertificatePayloadGetLabelsAttributeTypeOk(arg CreateCertificatePayloadGetLabelsAttributeType) (ret CreateCertificatePayloadGetLabelsRetType, 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 setCreateCertificatePayloadGetLabelsAttributeType(arg *CreateCertificatePayloadGetLabelsAttributeType, val CreateCertificatePayloadGetLabelsRetType) { + *arg = &val +} + /* types and functions for name */ @@ -156,6 +183,8 @@ type CreateCertificatePayloadGetRegionRetType = string // CreateCertificatePayload Uploads a PEM encoded X509 public/private key pair // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateCertificatePayload struct { + // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per Certificate. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. + Labels CreateCertificatePayloadGetLabelsAttributeType `json:"labels,omitempty"` // TLS certificate name Name CreateCertificatePayloadGetNameAttributeType `json:"name,omitempty"` // The PEM encoded private key part @@ -187,6 +216,33 @@ func NewCreateCertificatePayloadWithDefaults() *CreateCertificatePayload { return &this } +// 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 *CreateCertificatePayload) GetLabels() (res CreateCertificatePayloadGetLabelsRetType) { + 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 *CreateCertificatePayload) GetLabelsOk() (ret CreateCertificatePayloadGetLabelsRetType, ok bool) { + return getCreateCertificatePayloadGetLabelsAttributeTypeOk(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 *CreateCertificatePayload) 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 *CreateCertificatePayload) SetLabels(v CreateCertificatePayloadGetLabelsRetType) { + setCreateCertificatePayloadGetLabelsAttributeType(&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 *CreateCertificatePayload) GetName() (res CreateCertificatePayloadGetNameRetType) { @@ -325,6 +381,9 @@ func (o *CreateCertificatePayload) SetRegion(v CreateCertificatePayloadGetRegion // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateCertificatePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getCreateCertificatePayloadGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } if val, ok := getCreateCertificatePayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } diff --git a/services/certificates/model_get_certificate_response.go b/services/certificates/model_get_certificate_response.go index 0738de66d..66be3031c 100644 --- a/services/certificates/model_get_certificate_response.go +++ b/services/certificates/model_get_certificate_response.go @@ -45,6 +45,33 @@ type GetCertificateResponseGetIdArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetCertificateResponseGetIdRetType = 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 GetCertificateResponseGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCertificateResponseGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCertificateResponseGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetCertificateResponseGetLabelsAttributeTypeOk(arg GetCertificateResponseGetLabelsAttributeType) (ret GetCertificateResponseGetLabelsRetType, 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 setGetCertificateResponseGetLabelsAttributeType(arg *GetCertificateResponseGetLabelsAttributeType, val GetCertificateResponseGetLabelsRetType) { + *arg = &val +} + /* types and functions for name */ @@ -131,6 +158,8 @@ type GetCertificateResponseGetRegionRetType = string type GetCertificateResponse struct { // The certificates resource id Id GetCertificateResponseGetIdAttributeType `json:"id,omitempty"` + // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per Certificate. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. + Labels GetCertificateResponseGetLabelsAttributeType `json:"labels,omitempty"` // TLS certificate name Name GetCertificateResponseGetNameAttributeType `json:"name,omitempty"` // The PEM encoded public key part @@ -185,6 +214,33 @@ func (o *GetCertificateResponse) SetId(v GetCertificateResponseGetIdRetType) { setGetCertificateResponseGetIdAttributeType(&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 *GetCertificateResponse) GetLabels() (res GetCertificateResponseGetLabelsRetType) { + 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 *GetCertificateResponse) GetLabelsOk() (ret GetCertificateResponseGetLabelsRetType, ok bool) { + return getGetCertificateResponseGetLabelsAttributeTypeOk(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 *GetCertificateResponse) 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 *GetCertificateResponse) SetLabels(v GetCertificateResponseGetLabelsRetType) { + setGetCertificateResponseGetLabelsAttributeType(&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 *GetCertificateResponse) GetName() (res GetCertificateResponseGetNameRetType) { @@ -272,6 +328,9 @@ func (o GetCertificateResponse) ToMap() (map[string]interface{}, error) { if val, ok := getGetCertificateResponseGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } + if val, ok := getGetCertificateResponseGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } if val, ok := getGetCertificateResponseGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } diff --git a/services/certificates/oas_commit b/services/certificates/oas_commit index b129c2291..f4a2ce25c 100644 --- a/services/certificates/oas_commit +++ b/services/certificates/oas_commit @@ -1 +1 @@ -98c11e0ee4834ddaaa474eccc437d234e6276a70 +8f43ed707da765654e4427642c9d978f80d504e1 diff --git a/services/certificates/v2api/model_create_certificate_payload.go b/services/certificates/v2api/model_create_certificate_payload.go index 1e21dc8cf..c548aa0ea 100644 --- a/services/certificates/v2api/model_create_certificate_payload.go +++ b/services/certificates/v2api/model_create_certificate_payload.go @@ -19,6 +19,8 @@ var _ MappedNullable = &CreateCertificatePayload{} // CreateCertificatePayload Uploads a PEM encoded X509 public/private key pair type CreateCertificatePayload struct { + // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per Certificate. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. + Labels *map[string]string `json:"labels,omitempty"` // TLS certificate name Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` // The PEM encoded private key part @@ -51,6 +53,38 @@ func NewCreateCertificatePayloadWithDefaults() *CreateCertificatePayload { return &this } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateCertificatePayload) 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 *CreateCertificatePayload) 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 *CreateCertificatePayload) 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 *CreateCertificatePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value if set, zero value otherwise. func (o *CreateCertificatePayload) GetName() string { if o == nil || IsNil(o.Name) { @@ -221,6 +255,9 @@ func (o CreateCertificatePayload) MarshalJSON() ([]byte, error) { func (o CreateCertificatePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } if !IsNil(o.Name) { toSerialize["name"] = o.Name } @@ -258,6 +295,7 @@ func (o *CreateCertificatePayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "privateKey") delete(additionalProperties, "projectId") diff --git a/services/certificates/v2api/model_get_certificate_response.go b/services/certificates/v2api/model_get_certificate_response.go index 8df7201c2..3e0f3cd49 100644 --- a/services/certificates/v2api/model_get_certificate_response.go +++ b/services/certificates/v2api/model_get_certificate_response.go @@ -21,6 +21,8 @@ var _ MappedNullable = &GetCertificateResponse{} type GetCertificateResponse struct { // The certificates resource id Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` + // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per Certificate. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. + Labels *map[string]string `json:"labels,omitempty"` // TLS certificate name Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` // The PEM encoded public key part @@ -81,6 +83,38 @@ func (o *GetCertificateResponse) SetId(v string) { o.Id = &v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *GetCertificateResponse) 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 *GetCertificateResponse) 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 *GetCertificateResponse) 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 *GetCertificateResponse) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value if set, zero value otherwise. func (o *GetCertificateResponse) GetName() string { if o == nil || IsNil(o.Name) { @@ -190,6 +224,9 @@ func (o GetCertificateResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.Id) { toSerialize["id"] = o.Id } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } if !IsNil(o.Name) { toSerialize["name"] = o.Name } @@ -222,6 +259,7 @@ func (o *GetCertificateResponse) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "id") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "publicKey") delete(additionalProperties, "region")