From 75a071e1a39aad64467afa5f339bd819b5be2b73 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 5 May 2026 13:24:23 +0000 Subject: [PATCH] Generate postgresflex --- services/postgresflex/oas_commit | 2 +- .../postgresflex/v3alpha1api/configuration.go | 7 +--- .../model_create_instance_request_payload.go | 38 +++++++++++++++++++ .../model_get_instance_response.go | 38 +++++++++++++++++++ ...date_instance_partially_request_payload.go | 38 +++++++++++++++++++ .../model_update_instance_request_payload.go | 38 +++++++++++++++++++ 6 files changed, 155 insertions(+), 6 deletions(-) diff --git a/services/postgresflex/oas_commit b/services/postgresflex/oas_commit index c08a6770d..4562083b2 100644 --- a/services/postgresflex/oas_commit +++ b/services/postgresflex/oas_commit @@ -1 +1 @@ -4407196dbbef4e53e6798809e856725cbc84ae05 +1f026c70b6b0e24e96fd70cd95f945434a638852 diff --git a/services/postgresflex/v3alpha1api/configuration.go b/services/postgresflex/v3alpha1api/configuration.go index a4001eaa3..168de12f5 100644 --- a/services/postgresflex/v3alpha1api/configuration.go +++ b/services/postgresflex/v3alpha1api/configuration.go @@ -22,15 +22,12 @@ func NewConfiguration() *config.Configuration { Debug: false, Servers: config.ServerConfigurations{ { - URL: "https://postgres-flex-service.api.{region}stackit.cloud", + URL: "https://postgres-flex-service.api.stackit.cloud", Description: "No description provided", Variables: map[string]config.ServerVariable{ "region": { Description: "No description provided", - DefaultValue: "eu01.", - EnumValues: []string{ - "eu01.", - }, + DefaultValue: "global", }, }, }, diff --git a/services/postgresflex/v3alpha1api/model_create_instance_request_payload.go b/services/postgresflex/v3alpha1api/model_create_instance_request_payload.go index 563cbbad1..478ae8739 100644 --- a/services/postgresflex/v3alpha1api/model_create_instance_request_payload.go +++ b/services/postgresflex/v3alpha1api/model_create_instance_request_payload.go @@ -26,6 +26,8 @@ type CreateInstanceRequestPayload struct { Encryption *InstanceEncryption `json:"encryption,omitempty"` // The id of the instance flavor. FlavorId string `json:"flavorId"` + // Key-value pairs, 63 characters max, begin and end with an alphanumerical character, may contain dashes (-), underscores (_), dots (.), and alphanumerics between. Key MUST be at least 1 character. Max 64 labels 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])*$ The stackit- prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` // The name of the instance. Name string `json:"name"` Network InstanceNetworkCreate `json:"network"` @@ -145,6 +147,38 @@ func (o *CreateInstanceRequestPayload) SetFlavorId(v string) { o.FlavorId = v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateInstanceRequestPayload) 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 *CreateInstanceRequestPayload) 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 *CreateInstanceRequestPayload) 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 *CreateInstanceRequestPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value func (o *CreateInstanceRequestPayload) GetName() string { if o == nil { @@ -304,6 +338,9 @@ func (o CreateInstanceRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize["encryption"] = o.Encryption } toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } toSerialize["name"] = o.Name toSerialize["network"] = o.Network toSerialize["replicas"] = o.Replicas @@ -363,6 +400,7 @@ func (o *CreateInstanceRequestPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "backupSchedule") delete(additionalProperties, "encryption") delete(additionalProperties, "flavorId") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "network") delete(additionalProperties, "replicas") diff --git a/services/postgresflex/v3alpha1api/model_get_instance_response.go b/services/postgresflex/v3alpha1api/model_get_instance_response.go index 3a30756fe..39791bac2 100644 --- a/services/postgresflex/v3alpha1api/model_get_instance_response.go +++ b/services/postgresflex/v3alpha1api/model_get_instance_response.go @@ -33,6 +33,8 @@ type GetInstanceResponse struct { Id string `json:"id"` // Whether the instance can be deleted or not. IsDeletable bool `json:"isDeletable"` + // Key-value pairs, 63 characters max, begin and end with an alphanumerical character, may contain dashes (-), underscores (_), dots (.), and alphanumerics between. Key MUST be at least 1 character. Max 64 labels 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])*$ The stackit- prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` // The name of the instance. Name string `json:"name"` Network InstanceNetwork `json:"network"` @@ -261,6 +263,38 @@ func (o *GetInstanceResponse) SetIsDeletable(v bool) { o.IsDeletable = v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *GetInstanceResponse) 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 *GetInstanceResponse) 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 *GetInstanceResponse) 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 *GetInstanceResponse) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value func (o *GetInstanceResponse) GetName() string { if o == nil { @@ -450,6 +484,9 @@ func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize["flavorId"] = o.FlavorId toSerialize["id"] = o.Id toSerialize["isDeletable"] = o.IsDeletable + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } toSerialize["name"] = o.Name toSerialize["network"] = o.Network toSerialize["replicas"] = o.Replicas @@ -518,6 +555,7 @@ func (o *GetInstanceResponse) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "flavorId") delete(additionalProperties, "id") delete(additionalProperties, "isDeletable") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "network") delete(additionalProperties, "replicas") diff --git a/services/postgresflex/v3alpha1api/model_update_instance_partially_request_payload.go b/services/postgresflex/v3alpha1api/model_update_instance_partially_request_payload.go index 2e79e4e45..b5911bd72 100644 --- a/services/postgresflex/v3alpha1api/model_update_instance_partially_request_payload.go +++ b/services/postgresflex/v3alpha1api/model_update_instance_partially_request_payload.go @@ -24,6 +24,8 @@ type UpdateInstancePartiallyRequestPayload struct { BackupSchedule *string `json:"backupSchedule,omitempty"` // The id of the instance flavor. FlavorId *string `json:"flavorId,omitempty"` + // Key-value pairs, 63 characters max, begin and end with an alphanumerical character, may contain dashes (-), underscores (_), dots (.), and alphanumerics between. Key MUST be at least 1 character. Max 64 labels 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])*$ The stackit- prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` // The name of the instance. Name *string `json:"name,omitempty"` Network *InstanceNetworkOpt `json:"network,omitempty"` @@ -119,6 +121,38 @@ func (o *UpdateInstancePartiallyRequestPayload) SetFlavorId(v string) { o.FlavorId = &v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateInstancePartiallyRequestPayload) 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 *UpdateInstancePartiallyRequestPayload) 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 *UpdateInstancePartiallyRequestPayload) 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 *UpdateInstancePartiallyRequestPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetName() string { if o == nil || IsNil(o.Name) { @@ -327,6 +361,9 @@ func (o UpdateInstancePartiallyRequestPayload) ToMap() (map[string]interface{}, if !IsNil(o.FlavorId) { toSerialize["flavorId"] = o.FlavorId } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } if !IsNil(o.Name) { toSerialize["name"] = o.Name } @@ -369,6 +406,7 @@ func (o *UpdateInstancePartiallyRequestPayload) UnmarshalJSON(data []byte) (err if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "backupSchedule") delete(additionalProperties, "flavorId") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "network") delete(additionalProperties, "replicas") diff --git a/services/postgresflex/v3alpha1api/model_update_instance_request_payload.go b/services/postgresflex/v3alpha1api/model_update_instance_request_payload.go index e28ef90f8..85f6e84eb 100644 --- a/services/postgresflex/v3alpha1api/model_update_instance_request_payload.go +++ b/services/postgresflex/v3alpha1api/model_update_instance_request_payload.go @@ -25,6 +25,8 @@ type UpdateInstanceRequestPayload struct { BackupSchedule string `json:"backupSchedule"` // The id of the instance flavor. FlavorId string `json:"flavorId"` + // Key-value pairs, 63 characters max, begin and end with an alphanumerical character, may contain dashes (-), underscores (_), dots (.), and alphanumerics between. Key MUST be at least 1 character. Max 64 labels 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])*$ The stackit- prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` // The name of the instance. Name string `json:"name"` Network InstanceNetworkUpdate `json:"network"` @@ -112,6 +114,38 @@ func (o *UpdateInstanceRequestPayload) SetFlavorId(v string) { o.FlavorId = v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateInstanceRequestPayload) 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 *UpdateInstanceRequestPayload) 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 *UpdateInstanceRequestPayload) 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 *UpdateInstanceRequestPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value func (o *UpdateInstanceRequestPayload) GetName() string { if o == nil { @@ -268,6 +302,9 @@ func (o UpdateInstanceRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["backupSchedule"] = o.BackupSchedule toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } toSerialize["name"] = o.Name toSerialize["network"] = o.Network toSerialize["replicas"] = o.Replicas @@ -326,6 +363,7 @@ func (o *UpdateInstanceRequestPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "backupSchedule") delete(additionalProperties, "flavorId") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "network") delete(additionalProperties, "replicas")