From a6a828c1f394501448de2b1d8237a339c6fafd29 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 29 Oct 2026 11:42:56 +0000 Subject: [PATCH] Generate iaas --- services/iaas/go.mod | 2 +- services/iaas/go.sum | 4 +- services/iaas/oas_commit | 2 +- .../v1api/model_create_snapshot_payload.go | 38 ++++ services/iaas/v1api/model_server_agent.go | 42 +++- services/iaas/v1api/model_snapshot.go | 38 ++++ .../v2api/model_create_snapshot_payload.go | 38 ++++ .../v2api/model_destination_prefix_list.go | 197 ++++++++++++++++++ .../model_destination_prefix_list_type.go | 112 ++++++++++ .../v2api/model_image_from_volume_payload.go | 2 +- .../iaas/v2api/model_route_destination.go | 36 +++- services/iaas/v2api/model_server_agent.go | 42 +++- services/iaas/v2api/model_snapshot.go | 38 ++++ .../model_destination_prefix_list.go | 197 ++++++++++++++++++ .../model_destination_prefix_list_type.go | 112 ++++++++++ .../v2beta1api/model_route_destination.go | 36 +++- .../iaas/v2beta1api/model_server_agent.go | 42 +++- services/iaas/v2beta1api/model_snapshot.go | 38 ++++ .../model_v2beta1_create_snapshot_payload.go | 38 ++++ 19 files changed, 1039 insertions(+), 15 deletions(-) create mode 100644 services/iaas/v2api/model_destination_prefix_list.go create mode 100644 services/iaas/v2api/model_destination_prefix_list_type.go create mode 100644 services/iaas/v2beta1api/model_destination_prefix_list.go create mode 100644 services/iaas/v2beta1api/model_destination_prefix_list_type.go diff --git a/services/iaas/go.mod b/services/iaas/go.mod index f690976ca5..e7a75f1ecf 100644 --- a/services/iaas/go.mod +++ b/services/iaas/go.mod @@ -5,7 +5,7 @@ go 1.25 require ( github.com/google/go-cmp v0.7.0 github.com/stackitcloud/stackit-sdk-go/core v0.27.1 - github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.26.1 + github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.28.0 ) require ( diff --git a/services/iaas/go.sum b/services/iaas/go.sum index aa241359ee..7e2dce2b75 100644 --- a/services/iaas/go.sum +++ b/services/iaas/go.sum @@ -6,5 +6,5 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/stackitcloud/stackit-sdk-go/core v0.27.1 h1:k7SrqqMoHjkvHbx6n6nV3Lt51itp8nNplht6vGHkPhw= github.com/stackitcloud/stackit-sdk-go/core v0.27.1/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= -github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.26.1 h1:6NHoXh6c/GQ7+CO03bszc09rnKCeP0dzMmyrnz6mkvs= -github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.26.1/go.mod h1:IsId3wbkp5oaO0JEaHZpZnbVW6KFHlAptwB+1iG3v3w= +github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.28.0 h1:rZB1f9g5M/2mWKXsJIfMvGcFpFWkDQFjG28V/d1ezWw= +github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.28.0/go.mod h1:IsId3wbkp5oaO0JEaHZpZnbVW6KFHlAptwB+1iG3v3w= diff --git a/services/iaas/oas_commit b/services/iaas/oas_commit index 71a76821d4..9510a89460 100644 --- a/services/iaas/oas_commit +++ b/services/iaas/oas_commit @@ -1 +1 @@ -0afa5e4924e6bf230fdade5cb294ecfd97dd63e5 +c9fb47b3087043293b6f77e5d3b778784de27ef2 diff --git a/services/iaas/v1api/model_create_snapshot_payload.go b/services/iaas/v1api/model_create_snapshot_payload.go index 3e32004139..c09236c4d3 100644 --- a/services/iaas/v1api/model_create_snapshot_payload.go +++ b/services/iaas/v1api/model_create_snapshot_payload.go @@ -28,6 +28,8 @@ type CreateSnapshotPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` + // Indicates if a volume is encrypted. + Encrypted *bool `json:"encrypted,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents the labels as key-value pairs of a resource. Key constraints: - May contain an optional domain prefix separated by a slash (`/`). - Domain prefix must be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 and 63 characters. - Must begin and end with an alphanumerical character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - Keys starting with the prefix `stackit-` or having a domain prefix of `stackit.cloud` (including its subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value constraints: - Must be less than or equal to 63 characters long (can be empty). - If not empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are excluded from this count. Providing a `null` value for a key will remove that key. @@ -161,6 +163,38 @@ func (o *CreateSnapshotPayload) SetDescription(v string) { o.Description = &v } +// GetEncrypted returns the Encrypted field value if set, zero value otherwise. +func (o *CreateSnapshotPayload) GetEncrypted() bool { + if o == nil || IsNil(o.Encrypted) { + var ret bool + return ret + } + return *o.Encrypted +} + +// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSnapshotPayload) GetEncryptedOk() (*bool, bool) { + if o == nil || IsNil(o.Encrypted) { + return nil, false + } + return o.Encrypted, true +} + +// HasEncrypted returns a boolean if a field has been set. +func (o *CreateSnapshotPayload) HasEncrypted() bool { + if o != nil && !IsNil(o.Encrypted) { + return true + } + + return false +} + +// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. +func (o *CreateSnapshotPayload) SetEncrypted(v bool) { + o.Encrypted = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *CreateSnapshotPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -396,6 +430,9 @@ func (o CreateSnapshotPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Encrypted) { + toSerialize["encrypted"] = o.Encrypted + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -461,6 +498,7 @@ func (o *CreateSnapshotPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "availabilityZone") delete(additionalProperties, "createdAt") delete(additionalProperties, "description") + delete(additionalProperties, "encrypted") delete(additionalProperties, "id") delete(additionalProperties, "labels") delete(additionalProperties, "name") diff --git a/services/iaas/v1api/model_server_agent.go b/services/iaas/v1api/model_server_agent.go index 0a80a276f8..e3330108f4 100644 --- a/services/iaas/v1api/model_server_agent.go +++ b/services/iaas/v1api/model_server_agent.go @@ -20,8 +20,10 @@ var _ MappedNullable = &ServerAgent{} // ServerAgent STACKIT server agent options for a server. type ServerAgent struct { - // Configure the STACKIT server agent provisioning during the first boot of the server. Only works when booting from an images that supports the STACKIT server agent. When `false` the agent IS NOT installed. When `true` the agent IS installed. When its not set the result depend on the used image and its default provisioning setting. - Provisioned *bool `json:"provisioned,omitempty"` + // Configure the STACKIT server agent provisioning during the first boot of the server. When `false`, the agent is not installed. When `true`, the agent is installed. Setting it to `true` when booting from an image requires an image that supports the agent; otherwise, the request is rejected. If omitted when booting from an image, the image default (`provisionByDefault`) applies. + Provisioned *bool `json:"provisioned,omitempty"` + // Configuration property that controls whether active virtual machine monitoring is enabled for a server instance. When `true` it allows the platform to collect metrics, monitor system health, and track guest-level performance on the VM. It operates as a dependent option - meaning `vmMonitoring` cannot be active unless the main server agent is also enabled. + VmMonitoring *bool `json:"vmMonitoring,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,6 +78,38 @@ func (o *ServerAgent) SetProvisioned(v bool) { o.Provisioned = &v } +// GetVmMonitoring returns the VmMonitoring field value if set, zero value otherwise. +func (o *ServerAgent) GetVmMonitoring() bool { + if o == nil || IsNil(o.VmMonitoring) { + var ret bool + return ret + } + return *o.VmMonitoring +} + +// GetVmMonitoringOk returns a tuple with the VmMonitoring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerAgent) GetVmMonitoringOk() (*bool, bool) { + if o == nil || IsNil(o.VmMonitoring) { + return nil, false + } + return o.VmMonitoring, true +} + +// HasVmMonitoring returns a boolean if a field has been set. +func (o *ServerAgent) HasVmMonitoring() bool { + if o != nil && !IsNil(o.VmMonitoring) { + return true + } + + return false +} + +// SetVmMonitoring gets a reference to the given bool and assigns it to the VmMonitoring field. +func (o *ServerAgent) SetVmMonitoring(v bool) { + o.VmMonitoring = &v +} + func (o ServerAgent) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -89,6 +123,9 @@ func (o ServerAgent) ToMap() (map[string]interface{}, error) { if !IsNil(o.Provisioned) { toSerialize["provisioned"] = o.Provisioned } + if !IsNil(o.VmMonitoring) { + toSerialize["vmMonitoring"] = o.VmMonitoring + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -112,6 +149,7 @@ func (o *ServerAgent) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "provisioned") + delete(additionalProperties, "vmMonitoring") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_snapshot.go b/services/iaas/v1api/model_snapshot.go index faa09c019d..fc604e6203 100644 --- a/services/iaas/v1api/model_snapshot.go +++ b/services/iaas/v1api/model_snapshot.go @@ -28,6 +28,8 @@ type Snapshot struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` + // Indicates if a volume is encrypted. + Encrypted *bool `json:"encrypted,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents the labels as key-value pairs of a resource. Key constraints: - May contain an optional domain prefix separated by a slash (`/`). - Domain prefix must be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 and 63 characters. - Must begin and end with an alphanumerical character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - Keys starting with the prefix `stackit-` or having a domain prefix of `stackit.cloud` (including its subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value constraints: - Must be less than or equal to 63 characters long (can be empty). - If not empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are excluded from this count. Providing a `null` value for a key will remove that key. @@ -161,6 +163,38 @@ func (o *Snapshot) SetDescription(v string) { o.Description = &v } +// GetEncrypted returns the Encrypted field value if set, zero value otherwise. +func (o *Snapshot) GetEncrypted() bool { + if o == nil || IsNil(o.Encrypted) { + var ret bool + return ret + } + return *o.Encrypted +} + +// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Snapshot) GetEncryptedOk() (*bool, bool) { + if o == nil || IsNil(o.Encrypted) { + return nil, false + } + return o.Encrypted, true +} + +// HasEncrypted returns a boolean if a field has been set. +func (o *Snapshot) HasEncrypted() bool { + if o != nil && !IsNil(o.Encrypted) { + return true + } + + return false +} + +// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. +func (o *Snapshot) SetEncrypted(v bool) { + o.Encrypted = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Snapshot) GetId() string { if o == nil || IsNil(o.Id) { @@ -396,6 +430,9 @@ func (o Snapshot) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Encrypted) { + toSerialize["encrypted"] = o.Encrypted + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -461,6 +498,7 @@ func (o *Snapshot) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "availabilityZone") delete(additionalProperties, "createdAt") delete(additionalProperties, "description") + delete(additionalProperties, "encrypted") delete(additionalProperties, "id") delete(additionalProperties, "labels") delete(additionalProperties, "name") diff --git a/services/iaas/v2api/model_create_snapshot_payload.go b/services/iaas/v2api/model_create_snapshot_payload.go index d4357609e3..98d32ef528 100644 --- a/services/iaas/v2api/model_create_snapshot_payload.go +++ b/services/iaas/v2api/model_create_snapshot_payload.go @@ -28,6 +28,8 @@ type CreateSnapshotPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` + // Indicates if a volume is encrypted. + Encrypted *bool `json:"encrypted,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents the labels as key-value pairs of a resource. Key constraints: - May contain an optional domain prefix separated by a slash (`/`). - Domain prefix must be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 and 63 characters. - Must begin and end with an alphanumerical character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - Keys starting with the prefix `stackit-` or having a domain prefix of `stackit.cloud` (including its subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value constraints: - Must be less than or equal to 63 characters long (can be empty). - If not empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are excluded from this count. Providing a `null` value for a key will remove that key. @@ -161,6 +163,38 @@ func (o *CreateSnapshotPayload) SetDescription(v string) { o.Description = &v } +// GetEncrypted returns the Encrypted field value if set, zero value otherwise. +func (o *CreateSnapshotPayload) GetEncrypted() bool { + if o == nil || IsNil(o.Encrypted) { + var ret bool + return ret + } + return *o.Encrypted +} + +// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSnapshotPayload) GetEncryptedOk() (*bool, bool) { + if o == nil || IsNil(o.Encrypted) { + return nil, false + } + return o.Encrypted, true +} + +// HasEncrypted returns a boolean if a field has been set. +func (o *CreateSnapshotPayload) HasEncrypted() bool { + if o != nil && !IsNil(o.Encrypted) { + return true + } + + return false +} + +// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. +func (o *CreateSnapshotPayload) SetEncrypted(v bool) { + o.Encrypted = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *CreateSnapshotPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -396,6 +430,9 @@ func (o CreateSnapshotPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Encrypted) { + toSerialize["encrypted"] = o.Encrypted + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -461,6 +498,7 @@ func (o *CreateSnapshotPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "availabilityZone") delete(additionalProperties, "createdAt") delete(additionalProperties, "description") + delete(additionalProperties, "encrypted") delete(additionalProperties, "id") delete(additionalProperties, "labels") delete(additionalProperties, "name") diff --git a/services/iaas/v2api/model_destination_prefix_list.go b/services/iaas/v2api/model_destination_prefix_list.go new file mode 100644 index 0000000000..7c910e1b24 --- /dev/null +++ b/services/iaas/v2api/model_destination_prefix_list.go @@ -0,0 +1,197 @@ +/* +STACKIT IaaS API + +This API allows you to create and modify IaaS resources. + +API version: 2 +Contact: stackit-iaas@mail.schwarz +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" + "fmt" +) + +// checks if the DestinationPrefixList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DestinationPrefixList{} + +// DestinationPrefixList Prefix List destination reference object. +type DestinationPrefixList struct { + Type DestinationPrefixListType `json:"type"` + // Universally Unique Identifier (UUID). + Value string `json:"value" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + AdditionalProperties map[string]interface{} +} + +type _DestinationPrefixList DestinationPrefixList + +// NewDestinationPrefixList instantiates a new DestinationPrefixList object +// 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 NewDestinationPrefixList(types DestinationPrefixListType, value string) *DestinationPrefixList { + this := DestinationPrefixList{} + this.Type = types + this.Value = value + return &this +} + +// NewDestinationPrefixListWithDefaults instantiates a new DestinationPrefixList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDestinationPrefixListWithDefaults() *DestinationPrefixList { + this := DestinationPrefixList{} + return &this +} + +// GetType returns the Type field value +func (o *DestinationPrefixList) GetType() DestinationPrefixListType { + if o == nil { + var ret DestinationPrefixListType + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DestinationPrefixList) GetTypeOk() (*DestinationPrefixListType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DestinationPrefixList) SetType(v DestinationPrefixListType) { + o.Type = v +} + +// GetValue returns the Value field value +func (o *DestinationPrefixList) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *DestinationPrefixList) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *DestinationPrefixList) SetValue(v string) { + o.Value = v +} + +func (o DestinationPrefixList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DestinationPrefixList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DestinationPrefixList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDestinationPrefixList := _DestinationPrefixList{} + + err = json.Unmarshal(data, &varDestinationPrefixList) + + if err != nil { + return err + } + + *o = DestinationPrefixList(varDestinationPrefixList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDestinationPrefixList struct { + value *DestinationPrefixList + isSet bool +} + +func (v NullableDestinationPrefixList) Get() *DestinationPrefixList { + return v.value +} + +func (v *NullableDestinationPrefixList) Set(val *DestinationPrefixList) { + v.value = val + v.isSet = true +} + +func (v NullableDestinationPrefixList) IsSet() bool { + return v.isSet +} + +func (v *NullableDestinationPrefixList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDestinationPrefixList(val *DestinationPrefixList) *NullableDestinationPrefixList { + return &NullableDestinationPrefixList{value: val, isSet: true} +} + +func (v NullableDestinationPrefixList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDestinationPrefixList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2api/model_destination_prefix_list_type.go b/services/iaas/v2api/model_destination_prefix_list_type.go new file mode 100644 index 0000000000..6a955a6985 --- /dev/null +++ b/services/iaas/v2api/model_destination_prefix_list_type.go @@ -0,0 +1,112 @@ +/* +STACKIT IaaS API + +This API allows you to create and modify IaaS resources. + +API version: 2 +Contact: stackit-iaas@mail.schwarz +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" + "fmt" +) + +// DestinationPrefixListType the model 'DestinationPrefixListType' +type DestinationPrefixListType string + +// List of DestinationPrefixList_type +const ( + DESTINATIONPREFIXLISTTYPE_PREFIXLIST DestinationPrefixListType = "prefixlist" + DESTINATIONPREFIXLISTTYPE_UNKNOWN_DEFAULT_OPEN_API DestinationPrefixListType = "unknown_default_open_api" +) + +// All allowed values of DestinationPrefixListType enum +var AllowedDestinationPrefixListTypeEnumValues = []DestinationPrefixListType{ + "prefixlist", + "unknown_default_open_api", +} + +func (v *DestinationPrefixListType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DestinationPrefixListType(value) + for _, existing := range AllowedDestinationPrefixListTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = DESTINATIONPREFIXLISTTYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewDestinationPrefixListTypeFromValue returns a pointer to a valid DestinationPrefixListType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDestinationPrefixListTypeFromValue(v string) (*DestinationPrefixListType, error) { + ev := DestinationPrefixListType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DestinationPrefixListType: valid values are %v", v, AllowedDestinationPrefixListTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DestinationPrefixListType) IsValid() bool { + for _, existing := range AllowedDestinationPrefixListTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DestinationPrefixList_type value +func (v DestinationPrefixListType) Ptr() *DestinationPrefixListType { + return &v +} + +type NullableDestinationPrefixListType struct { + value *DestinationPrefixListType + isSet bool +} + +func (v NullableDestinationPrefixListType) Get() *DestinationPrefixListType { + return v.value +} + +func (v *NullableDestinationPrefixListType) Set(val *DestinationPrefixListType) { + v.value = val + v.isSet = true +} + +func (v NullableDestinationPrefixListType) IsSet() bool { + return v.isSet +} + +func (v *NullableDestinationPrefixListType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDestinationPrefixListType(val *DestinationPrefixListType) *NullableDestinationPrefixListType { + return &NullableDestinationPrefixListType{value: val, isSet: true} +} + +func (v NullableDestinationPrefixListType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDestinationPrefixListType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2api/model_image_from_volume_payload.go b/services/iaas/v2api/model_image_from_volume_payload.go index aa262ae834..a953185d96 100644 --- a/services/iaas/v2api/model_image_from_volume_payload.go +++ b/services/iaas/v2api/model_image_from_volume_payload.go @@ -23,7 +23,7 @@ var _ MappedNullable = &ImageFromVolumePayload{} type ImageFromVolumePayload struct { // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. DiskFormat string `json:"diskFormat"` - // When true the image is force created from a volume is currently being used. + // When true the image is force created from a volume that is currently being used. Force *bool `json:"force,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_route_destination.go b/services/iaas/v2api/model_route_destination.go index 78bd9ee92e..dda50f3f6c 100644 --- a/services/iaas/v2api/model_route_destination.go +++ b/services/iaas/v2api/model_route_destination.go @@ -18,8 +18,9 @@ import ( // RouteDestination - struct for RouteDestination type RouteDestination struct { - DestinationCIDRv4 *DestinationCIDRv4 - DestinationCIDRv6 *DestinationCIDRv6 + DestinationCIDRv4 *DestinationCIDRv4 + DestinationCIDRv6 *DestinationCIDRv6 + DestinationPrefixList *DestinationPrefixList } // DestinationCIDRv4AsRouteDestination is a convenience function that returns DestinationCIDRv4 wrapped in RouteDestination @@ -36,6 +37,13 @@ func DestinationCIDRv6AsRouteDestination(v *DestinationCIDRv6) RouteDestination } } +// DestinationPrefixListAsRouteDestination is a convenience function that returns DestinationPrefixList wrapped in RouteDestination +func DestinationPrefixListAsRouteDestination(v *DestinationPrefixList) RouteDestination { + return RouteDestination{ + DestinationPrefixList: v, + } +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *RouteDestination) UnmarshalJSON(data []byte) error { var err error @@ -70,6 +78,18 @@ func (dst *RouteDestination) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'prefixlist' + if jsonDict["type"] == "prefixlist" { + // try to unmarshal JSON data into DestinationPrefixList + err = json.Unmarshal(data, &dst.DestinationPrefixList) + if err == nil { + return nil // data stored in dst.DestinationPrefixList, return on the first match + } else { + dst.DestinationPrefixList = nil + return fmt.Errorf("failed to unmarshal RouteDestination as DestinationPrefixList: %s", err.Error()) + } + } + return nil } @@ -83,6 +103,10 @@ func (src RouteDestination) MarshalJSON() ([]byte, error) { return json.Marshal(&src.DestinationCIDRv6) } + if src.DestinationPrefixList != nil { + return json.Marshal(&src.DestinationPrefixList) + } + return nil, nil // no data in oneOf schemas } @@ -99,6 +123,10 @@ func (obj *RouteDestination) GetActualInstance() interface{} { return obj.DestinationCIDRv6 } + if obj.DestinationPrefixList != nil { + return obj.DestinationPrefixList + } + // all schemas are nil return nil } @@ -113,6 +141,10 @@ func (obj RouteDestination) GetActualInstanceValue() interface{} { return *obj.DestinationCIDRv6 } + if obj.DestinationPrefixList != nil { + return *obj.DestinationPrefixList + } + // all schemas are nil return nil } diff --git a/services/iaas/v2api/model_server_agent.go b/services/iaas/v2api/model_server_agent.go index b4b0f7867d..3d5238534b 100644 --- a/services/iaas/v2api/model_server_agent.go +++ b/services/iaas/v2api/model_server_agent.go @@ -20,8 +20,10 @@ var _ MappedNullable = &ServerAgent{} // ServerAgent STACKIT server agent options for a server. type ServerAgent struct { - // Configure the STACKIT server agent provisioning during the first boot of the server. Only works when booting from an images that supports the STACKIT server agent. When `false` the agent IS NOT installed. When `true` the agent IS installed. When its not set the result depend on the used image and its default provisioning setting. - Provisioned *bool `json:"provisioned,omitempty"` + // Configure the STACKIT server agent provisioning during the first boot of the server. When `false`, the agent is not installed. When `true`, the agent is installed. Setting it to `true` when booting from an image requires an image that supports the agent; otherwise, the request is rejected. If omitted when booting from an image, the image default (`provisionByDefault`) applies. + Provisioned *bool `json:"provisioned,omitempty"` + // Configuration property that controls whether active virtual machine monitoring is enabled for a server instance. When `true` it allows the platform to collect metrics, monitor system health, and track guest-level performance on the VM. It operates as a dependent option - meaning `vmMonitoring` cannot be active unless the main server agent is also enabled. + VmMonitoring *bool `json:"vmMonitoring,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,6 +78,38 @@ func (o *ServerAgent) SetProvisioned(v bool) { o.Provisioned = &v } +// GetVmMonitoring returns the VmMonitoring field value if set, zero value otherwise. +func (o *ServerAgent) GetVmMonitoring() bool { + if o == nil || IsNil(o.VmMonitoring) { + var ret bool + return ret + } + return *o.VmMonitoring +} + +// GetVmMonitoringOk returns a tuple with the VmMonitoring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerAgent) GetVmMonitoringOk() (*bool, bool) { + if o == nil || IsNil(o.VmMonitoring) { + return nil, false + } + return o.VmMonitoring, true +} + +// HasVmMonitoring returns a boolean if a field has been set. +func (o *ServerAgent) HasVmMonitoring() bool { + if o != nil && !IsNil(o.VmMonitoring) { + return true + } + + return false +} + +// SetVmMonitoring gets a reference to the given bool and assigns it to the VmMonitoring field. +func (o *ServerAgent) SetVmMonitoring(v bool) { + o.VmMonitoring = &v +} + func (o ServerAgent) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -89,6 +123,9 @@ func (o ServerAgent) ToMap() (map[string]interface{}, error) { if !IsNil(o.Provisioned) { toSerialize["provisioned"] = o.Provisioned } + if !IsNil(o.VmMonitoring) { + toSerialize["vmMonitoring"] = o.VmMonitoring + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -112,6 +149,7 @@ func (o *ServerAgent) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "provisioned") + delete(additionalProperties, "vmMonitoring") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_snapshot.go b/services/iaas/v2api/model_snapshot.go index 093c881161..3d6d845051 100644 --- a/services/iaas/v2api/model_snapshot.go +++ b/services/iaas/v2api/model_snapshot.go @@ -28,6 +28,8 @@ type Snapshot struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` + // Indicates if a volume is encrypted. + Encrypted *bool `json:"encrypted,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents the labels as key-value pairs of a resource. Key constraints: - May contain an optional domain prefix separated by a slash (`/`). - Domain prefix must be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 and 63 characters. - Must begin and end with an alphanumerical character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - Keys starting with the prefix `stackit-` or having a domain prefix of `stackit.cloud` (including its subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value constraints: - Must be less than or equal to 63 characters long (can be empty). - If not empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are excluded from this count. Providing a `null` value for a key will remove that key. @@ -161,6 +163,38 @@ func (o *Snapshot) SetDescription(v string) { o.Description = &v } +// GetEncrypted returns the Encrypted field value if set, zero value otherwise. +func (o *Snapshot) GetEncrypted() bool { + if o == nil || IsNil(o.Encrypted) { + var ret bool + return ret + } + return *o.Encrypted +} + +// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Snapshot) GetEncryptedOk() (*bool, bool) { + if o == nil || IsNil(o.Encrypted) { + return nil, false + } + return o.Encrypted, true +} + +// HasEncrypted returns a boolean if a field has been set. +func (o *Snapshot) HasEncrypted() bool { + if o != nil && !IsNil(o.Encrypted) { + return true + } + + return false +} + +// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. +func (o *Snapshot) SetEncrypted(v bool) { + o.Encrypted = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Snapshot) GetId() string { if o == nil || IsNil(o.Id) { @@ -396,6 +430,9 @@ func (o Snapshot) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Encrypted) { + toSerialize["encrypted"] = o.Encrypted + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -461,6 +498,7 @@ func (o *Snapshot) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "availabilityZone") delete(additionalProperties, "createdAt") delete(additionalProperties, "description") + delete(additionalProperties, "encrypted") delete(additionalProperties, "id") delete(additionalProperties, "labels") delete(additionalProperties, "name") diff --git a/services/iaas/v2beta1api/model_destination_prefix_list.go b/services/iaas/v2beta1api/model_destination_prefix_list.go new file mode 100644 index 0000000000..2c06661da2 --- /dev/null +++ b/services/iaas/v2beta1api/model_destination_prefix_list.go @@ -0,0 +1,197 @@ +/* +STACKIT IaaS API + +This API allows you to create and modify IaaS resources. + +API version: 2beta1 +Contact: stackit-iaas@mail.schwarz +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2beta1api + +import ( + "encoding/json" + "fmt" +) + +// checks if the DestinationPrefixList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DestinationPrefixList{} + +// DestinationPrefixList Prefix List destination reference object. +type DestinationPrefixList struct { + Type DestinationPrefixListType `json:"type"` + // Universally Unique Identifier (UUID). + Value string `json:"value" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + AdditionalProperties map[string]interface{} +} + +type _DestinationPrefixList DestinationPrefixList + +// NewDestinationPrefixList instantiates a new DestinationPrefixList object +// 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 NewDestinationPrefixList(types DestinationPrefixListType, value string) *DestinationPrefixList { + this := DestinationPrefixList{} + this.Type = types + this.Value = value + return &this +} + +// NewDestinationPrefixListWithDefaults instantiates a new DestinationPrefixList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDestinationPrefixListWithDefaults() *DestinationPrefixList { + this := DestinationPrefixList{} + return &this +} + +// GetType returns the Type field value +func (o *DestinationPrefixList) GetType() DestinationPrefixListType { + if o == nil { + var ret DestinationPrefixListType + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DestinationPrefixList) GetTypeOk() (*DestinationPrefixListType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DestinationPrefixList) SetType(v DestinationPrefixListType) { + o.Type = v +} + +// GetValue returns the Value field value +func (o *DestinationPrefixList) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *DestinationPrefixList) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *DestinationPrefixList) SetValue(v string) { + o.Value = v +} + +func (o DestinationPrefixList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DestinationPrefixList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DestinationPrefixList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDestinationPrefixList := _DestinationPrefixList{} + + err = json.Unmarshal(data, &varDestinationPrefixList) + + if err != nil { + return err + } + + *o = DestinationPrefixList(varDestinationPrefixList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDestinationPrefixList struct { + value *DestinationPrefixList + isSet bool +} + +func (v NullableDestinationPrefixList) Get() *DestinationPrefixList { + return v.value +} + +func (v *NullableDestinationPrefixList) Set(val *DestinationPrefixList) { + v.value = val + v.isSet = true +} + +func (v NullableDestinationPrefixList) IsSet() bool { + return v.isSet +} + +func (v *NullableDestinationPrefixList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDestinationPrefixList(val *DestinationPrefixList) *NullableDestinationPrefixList { + return &NullableDestinationPrefixList{value: val, isSet: true} +} + +func (v NullableDestinationPrefixList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDestinationPrefixList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2beta1api/model_destination_prefix_list_type.go b/services/iaas/v2beta1api/model_destination_prefix_list_type.go new file mode 100644 index 0000000000..12fbf4ea2e --- /dev/null +++ b/services/iaas/v2beta1api/model_destination_prefix_list_type.go @@ -0,0 +1,112 @@ +/* +STACKIT IaaS API + +This API allows you to create and modify IaaS resources. + +API version: 2beta1 +Contact: stackit-iaas@mail.schwarz +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2beta1api + +import ( + "encoding/json" + "fmt" +) + +// DestinationPrefixListType the model 'DestinationPrefixListType' +type DestinationPrefixListType string + +// List of DestinationPrefixList_type +const ( + DESTINATIONPREFIXLISTTYPE_PREFIXLIST DestinationPrefixListType = "prefixlist" + DESTINATIONPREFIXLISTTYPE_UNKNOWN_DEFAULT_OPEN_API DestinationPrefixListType = "unknown_default_open_api" +) + +// All allowed values of DestinationPrefixListType enum +var AllowedDestinationPrefixListTypeEnumValues = []DestinationPrefixListType{ + "prefixlist", + "unknown_default_open_api", +} + +func (v *DestinationPrefixListType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DestinationPrefixListType(value) + for _, existing := range AllowedDestinationPrefixListTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = DESTINATIONPREFIXLISTTYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewDestinationPrefixListTypeFromValue returns a pointer to a valid DestinationPrefixListType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDestinationPrefixListTypeFromValue(v string) (*DestinationPrefixListType, error) { + ev := DestinationPrefixListType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DestinationPrefixListType: valid values are %v", v, AllowedDestinationPrefixListTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DestinationPrefixListType) IsValid() bool { + for _, existing := range AllowedDestinationPrefixListTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DestinationPrefixList_type value +func (v DestinationPrefixListType) Ptr() *DestinationPrefixListType { + return &v +} + +type NullableDestinationPrefixListType struct { + value *DestinationPrefixListType + isSet bool +} + +func (v NullableDestinationPrefixListType) Get() *DestinationPrefixListType { + return v.value +} + +func (v *NullableDestinationPrefixListType) Set(val *DestinationPrefixListType) { + v.value = val + v.isSet = true +} + +func (v NullableDestinationPrefixListType) IsSet() bool { + return v.isSet +} + +func (v *NullableDestinationPrefixListType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDestinationPrefixListType(val *DestinationPrefixListType) *NullableDestinationPrefixListType { + return &NullableDestinationPrefixListType{value: val, isSet: true} +} + +func (v NullableDestinationPrefixListType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDestinationPrefixListType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2beta1api/model_route_destination.go b/services/iaas/v2beta1api/model_route_destination.go index 70f770633e..47e1d77cee 100644 --- a/services/iaas/v2beta1api/model_route_destination.go +++ b/services/iaas/v2beta1api/model_route_destination.go @@ -18,8 +18,9 @@ import ( // RouteDestination - struct for RouteDestination type RouteDestination struct { - DestinationCIDRv4 *DestinationCIDRv4 - DestinationCIDRv6 *DestinationCIDRv6 + DestinationCIDRv4 *DestinationCIDRv4 + DestinationCIDRv6 *DestinationCIDRv6 + DestinationPrefixList *DestinationPrefixList } // DestinationCIDRv4AsRouteDestination is a convenience function that returns DestinationCIDRv4 wrapped in RouteDestination @@ -36,6 +37,13 @@ func DestinationCIDRv6AsRouteDestination(v *DestinationCIDRv6) RouteDestination } } +// DestinationPrefixListAsRouteDestination is a convenience function that returns DestinationPrefixList wrapped in RouteDestination +func DestinationPrefixListAsRouteDestination(v *DestinationPrefixList) RouteDestination { + return RouteDestination{ + DestinationPrefixList: v, + } +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *RouteDestination) UnmarshalJSON(data []byte) error { var err error @@ -70,6 +78,18 @@ func (dst *RouteDestination) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'prefixlist' + if jsonDict["type"] == "prefixlist" { + // try to unmarshal JSON data into DestinationPrefixList + err = json.Unmarshal(data, &dst.DestinationPrefixList) + if err == nil { + return nil // data stored in dst.DestinationPrefixList, return on the first match + } else { + dst.DestinationPrefixList = nil + return fmt.Errorf("failed to unmarshal RouteDestination as DestinationPrefixList: %s", err.Error()) + } + } + return nil } @@ -83,6 +103,10 @@ func (src RouteDestination) MarshalJSON() ([]byte, error) { return json.Marshal(&src.DestinationCIDRv6) } + if src.DestinationPrefixList != nil { + return json.Marshal(&src.DestinationPrefixList) + } + return nil, nil // no data in oneOf schemas } @@ -99,6 +123,10 @@ func (obj *RouteDestination) GetActualInstance() interface{} { return obj.DestinationCIDRv6 } + if obj.DestinationPrefixList != nil { + return obj.DestinationPrefixList + } + // all schemas are nil return nil } @@ -113,6 +141,10 @@ func (obj RouteDestination) GetActualInstanceValue() interface{} { return *obj.DestinationCIDRv6 } + if obj.DestinationPrefixList != nil { + return *obj.DestinationPrefixList + } + // all schemas are nil return nil } diff --git a/services/iaas/v2beta1api/model_server_agent.go b/services/iaas/v2beta1api/model_server_agent.go index a3b1efbff1..31078d60dc 100644 --- a/services/iaas/v2beta1api/model_server_agent.go +++ b/services/iaas/v2beta1api/model_server_agent.go @@ -20,8 +20,10 @@ var _ MappedNullable = &ServerAgent{} // ServerAgent STACKIT server agent options for a server. type ServerAgent struct { - // Configure the STACKIT server agent provisioning during the first boot of the server. Only works when booting from an images that supports the STACKIT server agent. When `false` the agent IS NOT installed. When `true` the agent IS installed. When its not set the result depend on the used image and its default provisioning setting. - Provisioned *bool `json:"provisioned,omitempty"` + // Configure the STACKIT server agent provisioning during the first boot of the server. When `false`, the agent is not installed. When `true`, the agent is installed. Setting it to `true` when booting from an image requires an image that supports the agent; otherwise, the request is rejected. If omitted when booting from an image, the image default (`provisionByDefault`) applies. + Provisioned *bool `json:"provisioned,omitempty"` + // Configuration property that controls whether active virtual machine monitoring is enabled for a server instance. When `true` it allows the platform to collect metrics, monitor system health, and track guest-level performance on the VM. It operates as a dependent option - meaning `vmMonitoring` cannot be active unless the main server agent is also enabled. + VmMonitoring *bool `json:"vmMonitoring,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,6 +78,38 @@ func (o *ServerAgent) SetProvisioned(v bool) { o.Provisioned = &v } +// GetVmMonitoring returns the VmMonitoring field value if set, zero value otherwise. +func (o *ServerAgent) GetVmMonitoring() bool { + if o == nil || IsNil(o.VmMonitoring) { + var ret bool + return ret + } + return *o.VmMonitoring +} + +// GetVmMonitoringOk returns a tuple with the VmMonitoring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerAgent) GetVmMonitoringOk() (*bool, bool) { + if o == nil || IsNil(o.VmMonitoring) { + return nil, false + } + return o.VmMonitoring, true +} + +// HasVmMonitoring returns a boolean if a field has been set. +func (o *ServerAgent) HasVmMonitoring() bool { + if o != nil && !IsNil(o.VmMonitoring) { + return true + } + + return false +} + +// SetVmMonitoring gets a reference to the given bool and assigns it to the VmMonitoring field. +func (o *ServerAgent) SetVmMonitoring(v bool) { + o.VmMonitoring = &v +} + func (o ServerAgent) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -89,6 +123,9 @@ func (o ServerAgent) ToMap() (map[string]interface{}, error) { if !IsNil(o.Provisioned) { toSerialize["provisioned"] = o.Provisioned } + if !IsNil(o.VmMonitoring) { + toSerialize["vmMonitoring"] = o.VmMonitoring + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -112,6 +149,7 @@ func (o *ServerAgent) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "provisioned") + delete(additionalProperties, "vmMonitoring") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_snapshot.go b/services/iaas/v2beta1api/model_snapshot.go index 26eeed0276..515c384b6d 100644 --- a/services/iaas/v2beta1api/model_snapshot.go +++ b/services/iaas/v2beta1api/model_snapshot.go @@ -28,6 +28,8 @@ type Snapshot struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` + // Indicates if a volume is encrypted. + Encrypted *bool `json:"encrypted,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents the labels as key-value pairs of a resource. Key constraints: - May contain an optional domain prefix separated by a slash (`/`). - Domain prefix must be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 and 63 characters. - Must begin and end with an alphanumerical character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - Keys starting with the prefix `stackit-` or having a domain prefix of `stackit.cloud` (including its subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value constraints: - Must be less than or equal to 63 characters long (can be empty). - If not empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are excluded from this count. Providing a `null` value for a key will remove that key. @@ -161,6 +163,38 @@ func (o *Snapshot) SetDescription(v string) { o.Description = &v } +// GetEncrypted returns the Encrypted field value if set, zero value otherwise. +func (o *Snapshot) GetEncrypted() bool { + if o == nil || IsNil(o.Encrypted) { + var ret bool + return ret + } + return *o.Encrypted +} + +// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Snapshot) GetEncryptedOk() (*bool, bool) { + if o == nil || IsNil(o.Encrypted) { + return nil, false + } + return o.Encrypted, true +} + +// HasEncrypted returns a boolean if a field has been set. +func (o *Snapshot) HasEncrypted() bool { + if o != nil && !IsNil(o.Encrypted) { + return true + } + + return false +} + +// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. +func (o *Snapshot) SetEncrypted(v bool) { + o.Encrypted = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Snapshot) GetId() string { if o == nil || IsNil(o.Id) { @@ -396,6 +430,9 @@ func (o Snapshot) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Encrypted) { + toSerialize["encrypted"] = o.Encrypted + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -461,6 +498,7 @@ func (o *Snapshot) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "availabilityZone") delete(additionalProperties, "createdAt") delete(additionalProperties, "description") + delete(additionalProperties, "encrypted") delete(additionalProperties, "id") delete(additionalProperties, "labels") delete(additionalProperties, "name") diff --git a/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go b/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go index af21f770f8..1e899bcbad 100644 --- a/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go @@ -28,6 +28,8 @@ type V2beta1CreateSnapshotPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` + // Indicates if a volume is encrypted. + Encrypted *bool `json:"encrypted,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents the labels as key-value pairs of a resource. Key constraints: - May contain an optional domain prefix separated by a slash (`/`). - Domain prefix must be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 and 63 characters. - Must begin and end with an alphanumerical character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - Keys starting with the prefix `stackit-` or having a domain prefix of `stackit.cloud` (including its subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value constraints: - Must be less than or equal to 63 characters long (can be empty). - If not empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are excluded from this count. Providing a `null` value for a key will remove that key. @@ -161,6 +163,38 @@ func (o *V2beta1CreateSnapshotPayload) SetDescription(v string) { o.Description = &v } +// GetEncrypted returns the Encrypted field value if set, zero value otherwise. +func (o *V2beta1CreateSnapshotPayload) GetEncrypted() bool { + if o == nil || IsNil(o.Encrypted) { + var ret bool + return ret + } + return *o.Encrypted +} + +// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *V2beta1CreateSnapshotPayload) GetEncryptedOk() (*bool, bool) { + if o == nil || IsNil(o.Encrypted) { + return nil, false + } + return o.Encrypted, true +} + +// HasEncrypted returns a boolean if a field has been set. +func (o *V2beta1CreateSnapshotPayload) HasEncrypted() bool { + if o != nil && !IsNil(o.Encrypted) { + return true + } + + return false +} + +// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. +func (o *V2beta1CreateSnapshotPayload) SetEncrypted(v bool) { + o.Encrypted = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *V2beta1CreateSnapshotPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -396,6 +430,9 @@ func (o V2beta1CreateSnapshotPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Encrypted) { + toSerialize["encrypted"] = o.Encrypted + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -461,6 +498,7 @@ func (o *V2beta1CreateSnapshotPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "availabilityZone") delete(additionalProperties, "createdAt") delete(additionalProperties, "description") + delete(additionalProperties, "encrypted") delete(additionalProperties, "id") delete(additionalProperties, "labels") delete(additionalProperties, "name")