diff --git a/services/iaas/go.mod b/services/iaas/go.mod index 06df220dc2..f690976ca5 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.0 + github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.26.1 ) require ( diff --git a/services/iaas/go.sum b/services/iaas/go.sum index fdd4a635df..aa241359ee 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.0 h1:TzmBTja200jx6An39UPYBZPvZvLFgk3g1S0XZ1vDeBI= -github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.26.0/go.mod h1:Y5EM8b9qe/+AKI2LJoFvI0PzkyHO5RiW8nQuQaaNaFA= +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= diff --git a/services/iaas/model_add_routing_table_to_area_payload.go b/services/iaas/model_add_routing_table_to_area_payload.go index cbeb1960dc..2d6689bf1d 100644 --- a/services/iaas/model_add_routing_table_to_area_payload.go +++ b/services/iaas/model_add_routing_table_to_area_payload.go @@ -275,7 +275,7 @@ type AddRoutingTableToAreaPayload struct { DynamicRoutes AddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType `json:"dynamicRoutes,omitempty"` // Universally Unique Identifier (UUID). Id AddRoutingTableToAreaPayloadGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels AddRoutingTableToAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_backup.go b/services/iaas/model_backup.go index ff5a93f2b9..6af91fea33 100644 --- a/services/iaas/model_backup.go +++ b/services/iaas/model_backup.go @@ -356,7 +356,7 @@ type Backup struct { Encrypted BackupgetEncryptedAttributeType `json:"encrypted,omitempty"` // Universally Unique Identifier (UUID). Id BackupGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels BackupGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name BackupGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_create_backup_payload.go b/services/iaas/model_create_backup_payload.go index 8f2f7c2599..e49715e160 100644 --- a/services/iaas/model_create_backup_payload.go +++ b/services/iaas/model_create_backup_payload.go @@ -131,7 +131,7 @@ func setCreateBackupPayloadGetSourceAttributeType(arg *CreateBackupPayloadGetSou type CreateBackupPayload struct { // Description Object. Allows string up to 255 Characters. Description CreateBackupPayloadGetDescriptionAttributeType `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateBackupPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name CreateBackupPayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_create_image_payload.go b/services/iaas/model_create_image_payload.go index 72143da246..edd51a8f59 100644 --- a/services/iaas/model_create_image_payload.go +++ b/services/iaas/model_create_image_payload.go @@ -493,7 +493,7 @@ type CreateImagePayload struct { Id CreateImagePayloadGetIdAttributeType `json:"id,omitempty"` // Indicates Image Import Progress in percent. ImportProgress CreateImagePayloadGetImportProgressAttributeType `json:"importProgress,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateImagePayloadGetLabelsAttributeType `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize CreateImagePayloadGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"` diff --git a/services/iaas/model_create_isolated_network_payload.go b/services/iaas/model_create_isolated_network_payload.go index cc6a8cad48..c4f6f99250 100644 --- a/services/iaas/model_create_isolated_network_payload.go +++ b/services/iaas/model_create_isolated_network_payload.go @@ -132,7 +132,7 @@ type CreateIsolatedNetworkPayload struct { // Enable or disable DHCP for a network. Dhcp CreateIsolatedNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"` Ipv4 CreateIsolatedNetworkPayloadGetIpv4AttributeType `json:"ipv4,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateIsolatedNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_create_key_pair_payload.go b/services/iaas/model_create_key_pair_payload.go index e51c6fe716..cb9cbf8332 100644 --- a/services/iaas/model_create_key_pair_payload.go +++ b/services/iaas/model_create_key_pair_payload.go @@ -188,7 +188,7 @@ type CreateKeyPairPayload struct { CreatedAt CreateKeyPairPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint CreateKeyPairPayloadGetFingerprintAttributeType `json:"fingerprint,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateKeyPairPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name CreateKeyPairPayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_create_network_area_payload.go b/services/iaas/model_create_network_area_payload.go index 35bb9473d6..9adc9c6bfe 100644 --- a/services/iaas/model_create_network_area_payload.go +++ b/services/iaas/model_create_network_area_payload.go @@ -75,7 +75,7 @@ type CreateNetworkAreaPayloadGetNameRetType = string // CreateNetworkAreaPayload Object that represents the network area create request. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateNetworkAreaPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateNetworkAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"` // REQUIRED Name CreateNetworkAreaPayloadGetNameAttributeType `json:"name" required:"true"` diff --git a/services/iaas/model_create_network_payload.go b/services/iaas/model_create_network_payload.go index 7feccbedfa..6f1ecb0b2b 100644 --- a/services/iaas/model_create_network_payload.go +++ b/services/iaas/model_create_network_payload.go @@ -18,6 +18,33 @@ import ( // checks if the CreateNetworkPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateNetworkPayload{} +/* + types and functions for description +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNetworkPayloadGetDescriptionAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateNetworkPayloadGetDescriptionAttributeTypeOk(arg CreateNetworkPayloadGetDescriptionAttributeType) (ret CreateNetworkPayloadGetDescriptionRetType, 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 setCreateNetworkPayloadGetDescriptionAttributeType(arg *CreateNetworkPayloadGetDescriptionAttributeType, val CreateNetworkPayloadGetDescriptionRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNetworkPayloadGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNetworkPayloadGetDescriptionRetType = string + /* types and functions for dhcp */ @@ -237,11 +264,13 @@ type CreateNetworkPayloadGetVpcIdRetType = string // CreateNetworkPayload Object that represents the request body for a network create. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateNetworkPayload struct { + // Description Object. Allows string up to 255 Characters. + Description CreateNetworkPayloadGetDescriptionAttributeType `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp CreateNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"` Ipv4 CreateNetworkPayloadGetIpv4AttributeType `json:"ipv4,omitempty"` Ipv6 CreateNetworkPayloadGetIpv6AttributeType `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED @@ -279,6 +308,33 @@ func NewCreateNetworkPayloadWithDefaults() *CreateNetworkPayload { return &this } +// GetDescription returns the Description 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 *CreateNetworkPayload) GetDescription() (res CreateNetworkPayloadGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return +} + +// GetDescriptionOk returns a tuple with the Description 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 *CreateNetworkPayload) GetDescriptionOk() (ret CreateNetworkPayloadGetDescriptionRetType, ok bool) { + return getCreateNetworkPayloadGetDescriptionAttributeTypeOk(o.Description) +} + +// HasDescription 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 *CreateNetworkPayload) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateNetworkPayload) SetDescription(v CreateNetworkPayloadGetDescriptionRetType) { + setCreateNetworkPayloadGetDescriptionAttributeType(&o.Description, v) +} + // GetDhcp returns the Dhcp 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 *CreateNetworkPayload) GetDhcp() (res CreateNetworkPayloadgetDhcpRetType) { @@ -491,6 +547,9 @@ func (o *CreateNetworkPayload) SetVpcId(v CreateNetworkPayloadGetVpcIdRetType) { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateNetworkPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getCreateNetworkPayloadGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } if val, ok := getCreateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok { toSerialize["Dhcp"] = val } diff --git a/services/iaas/model_create_nic_payload.go b/services/iaas/model_create_nic_payload.go index 35285e7f17..0d720f0b0d 100644 --- a/services/iaas/model_create_nic_payload.go +++ b/services/iaas/model_create_nic_payload.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "time" ) // checks if the CreateNicPayload type satisfies the MappedNullable interface at compile time @@ -45,6 +46,33 @@ func setCreateNicPayloadGetAllowedAddressesAttributeType(arg *CreateNicPayloadGe *arg = &val } +/* + types and functions for createdAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNicPayloadGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNicPayloadGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNicPayloadGetCreatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateNicPayloadGetCreatedAtAttributeTypeOk(arg CreateNicPayloadGetCreatedAtAttributeType) (ret CreateNicPayloadGetCreatedAtRetType, 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 setCreateNicPayloadGetCreatedAtAttributeType(arg *CreateNicPayloadGetCreatedAtAttributeType, val CreateNicPayloadGetCreatedAtRetType) { + *arg = &val +} + /* types and functions for description */ @@ -396,11 +424,40 @@ type CreateNicPayloadGetTypeArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateNicPayloadGetTypeRetType = string +/* + types and functions for updatedAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNicPayloadGetUpdatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNicPayloadGetUpdatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateNicPayloadGetUpdatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateNicPayloadGetUpdatedAtAttributeTypeOk(arg CreateNicPayloadGetUpdatedAtAttributeType) (ret CreateNicPayloadGetUpdatedAtRetType, 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 setCreateNicPayloadGetUpdatedAtAttributeType(arg *CreateNicPayloadGetUpdatedAtAttributeType, val CreateNicPayloadGetUpdatedAtRetType) { + *arg = &val +} + // CreateNicPayload Object that represents a network interface. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateNicPayload struct { // A list of IPs or CIDR notations. AllowedAddresses CreateNicPayloadGetAllowedAddressesAttributeType `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt CreateNicPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description CreateNicPayloadGetDescriptionAttributeType `json:"description,omitempty"` // Universally Unique Identifier (UUID). @@ -411,7 +468,7 @@ type CreateNicPayload struct { Ipv4 CreateNicPayloadGetIpv4AttributeType `json:"ipv4,omitempty"` // String that represents an IPv6 address. Ipv6 CreateNicPayloadGetIpv6AttributeType `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateNicPayloadGetLabelsAttributeType `json:"labels,omitempty"` // Object that represents an MAC address. Mac CreateNicPayloadGetMacAttributeType `json:"mac,omitempty"` @@ -427,6 +484,8 @@ type CreateNicPayload struct { Status CreateNicPayloadGetStatusAttributeType `json:"status,omitempty"` // Possible values: `server`, `metadata`, `gateway`, `none`. Type CreateNicPayloadGetTypeAttributeType `json:"type,omitempty"` + // Date-time when resource was last updated. + UpdatedAt CreateNicPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` } // NewCreateNicPayload instantiates a new CreateNicPayload object @@ -477,6 +536,33 @@ func (o *CreateNicPayload) SetAllowedAddresses(v CreateNicPayloadGetAllowedAddre setCreateNicPayloadGetAllowedAddressesAttributeType(&o.AllowedAddresses, v) } +// GetCreatedAt returns the CreatedAt 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 *CreateNicPayload) GetCreatedAt() (res CreateNicPayloadGetCreatedAtRetType) { + res, _ = o.GetCreatedAtOk() + return +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *CreateNicPayload) GetCreatedAtOk() (ret CreateNicPayloadGetCreatedAtRetType, ok bool) { + return getCreateNicPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// HasCreatedAt 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 *CreateNicPayload) HasCreatedAt() bool { + _, ok := o.GetCreatedAtOk() + return ok +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateNicPayload) SetCreatedAt(v CreateNicPayloadGetCreatedAtRetType) { + setCreateNicPayloadGetCreatedAtAttributeType(&o.CreatedAt, v) +} + // GetDescription returns the Description 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 *CreateNicPayload) GetDescription() (res CreateNicPayloadGetDescriptionRetType) { @@ -828,12 +914,42 @@ func (o *CreateNicPayload) SetType(v CreateNicPayloadGetTypeRetType) { setCreateNicPayloadGetTypeAttributeType(&o.Type, v) } +// GetUpdatedAt returns the UpdatedAt 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 *CreateNicPayload) GetUpdatedAt() (res CreateNicPayloadGetUpdatedAtRetType) { + res, _ = o.GetUpdatedAtOk() + return +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *CreateNicPayload) GetUpdatedAtOk() (ret CreateNicPayloadGetUpdatedAtRetType, ok bool) { + return getCreateNicPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// HasUpdatedAt 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 *CreateNicPayload) HasUpdatedAt() bool { + _, ok := o.GetUpdatedAtOk() + return ok +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateNicPayload) SetUpdatedAt(v CreateNicPayloadGetUpdatedAtRetType) { + setCreateNicPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateNicPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses); ok { toSerialize["AllowedAddresses"] = val } + if val, ok := getCreateNicPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } if val, ok := getCreateNicPayloadGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } @@ -873,6 +989,9 @@ func (o CreateNicPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateNicPayloadGetTypeAttributeTypeOk(o.Type); ok { toSerialize["Type"] = val } + if val, ok := getCreateNicPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } return toSerialize, nil } diff --git a/services/iaas/model_create_public_ip_payload.go b/services/iaas/model_create_public_ip_payload.go index 87682b9097..ff96449438 100644 --- a/services/iaas/model_create_public_ip_payload.go +++ b/services/iaas/model_create_public_ip_payload.go @@ -13,11 +13,39 @@ package iaas import ( "encoding/json" + "time" ) // checks if the CreatePublicIPPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreatePublicIPPayload{} +/* + types and functions for createdAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreatePublicIPPayloadGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreatePublicIPPayloadGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreatePublicIPPayloadGetCreatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreatePublicIPPayloadGetCreatedAtAttributeTypeOk(arg CreatePublicIPPayloadGetCreatedAtAttributeType) (ret CreatePublicIPPayloadGetCreatedAtRetType, 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 setCreatePublicIPPayloadGetCreatedAtAttributeType(arg *CreatePublicIPPayloadGetCreatedAtAttributeType, val CreatePublicIPPayloadGetCreatedAtRetType) { + *arg = &val +} + /* types and functions for id */ @@ -130,17 +158,48 @@ type CreatePublicIPPayloadGetNetworkInterfaceArgType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreatePublicIPPayloadGetNetworkInterfaceRetType = *string +/* + types and functions for updatedAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreatePublicIPPayloadGetUpdatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreatePublicIPPayloadGetUpdatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreatePublicIPPayloadGetUpdatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreatePublicIPPayloadGetUpdatedAtAttributeTypeOk(arg CreatePublicIPPayloadGetUpdatedAtAttributeType) (ret CreatePublicIPPayloadGetUpdatedAtRetType, 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 setCreatePublicIPPayloadGetUpdatedAtAttributeType(arg *CreatePublicIPPayloadGetUpdatedAtAttributeType, val CreatePublicIPPayloadGetUpdatedAtRetType) { + *arg = &val +} + // CreatePublicIPPayload Object that represents a public IP. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreatePublicIPPayload struct { + // Date-time when resource was created. + CreatedAt CreatePublicIPPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). Id CreatePublicIPPayloadGetIdAttributeType `json:"id,omitempty"` // String that represents an IPv4 address. Ip CreatePublicIPPayloadGetIpAttributeType `json:"ip,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreatePublicIPPayloadGetLabelsAttributeType `json:"labels,omitempty"` // Universally Unique Identifier (UUID). NetworkInterface CreatePublicIPPayloadGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"` + // Date-time when resource was last updated. + UpdatedAt CreatePublicIPPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` } // NewCreatePublicIPPayload instantiates a new CreatePublicIPPayload object @@ -162,6 +221,33 @@ func NewCreatePublicIPPayloadWithDefaults() *CreatePublicIPPayload { return &this } +// GetCreatedAt returns the CreatedAt 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 *CreatePublicIPPayload) GetCreatedAt() (res CreatePublicIPPayloadGetCreatedAtRetType) { + res, _ = o.GetCreatedAtOk() + return +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *CreatePublicIPPayload) GetCreatedAtOk() (ret CreatePublicIPPayloadGetCreatedAtRetType, ok bool) { + return getCreatePublicIPPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// HasCreatedAt 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 *CreatePublicIPPayload) HasCreatedAt() bool { + _, ok := o.GetCreatedAtOk() + return ok +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreatePublicIPPayload) SetCreatedAt(v CreatePublicIPPayloadGetCreatedAtRetType) { + setCreatePublicIPPayloadGetCreatedAtAttributeType(&o.CreatedAt, v) +} + // GetId returns the Id 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 *CreatePublicIPPayload) GetId() (res CreatePublicIPPayloadGetIdRetType) { @@ -283,9 +369,39 @@ func (o *CreatePublicIPPayload) UnsetNetworkInterface() { o.NetworkInterface = nil } +// GetUpdatedAt returns the UpdatedAt 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 *CreatePublicIPPayload) GetUpdatedAt() (res CreatePublicIPPayloadGetUpdatedAtRetType) { + res, _ = o.GetUpdatedAtOk() + return +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *CreatePublicIPPayload) GetUpdatedAtOk() (ret CreatePublicIPPayloadGetUpdatedAtRetType, ok bool) { + return getCreatePublicIPPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// HasUpdatedAt 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 *CreatePublicIPPayload) HasUpdatedAt() bool { + _, ok := o.GetUpdatedAtOk() + return ok +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreatePublicIPPayload) SetUpdatedAt(v CreatePublicIPPayloadGetUpdatedAtRetType) { + setCreatePublicIPPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getCreatePublicIPPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } if val, ok := getCreatePublicIPPayloadGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } @@ -298,6 +414,9 @@ func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok { toSerialize["NetworkInterface"] = val } + if val, ok := getCreatePublicIPPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } return toSerialize, nil } diff --git a/services/iaas/model_create_security_group_payload.go b/services/iaas/model_create_security_group_payload.go index a77fe60993..0f7a438c60 100644 --- a/services/iaas/model_create_security_group_payload.go +++ b/services/iaas/model_create_security_group_payload.go @@ -244,7 +244,7 @@ type CreateSecurityGroupPayload struct { Description CreateSecurityGroupPayloadGetDescriptionAttributeType `json:"description,omitempty"` // Universally Unique Identifier (UUID). Id CreateSecurityGroupPayloadGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateSecurityGroupPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_create_server_payload.go b/services/iaas/model_create_server_payload.go index 4c3c490fbc..052f2440e7 100644 --- a/services/iaas/model_create_server_payload.go +++ b/services/iaas/model_create_server_payload.go @@ -715,7 +715,7 @@ type CreateServerPayload struct { ImageId CreateServerPayloadGetImageIdAttributeType `json:"imageId,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. KeypairName CreateServerPayloadGetKeypairNameAttributeType `json:"keypairName,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateServerPayloadGetLabelsAttributeType `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt CreateServerPayloadGetLaunchedAtAttributeType `json:"launchedAt,omitempty"` diff --git a/services/iaas/model_create_snapshot_payload.go b/services/iaas/model_create_snapshot_payload.go index 8f07d837f9..e7cf0d8321 100644 --- a/services/iaas/model_create_snapshot_payload.go +++ b/services/iaas/model_create_snapshot_payload.go @@ -300,7 +300,7 @@ type CreateSnapshotPayload struct { Description CreateSnapshotPayloadGetDescriptionAttributeType `json:"description,omitempty"` // Universally Unique Identifier (UUID). Id CreateSnapshotPayloadGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateSnapshotPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name CreateSnapshotPayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_create_volume_payload.go b/services/iaas/model_create_volume_payload.go index 0bf3ecaa86..8156f6c621 100644 --- a/services/iaas/model_create_volume_payload.go +++ b/services/iaas/model_create_volume_payload.go @@ -469,7 +469,7 @@ type CreateVolumePayload struct { // Universally Unique Identifier (UUID). Id CreateVolumePayloadGetIdAttributeType `json:"id,omitempty"` ImageConfig CreateVolumePayloadGetImageConfigAttributeType `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels CreateVolumePayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name CreateVolumePayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_destination_cidrv4.go b/services/iaas/model_destination_cidrv4.go index 9566e18641..1d7815e462 100644 --- a/services/iaas/model_destination_cidrv4.go +++ b/services/iaas/model_destination_cidrv4.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "fmt" ) // checks if the DestinationCIDRv4 type satisfies the MappedNullable interface at compile time @@ -22,9 +23,132 @@ var _ MappedNullable = &DestinationCIDRv4{} types and functions for type */ -// isNotNullableString +// isEnum + +// DestinationCIDRv4Types the model 'DestinationCIDRv4' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DestinationCIDRv4Types string + +// List of Type +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DESTINATIONCIDRV4TYPE_CIDRV4 DestinationCIDRv4Types = "cidrv4" +) + +// All allowed values of DestinationCIDRv4 enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedDestinationCIDRv4TypesEnumValues = []DestinationCIDRv4Types{ + "cidrv4", +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv4GetTypeAttributeType = *string +func (v *DestinationCIDRv4Types) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson DestinationCIDRv4Types + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := DestinationCIDRv4Types(value) + for _, existing := range AllowedDestinationCIDRv4TypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid DestinationCIDRv4", value) +} + +// NewDestinationCIDRv4TypesFromValue returns a pointer to a valid DestinationCIDRv4Types +// for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewDestinationCIDRv4TypesFromValue(v DestinationCIDRv4Types) (*DestinationCIDRv4Types, error) { + ev := DestinationCIDRv4Types(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DestinationCIDRv4Types: valid values are %v", v, AllowedDestinationCIDRv4TypesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v DestinationCIDRv4Types) IsValid() bool { + for _, existing := range AllowedDestinationCIDRv4TypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TypeTypes value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v DestinationCIDRv4Types) Ptr() *DestinationCIDRv4Types { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableDestinationCIDRv4Types struct { + value *DestinationCIDRv4Types + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDestinationCIDRv4Types) Get() *DestinationCIDRv4Types { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDestinationCIDRv4Types) Set(val *DestinationCIDRv4Types) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDestinationCIDRv4Types) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDestinationCIDRv4Types) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableDestinationCIDRv4Types(val *DestinationCIDRv4Types) *NullableDestinationCIDRv4Types { + return &NullableDestinationCIDRv4Types{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDestinationCIDRv4Types) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDestinationCIDRv4Types) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DestinationCIDRv4GetTypeAttributeType = *DestinationCIDRv4Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DestinationCIDRv4GetTypeArgType = DestinationCIDRv4Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DestinationCIDRv4GetTypeRetType = DestinationCIDRv4Types // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getDestinationCIDRv4GetTypeAttributeTypeOk(arg DestinationCIDRv4GetTypeAttributeType) (ret DestinationCIDRv4GetTypeRetType, ok bool) { @@ -39,12 +163,6 @@ func setDestinationCIDRv4GetTypeAttributeType(arg *DestinationCIDRv4GetTypeAttri *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv4GetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv4GetTypeRetType = string - /* types and functions for value */ diff --git a/services/iaas/model_destination_cidrv4_test.go b/services/iaas/model_destination_cidrv4_test.go index 603b159888..972b81c8eb 100644 --- a/services/iaas/model_destination_cidrv4_test.go +++ b/services/iaas/model_destination_cidrv4_test.go @@ -9,3 +9,43 @@ API version: 2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaas + +import ( + "testing" +) + +// isEnum + +func TestDestinationCIDRv4Types_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"cidrv4"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := DestinationCIDRv4Types("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/iaas/model_destination_cidrv6.go b/services/iaas/model_destination_cidrv6.go index 604f6c2805..57173e2ff3 100644 --- a/services/iaas/model_destination_cidrv6.go +++ b/services/iaas/model_destination_cidrv6.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "fmt" ) // checks if the DestinationCIDRv6 type satisfies the MappedNullable interface at compile time @@ -22,9 +23,132 @@ var _ MappedNullable = &DestinationCIDRv6{} types and functions for type */ -// isNotNullableString +// isEnum + +// DestinationCIDRv6Types the model 'DestinationCIDRv6' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DestinationCIDRv6Types string + +// List of Type +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DESTINATIONCIDRV6TYPE_CIDRV6 DestinationCIDRv6Types = "cidrv6" +) + +// All allowed values of DestinationCIDRv6 enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedDestinationCIDRv6TypesEnumValues = []DestinationCIDRv6Types{ + "cidrv6", +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv6GetTypeAttributeType = *string +func (v *DestinationCIDRv6Types) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson DestinationCIDRv6Types + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := DestinationCIDRv6Types(value) + for _, existing := range AllowedDestinationCIDRv6TypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid DestinationCIDRv6", value) +} + +// NewDestinationCIDRv6TypesFromValue returns a pointer to a valid DestinationCIDRv6Types +// for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewDestinationCIDRv6TypesFromValue(v DestinationCIDRv6Types) (*DestinationCIDRv6Types, error) { + ev := DestinationCIDRv6Types(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DestinationCIDRv6Types: valid values are %v", v, AllowedDestinationCIDRv6TypesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v DestinationCIDRv6Types) IsValid() bool { + for _, existing := range AllowedDestinationCIDRv6TypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TypeTypes value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v DestinationCIDRv6Types) Ptr() *DestinationCIDRv6Types { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableDestinationCIDRv6Types struct { + value *DestinationCIDRv6Types + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDestinationCIDRv6Types) Get() *DestinationCIDRv6Types { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDestinationCIDRv6Types) Set(val *DestinationCIDRv6Types) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDestinationCIDRv6Types) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDestinationCIDRv6Types) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableDestinationCIDRv6Types(val *DestinationCIDRv6Types) *NullableDestinationCIDRv6Types { + return &NullableDestinationCIDRv6Types{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDestinationCIDRv6Types) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDestinationCIDRv6Types) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DestinationCIDRv6GetTypeAttributeType = *DestinationCIDRv6Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DestinationCIDRv6GetTypeArgType = DestinationCIDRv6Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DestinationCIDRv6GetTypeRetType = DestinationCIDRv6Types // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getDestinationCIDRv6GetTypeAttributeTypeOk(arg DestinationCIDRv6GetTypeAttributeType) (ret DestinationCIDRv6GetTypeRetType, ok bool) { @@ -39,12 +163,6 @@ func setDestinationCIDRv6GetTypeAttributeType(arg *DestinationCIDRv6GetTypeAttri *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv6GetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv6GetTypeRetType = string - /* types and functions for value */ diff --git a/services/iaas/model_destination_cidrv6_test.go b/services/iaas/model_destination_cidrv6_test.go index 603b159888..498dc093d4 100644 --- a/services/iaas/model_destination_cidrv6_test.go +++ b/services/iaas/model_destination_cidrv6_test.go @@ -9,3 +9,43 @@ API version: 2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaas + +import ( + "testing" +) + +// isEnum + +func TestDestinationCIDRv6Types_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"cidrv6"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := DestinationCIDRv6Types("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/iaas/model_image.go b/services/iaas/model_image.go index 15523aa72a..05b8776569 100644 --- a/services/iaas/model_image.go +++ b/services/iaas/model_image.go @@ -493,7 +493,7 @@ type Image struct { Id ImageGetIdAttributeType `json:"id,omitempty"` // Indicates Image Import Progress in percent. ImportProgress ImageGetImportProgressAttributeType `json:"importProgress,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels ImageGetLabelsAttributeType `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize ImageGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"` diff --git a/services/iaas/model_image_from_volume_payload.go b/services/iaas/model_image_from_volume_payload.go index a5ac4c856c..d29303aba3 100644 --- a/services/iaas/model_image_from_volume_payload.go +++ b/services/iaas/model_image_from_volume_payload.go @@ -45,6 +45,33 @@ type ImageFromVolumePayloadGetDiskFormatArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ImageFromVolumePayloadGetDiskFormatRetType = string +/* + types and functions for force +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ImageFromVolumePayloadgetForceAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ImageFromVolumePayloadgetForceArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ImageFromVolumePayloadgetForceRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getImageFromVolumePayloadgetForceAttributeTypeOk(arg ImageFromVolumePayloadgetForceAttributeType) (ret ImageFromVolumePayloadgetForceRetType, 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 setImageFromVolumePayloadgetForceAttributeType(arg *ImageFromVolumePayloadgetForceAttributeType, val ImageFromVolumePayloadgetForceRetType) { + *arg = &val +} + /* types and functions for name */ @@ -105,6 +132,8 @@ type ImageFromVolumePayload struct { // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. // REQUIRED DiskFormat ImageFromVolumePayloadGetDiskFormatAttributeType `json:"diskFormat" required:"true"` + // When true the image is force created from a volume is currently being used. + Force ImageFromVolumePayloadgetForceAttributeType `json:"force,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED Name ImageFromVolumePayloadGetNameAttributeType `json:"name" required:"true"` @@ -133,6 +162,8 @@ func NewImageFromVolumePayload(diskFormat ImageFromVolumePayloadGetDiskFormatArg // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewImageFromVolumePayloadWithDefaults() *ImageFromVolumePayload { this := ImageFromVolumePayload{} + var force bool = false + this.Force = &force var protected bool = false this.Protected = &protected return &this @@ -158,6 +189,33 @@ func (o *ImageFromVolumePayload) SetDiskFormat(v ImageFromVolumePayloadGetDiskFo setImageFromVolumePayloadGetDiskFormatAttributeType(&o.DiskFormat, v) } +// GetForce returns the Force 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 *ImageFromVolumePayload) GetForce() (res ImageFromVolumePayloadgetForceRetType) { + res, _ = o.GetForceOk() + return +} + +// GetForceOk returns a tuple with the Force 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 *ImageFromVolumePayload) GetForceOk() (ret ImageFromVolumePayloadgetForceRetType, ok bool) { + return getImageFromVolumePayloadgetForceAttributeTypeOk(o.Force) +} + +// HasForce 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 *ImageFromVolumePayload) HasForce() bool { + _, ok := o.GetForceOk() + return ok +} + +// SetForce gets a reference to the given bool and assigns it to the Force field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ImageFromVolumePayload) SetForce(v ImageFromVolumePayloadgetForceRetType) { + setImageFromVolumePayloadgetForceAttributeType(&o.Force, 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 *ImageFromVolumePayload) GetName() (ret ImageFromVolumePayloadGetNameRetType) { @@ -211,6 +269,9 @@ func (o ImageFromVolumePayload) ToMap() (map[string]interface{}, error) { if val, ok := getImageFromVolumePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat); ok { toSerialize["DiskFormat"] = val } + if val, ok := getImageFromVolumePayloadgetForceAttributeTypeOk(o.Force); ok { + toSerialize["Force"] = val + } if val, ok := getImageFromVolumePayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } diff --git a/services/iaas/model_keypair.go b/services/iaas/model_keypair.go index 73d25ae4e6..26b59b6a6e 100644 --- a/services/iaas/model_keypair.go +++ b/services/iaas/model_keypair.go @@ -188,7 +188,7 @@ type Keypair struct { CreatedAt KeypairGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint KeypairGetFingerprintAttributeType `json:"fingerprint,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels KeypairGetLabelsAttributeType `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name KeypairGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_network.go b/services/iaas/model_network.go index 0497e0c009..efcaed1b0b 100644 --- a/services/iaas/model_network.go +++ b/services/iaas/model_network.go @@ -46,6 +46,33 @@ func setNetworkGetCreatedAtAttributeType(arg *NetworkGetCreatedAtAttributeType, *arg = &val } +/* + types and functions for description +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NetworkGetDescriptionAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getNetworkGetDescriptionAttributeTypeOk(arg NetworkGetDescriptionAttributeType) (ret NetworkGetDescriptionRetType, 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 setNetworkGetDescriptionAttributeType(arg *NetworkGetDescriptionAttributeType, val NetworkGetDescriptionRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NetworkGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NetworkGetDescriptionRetType = string + /* types and functions for dhcp */ @@ -348,6 +375,8 @@ type NetworkGetVpcIdRetType = string type Network struct { // Date-time when resource was created. CreatedAt NetworkGetCreatedAtAttributeType `json:"createdAt,omitempty"` + // Description Object. Allows string up to 255 Characters. + Description NetworkGetDescriptionAttributeType `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp NetworkgetDhcpAttributeType `json:"dhcp,omitempty"` // Universally Unique Identifier (UUID). @@ -355,7 +384,7 @@ type Network struct { Id NetworkGetIdAttributeType `json:"id" required:"true"` Ipv4 NetworkGetIpv4AttributeType `json:"ipv4,omitempty"` Ipv6 NetworkGetIpv6AttributeType `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels NetworkGetLabelsAttributeType `json:"labels,omitempty"` // REQUIRED Name NetworkGetNameAttributeType `json:"name" required:"true"` @@ -424,6 +453,33 @@ func (o *Network) SetCreatedAt(v NetworkGetCreatedAtRetType) { setNetworkGetCreatedAtAttributeType(&o.CreatedAt, v) } +// GetDescription returns the Description 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 *Network) GetDescription() (res NetworkGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return +} + +// GetDescriptionOk returns a tuple with the Description 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 *Network) GetDescriptionOk() (ret NetworkGetDescriptionRetType, ok bool) { + return getNetworkGetDescriptionAttributeTypeOk(o.Description) +} + +// HasDescription 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 *Network) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Network) SetDescription(v NetworkGetDescriptionRetType) { + setNetworkGetDescriptionAttributeType(&o.Description, v) +} + // GetDhcp returns the Dhcp 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 *Network) GetDhcp() (res NetworkgetDhcpRetType) { @@ -706,6 +762,9 @@ func (o Network) ToMap() (map[string]interface{}, error) { if val, ok := getNetworkGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { toSerialize["CreatedAt"] = val } + if val, ok := getNetworkGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } if val, ok := getNetworkgetDhcpAttributeTypeOk(o.Dhcp); ok { toSerialize["Dhcp"] = val } diff --git a/services/iaas/model_network_area.go b/services/iaas/model_network_area.go index f78d940c38..77b6d61460 100644 --- a/services/iaas/model_network_area.go +++ b/services/iaas/model_network_area.go @@ -188,7 +188,7 @@ type NetworkArea struct { CreatedAt NetworkAreaGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). Id NetworkAreaGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels NetworkAreaGetLabelsAttributeType `json:"labels,omitempty"` // REQUIRED Name NetworkAreaGetNameAttributeType `json:"name" required:"true"` diff --git a/services/iaas/model_nexthop_blackhole.go b/services/iaas/model_nexthop_blackhole.go index 506547cbd8..87b07999a1 100644 --- a/services/iaas/model_nexthop_blackhole.go +++ b/services/iaas/model_nexthop_blackhole.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "fmt" ) // checks if the NexthopBlackhole type satisfies the MappedNullable interface at compile time @@ -22,9 +23,132 @@ var _ MappedNullable = &NexthopBlackhole{} types and functions for type */ -// isNotNullableString +// isEnum + +// NexthopBlackholeTypes the model 'NexthopBlackhole' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopBlackholeTypes string + +// List of Type +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + NEXTHOPBLACKHOLETYPE_BLACKHOLE NexthopBlackholeTypes = "blackhole" +) + +// All allowed values of NexthopBlackhole enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedNexthopBlackholeTypesEnumValues = []NexthopBlackholeTypes{ + "blackhole", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NexthopBlackholeTypes) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson NexthopBlackholeTypes + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := NexthopBlackholeTypes(value) + for _, existing := range AllowedNexthopBlackholeTypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid NexthopBlackhole", value) +} + +// NewNexthopBlackholeTypesFromValue returns a pointer to a valid NexthopBlackholeTypes +// for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNexthopBlackholeTypesFromValue(v NexthopBlackholeTypes) (*NexthopBlackholeTypes, error) { + ev := NexthopBlackholeTypes(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopBlackholeTypes: valid values are %v", v, AllowedNexthopBlackholeTypesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NexthopBlackholeTypes) IsValid() bool { + for _, existing := range AllowedNexthopBlackholeTypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TypeTypes value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NexthopBlackholeTypes) Ptr() *NexthopBlackholeTypes { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableNexthopBlackholeTypes struct { + value *NexthopBlackholeTypes + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopBlackholeTypes) Get() *NexthopBlackholeTypes { + return v.value +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopBlackholeGetTypeAttributeType = *string +func (v *NullableNexthopBlackholeTypes) Set(val *NexthopBlackholeTypes) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopBlackholeTypes) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopBlackholeTypes) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableNexthopBlackholeTypes(val *NexthopBlackholeTypes) *NullableNexthopBlackholeTypes { + return &NullableNexthopBlackholeTypes{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopBlackholeTypes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopBlackholeTypes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopBlackholeGetTypeAttributeType = *NexthopBlackholeTypes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopBlackholeGetTypeArgType = NexthopBlackholeTypes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopBlackholeGetTypeRetType = NexthopBlackholeTypes // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNexthopBlackholeGetTypeAttributeTypeOk(arg NexthopBlackholeGetTypeAttributeType) (ret NexthopBlackholeGetTypeRetType, ok bool) { @@ -39,12 +163,6 @@ func setNexthopBlackholeGetTypeAttributeType(arg *NexthopBlackholeGetTypeAttribu *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopBlackholeGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopBlackholeGetTypeRetType = string - // NexthopBlackhole Object that represents a blackhole route. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NexthopBlackhole struct { diff --git a/services/iaas/model_nexthop_blackhole_test.go b/services/iaas/model_nexthop_blackhole_test.go index 603b159888..00a237052d 100644 --- a/services/iaas/model_nexthop_blackhole_test.go +++ b/services/iaas/model_nexthop_blackhole_test.go @@ -9,3 +9,43 @@ API version: 2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaas + +import ( + "testing" +) + +// isEnum + +func TestNexthopBlackholeTypes_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"blackhole"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := NexthopBlackholeTypes("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/iaas/model_nexthop_internet.go b/services/iaas/model_nexthop_internet.go index 50edd59bbd..2022131f6f 100644 --- a/services/iaas/model_nexthop_internet.go +++ b/services/iaas/model_nexthop_internet.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "fmt" ) // checks if the NexthopInternet type satisfies the MappedNullable interface at compile time @@ -22,9 +23,132 @@ var _ MappedNullable = &NexthopInternet{} types and functions for type */ -// isNotNullableString +// isEnum + +// NexthopInternetTypes the model 'NexthopInternet' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopInternetTypes string + +// List of Type +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + NEXTHOPINTERNETTYPE_INTERNET NexthopInternetTypes = "internet" +) + +// All allowed values of NexthopInternet enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedNexthopInternetTypesEnumValues = []NexthopInternetTypes{ + "internet", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NexthopInternetTypes) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson NexthopInternetTypes + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := NexthopInternetTypes(value) + for _, existing := range AllowedNexthopInternetTypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid NexthopInternet", value) +} + +// NewNexthopInternetTypesFromValue returns a pointer to a valid NexthopInternetTypes +// for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNexthopInternetTypesFromValue(v NexthopInternetTypes) (*NexthopInternetTypes, error) { + ev := NexthopInternetTypes(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopInternetTypes: valid values are %v", v, AllowedNexthopInternetTypesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NexthopInternetTypes) IsValid() bool { + for _, existing := range AllowedNexthopInternetTypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TypeTypes value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NexthopInternetTypes) Ptr() *NexthopInternetTypes { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableNexthopInternetTypes struct { + value *NexthopInternetTypes + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopInternetTypes) Get() *NexthopInternetTypes { + return v.value +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopInternetGetTypeAttributeType = *string +func (v *NullableNexthopInternetTypes) Set(val *NexthopInternetTypes) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopInternetTypes) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopInternetTypes) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableNexthopInternetTypes(val *NexthopInternetTypes) *NullableNexthopInternetTypes { + return &NullableNexthopInternetTypes{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopInternetTypes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopInternetTypes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopInternetGetTypeAttributeType = *NexthopInternetTypes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopInternetGetTypeArgType = NexthopInternetTypes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopInternetGetTypeRetType = NexthopInternetTypes // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNexthopInternetGetTypeAttributeTypeOk(arg NexthopInternetGetTypeAttributeType) (ret NexthopInternetGetTypeRetType, ok bool) { @@ -39,12 +163,6 @@ func setNexthopInternetGetTypeAttributeType(arg *NexthopInternetGetTypeAttribute *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopInternetGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopInternetGetTypeRetType = string - // NexthopInternet Object that represents a route to the internet. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NexthopInternet struct { diff --git a/services/iaas/model_nexthop_internet_test.go b/services/iaas/model_nexthop_internet_test.go index 603b159888..84e7d011ab 100644 --- a/services/iaas/model_nexthop_internet_test.go +++ b/services/iaas/model_nexthop_internet_test.go @@ -9,3 +9,43 @@ API version: 2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaas + +import ( + "testing" +) + +// isEnum + +func TestNexthopInternetTypes_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"internet"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := NexthopInternetTypes("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/iaas/model_nexthop_ipv4.go b/services/iaas/model_nexthop_ipv4.go index 0a2a28f54f..8669f9cfa2 100644 --- a/services/iaas/model_nexthop_ipv4.go +++ b/services/iaas/model_nexthop_ipv4.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "fmt" ) // checks if the NexthopIPv4 type satisfies the MappedNullable interface at compile time @@ -22,9 +23,132 @@ var _ MappedNullable = &NexthopIPv4{} types and functions for type */ -// isNotNullableString +// isEnum + +// NexthopIPv4Types the model 'NexthopIPv4' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopIPv4Types string + +// List of Type +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + NEXTHOPIPV4TYPE_IPV4 NexthopIPv4Types = "ipv4" +) + +// All allowed values of NexthopIPv4 enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedNexthopIPv4TypesEnumValues = []NexthopIPv4Types{ + "ipv4", +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv4GetTypeAttributeType = *string +func (v *NexthopIPv4Types) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson NexthopIPv4Types + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := NexthopIPv4Types(value) + for _, existing := range AllowedNexthopIPv4TypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid NexthopIPv4", value) +} + +// NewNexthopIPv4TypesFromValue returns a pointer to a valid NexthopIPv4Types +// for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNexthopIPv4TypesFromValue(v NexthopIPv4Types) (*NexthopIPv4Types, error) { + ev := NexthopIPv4Types(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopIPv4Types: valid values are %v", v, AllowedNexthopIPv4TypesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NexthopIPv4Types) IsValid() bool { + for _, existing := range AllowedNexthopIPv4TypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TypeTypes value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NexthopIPv4Types) Ptr() *NexthopIPv4Types { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableNexthopIPv4Types struct { + value *NexthopIPv4Types + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopIPv4Types) Get() *NexthopIPv4Types { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopIPv4Types) Set(val *NexthopIPv4Types) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopIPv4Types) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopIPv4Types) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableNexthopIPv4Types(val *NexthopIPv4Types) *NullableNexthopIPv4Types { + return &NullableNexthopIPv4Types{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopIPv4Types) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopIPv4Types) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopIPv4GetTypeAttributeType = *NexthopIPv4Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopIPv4GetTypeArgType = NexthopIPv4Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopIPv4GetTypeRetType = NexthopIPv4Types // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNexthopIPv4GetTypeAttributeTypeOk(arg NexthopIPv4GetTypeAttributeType) (ret NexthopIPv4GetTypeRetType, ok bool) { @@ -39,12 +163,6 @@ func setNexthopIPv4GetTypeAttributeType(arg *NexthopIPv4GetTypeAttributeType, va *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv4GetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv4GetTypeRetType = string - /* types and functions for value */ diff --git a/services/iaas/model_nexthop_ipv4_test.go b/services/iaas/model_nexthop_ipv4_test.go index 603b159888..f3f61cdba5 100644 --- a/services/iaas/model_nexthop_ipv4_test.go +++ b/services/iaas/model_nexthop_ipv4_test.go @@ -9,3 +9,43 @@ API version: 2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaas + +import ( + "testing" +) + +// isEnum + +func TestNexthopIPv4Types_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"ipv4"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := NexthopIPv4Types("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/iaas/model_nexthop_ipv6.go b/services/iaas/model_nexthop_ipv6.go index a66290df00..6182de1fdd 100644 --- a/services/iaas/model_nexthop_ipv6.go +++ b/services/iaas/model_nexthop_ipv6.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "fmt" ) // checks if the NexthopIPv6 type satisfies the MappedNullable interface at compile time @@ -22,9 +23,132 @@ var _ MappedNullable = &NexthopIPv6{} types and functions for type */ -// isNotNullableString +// isEnum + +// NexthopIPv6Types the model 'NexthopIPv6' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopIPv6Types string + +// List of Type +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + NEXTHOPIPV6TYPE_IPV6 NexthopIPv6Types = "ipv6" +) + +// All allowed values of NexthopIPv6 enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedNexthopIPv6TypesEnumValues = []NexthopIPv6Types{ + "ipv6", +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv6GetTypeAttributeType = *string +func (v *NexthopIPv6Types) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson NexthopIPv6Types + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := NexthopIPv6Types(value) + for _, existing := range AllowedNexthopIPv6TypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid NexthopIPv6", value) +} + +// NewNexthopIPv6TypesFromValue returns a pointer to a valid NexthopIPv6Types +// for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNexthopIPv6TypesFromValue(v NexthopIPv6Types) (*NexthopIPv6Types, error) { + ev := NexthopIPv6Types(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopIPv6Types: valid values are %v", v, AllowedNexthopIPv6TypesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NexthopIPv6Types) IsValid() bool { + for _, existing := range AllowedNexthopIPv6TypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TypeTypes value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NexthopIPv6Types) Ptr() *NexthopIPv6Types { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableNexthopIPv6Types struct { + value *NexthopIPv6Types + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopIPv6Types) Get() *NexthopIPv6Types { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopIPv6Types) Set(val *NexthopIPv6Types) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopIPv6Types) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopIPv6Types) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableNexthopIPv6Types(val *NexthopIPv6Types) *NullableNexthopIPv6Types { + return &NullableNexthopIPv6Types{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableNexthopIPv6Types) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableNexthopIPv6Types) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopIPv6GetTypeAttributeType = *NexthopIPv6Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopIPv6GetTypeArgType = NexthopIPv6Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NexthopIPv6GetTypeRetType = NexthopIPv6Types // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNexthopIPv6GetTypeAttributeTypeOk(arg NexthopIPv6GetTypeAttributeType) (ret NexthopIPv6GetTypeRetType, ok bool) { @@ -39,12 +163,6 @@ func setNexthopIPv6GetTypeAttributeType(arg *NexthopIPv6GetTypeAttributeType, va *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv6GetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv6GetTypeRetType = string - /* types and functions for value */ diff --git a/services/iaas/model_nexthop_ipv6_test.go b/services/iaas/model_nexthop_ipv6_test.go index 603b159888..27767ea64a 100644 --- a/services/iaas/model_nexthop_ipv6_test.go +++ b/services/iaas/model_nexthop_ipv6_test.go @@ -9,3 +9,43 @@ API version: 2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaas + +import ( + "testing" +) + +// isEnum + +func TestNexthopIPv6Types_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"ipv6"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := NexthopIPv6Types("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/iaas/model_nic.go b/services/iaas/model_nic.go index a1676a331e..28e548b01e 100644 --- a/services/iaas/model_nic.go +++ b/services/iaas/model_nic.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "time" ) // checks if the NIC type satisfies the MappedNullable interface at compile time @@ -45,6 +46,33 @@ func setNICGetAllowedAddressesAttributeType(arg *NICGetAllowedAddressesAttribute *arg = &val } +/* + types and functions for createdAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NICGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NICGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NICGetCreatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getNICGetCreatedAtAttributeTypeOk(arg NICGetCreatedAtAttributeType) (ret NICGetCreatedAtRetType, 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 setNICGetCreatedAtAttributeType(arg *NICGetCreatedAtAttributeType, val NICGetCreatedAtRetType) { + *arg = &val +} + /* types and functions for description */ @@ -396,11 +424,40 @@ type NICGetTypeArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NICGetTypeRetType = string +/* + types and functions for updatedAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NICGetUpdatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NICGetUpdatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NICGetUpdatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getNICGetUpdatedAtAttributeTypeOk(arg NICGetUpdatedAtAttributeType) (ret NICGetUpdatedAtRetType, 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 setNICGetUpdatedAtAttributeType(arg *NICGetUpdatedAtAttributeType, val NICGetUpdatedAtRetType) { + *arg = &val +} + // NIC Object that represents a network interface. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NIC struct { // A list of IPs or CIDR notations. AllowedAddresses NICGetAllowedAddressesAttributeType `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt NICGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description NICGetDescriptionAttributeType `json:"description,omitempty"` // Universally Unique Identifier (UUID). @@ -411,7 +468,7 @@ type NIC struct { Ipv4 NICGetIpv4AttributeType `json:"ipv4,omitempty"` // String that represents an IPv6 address. Ipv6 NICGetIpv6AttributeType `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels NICGetLabelsAttributeType `json:"labels,omitempty"` // Object that represents an MAC address. Mac NICGetMacAttributeType `json:"mac,omitempty"` @@ -427,6 +484,8 @@ type NIC struct { Status NICGetStatusAttributeType `json:"status,omitempty"` // Possible values: `server`, `metadata`, `gateway`, `none`. Type NICGetTypeAttributeType `json:"type,omitempty"` + // Date-time when resource was last updated. + UpdatedAt NICGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` } // NewNIC instantiates a new NIC object @@ -477,6 +536,33 @@ func (o *NIC) SetAllowedAddresses(v NICGetAllowedAddressesRetType) { setNICGetAllowedAddressesAttributeType(&o.AllowedAddresses, v) } +// GetCreatedAt returns the CreatedAt 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 *NIC) GetCreatedAt() (res NICGetCreatedAtRetType) { + res, _ = o.GetCreatedAtOk() + return +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *NIC) GetCreatedAtOk() (ret NICGetCreatedAtRetType, ok bool) { + return getNICGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// HasCreatedAt 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 *NIC) HasCreatedAt() bool { + _, ok := o.GetCreatedAtOk() + return ok +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *NIC) SetCreatedAt(v NICGetCreatedAtRetType) { + setNICGetCreatedAtAttributeType(&o.CreatedAt, v) +} + // GetDescription returns the Description 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 *NIC) GetDescription() (res NICGetDescriptionRetType) { @@ -828,12 +914,42 @@ func (o *NIC) SetType(v NICGetTypeRetType) { setNICGetTypeAttributeType(&o.Type, v) } +// GetUpdatedAt returns the UpdatedAt 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 *NIC) GetUpdatedAt() (res NICGetUpdatedAtRetType) { + res, _ = o.GetUpdatedAtOk() + return +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *NIC) GetUpdatedAtOk() (ret NICGetUpdatedAtRetType, ok bool) { + return getNICGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// HasUpdatedAt 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 *NIC) HasUpdatedAt() bool { + _, ok := o.GetUpdatedAtOk() + return ok +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *NIC) SetUpdatedAt(v NICGetUpdatedAtRetType) { + setNICGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o NIC) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getNICGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses); ok { toSerialize["AllowedAddresses"] = val } + if val, ok := getNICGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } if val, ok := getNICGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } @@ -873,6 +989,9 @@ func (o NIC) ToMap() (map[string]interface{}, error) { if val, ok := getNICGetTypeAttributeTypeOk(o.Type); ok { toSerialize["Type"] = val } + if val, ok := getNICGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } return toSerialize, nil } diff --git a/services/iaas/model_partial_update_network_area_payload.go b/services/iaas/model_partial_update_network_area_payload.go index 4b162fed3b..dc08f742a6 100644 --- a/services/iaas/model_partial_update_network_area_payload.go +++ b/services/iaas/model_partial_update_network_area_payload.go @@ -75,7 +75,7 @@ type PartialUpdateNetworkAreaPayloadGetNameRetType = string // PartialUpdateNetworkAreaPayload Object that represents the network area update request. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateNetworkAreaPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels PartialUpdateNetworkAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"` Name PartialUpdateNetworkAreaPayloadGetNameAttributeType `json:"name,omitempty"` } diff --git a/services/iaas/model_partial_update_network_payload.go b/services/iaas/model_partial_update_network_payload.go index 0101b05c86..fabdb5bf93 100644 --- a/services/iaas/model_partial_update_network_payload.go +++ b/services/iaas/model_partial_update_network_payload.go @@ -18,6 +18,33 @@ import ( // checks if the PartialUpdateNetworkPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PartialUpdateNetworkPayload{} +/* + types and functions for description +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateNetworkPayloadGetDescriptionAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPartialUpdateNetworkPayloadGetDescriptionAttributeTypeOk(arg PartialUpdateNetworkPayloadGetDescriptionAttributeType) (ret PartialUpdateNetworkPayloadGetDescriptionRetType, 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 setPartialUpdateNetworkPayloadGetDescriptionAttributeType(arg *PartialUpdateNetworkPayloadGetDescriptionAttributeType, val PartialUpdateNetworkPayloadGetDescriptionRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateNetworkPayloadGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateNetworkPayloadGetDescriptionRetType = string + /* types and functions for dhcp */ @@ -210,11 +237,13 @@ type PartialUpdateNetworkPayloadGetRoutingTableIdRetType = string // PartialUpdateNetworkPayload Object that represents the request body for a network update. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateNetworkPayload struct { + // Description Object. Allows string up to 255 Characters. + Description PartialUpdateNetworkPayloadGetDescriptionAttributeType `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp PartialUpdateNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"` Ipv4 PartialUpdateNetworkPayloadGetIpv4AttributeType `json:"ipv4,omitempty"` Ipv6 PartialUpdateNetworkPayloadGetIpv6AttributeType `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels PartialUpdateNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name PartialUpdateNetworkPayloadGetNameAttributeType `json:"name,omitempty"` @@ -243,6 +272,33 @@ func NewPartialUpdateNetworkPayloadWithDefaults() *PartialUpdateNetworkPayload { return &this } +// GetDescription returns the Description 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 *PartialUpdateNetworkPayload) GetDescription() (res PartialUpdateNetworkPayloadGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return +} + +// GetDescriptionOk returns a tuple with the Description 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 *PartialUpdateNetworkPayload) GetDescriptionOk() (ret PartialUpdateNetworkPayloadGetDescriptionRetType, ok bool) { + return getPartialUpdateNetworkPayloadGetDescriptionAttributeTypeOk(o.Description) +} + +// HasDescription 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 *PartialUpdateNetworkPayload) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PartialUpdateNetworkPayload) SetDescription(v PartialUpdateNetworkPayloadGetDescriptionRetType) { + setPartialUpdateNetworkPayloadGetDescriptionAttributeType(&o.Description, v) +} + // GetDhcp returns the Dhcp 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 *PartialUpdateNetworkPayload) GetDhcp() (res PartialUpdateNetworkPayloadgetDhcpRetType) { @@ -435,6 +491,9 @@ func (o *PartialUpdateNetworkPayload) SetRoutingTableId(v PartialUpdateNetworkPa // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PartialUpdateNetworkPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getPartialUpdateNetworkPayloadGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } if val, ok := getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok { toSerialize["Dhcp"] = val } diff --git a/services/iaas/model_project.go b/services/iaas/model_project.go index dbf141ace7..f61c6ea962 100644 --- a/services/iaas/model_project.go +++ b/services/iaas/model_project.go @@ -127,6 +127,33 @@ func setProjectgetInternetAccessAttributeType(arg *ProjectgetInternetAccessAttri *arg = &val } +/* + types and functions for projectType +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ProjectGetProjectTypeAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getProjectGetProjectTypeAttributeTypeOk(arg ProjectGetProjectTypeAttributeType) (ret ProjectGetProjectTypeRetType, 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 setProjectGetProjectTypeAttributeType(arg *ProjectGetProjectTypeAttributeType, val ProjectGetProjectTypeRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ProjectGetProjectTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ProjectGetProjectTypeRetType = string + /* types and functions for status */ @@ -181,6 +208,33 @@ func setProjectGetUpdatedAtAttributeType(arg *ProjectGetUpdatedAtAttributeType, *arg = &val } +/* + types and functions for vpcId +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ProjectGetVpcIdAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getProjectGetVpcIdAttributeTypeOk(arg ProjectGetVpcIdAttributeType) (ret ProjectGetVpcIdRetType, 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 setProjectGetVpcIdAttributeType(arg *ProjectGetVpcIdAttributeType, val ProjectGetVpcIdRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ProjectGetVpcIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ProjectGetVpcIdRetType = string + // Project Object that represents a STACKIT project. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Project struct { @@ -192,11 +246,15 @@ type Project struct { // REQUIRED Id ProjectGetIdAttributeType `json:"id" required:"true"` InternetAccess ProjectgetInternetAccessAttributeType `json:"internetAccess,omitempty"` + // Possible values: `Schwarz`, `Public`, `SNA`, `VPC`. + ProjectType ProjectGetProjectTypeAttributeType `json:"projectType,omitempty"` // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. // REQUIRED Status ProjectGetStatusAttributeType `json:"status" required:"true"` // Date-time when resource was last updated. UpdatedAt ProjectGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` + // Universally Unique Identifier (UUID). + VpcId ProjectGetVpcIdAttributeType `json:"vpcId,omitempty"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -318,6 +376,33 @@ func (o *Project) SetInternetAccess(v ProjectgetInternetAccessRetType) { setProjectgetInternetAccessAttributeType(&o.InternetAccess, v) } +// GetProjectType returns the ProjectType 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 *Project) GetProjectType() (res ProjectGetProjectTypeRetType) { + res, _ = o.GetProjectTypeOk() + return +} + +// GetProjectTypeOk returns a tuple with the ProjectType 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 *Project) GetProjectTypeOk() (ret ProjectGetProjectTypeRetType, ok bool) { + return getProjectGetProjectTypeAttributeTypeOk(o.ProjectType) +} + +// HasProjectType 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 *Project) HasProjectType() bool { + _, ok := o.GetProjectTypeOk() + return ok +} + +// SetProjectType gets a reference to the given string and assigns it to the ProjectType field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Project) SetProjectType(v ProjectGetProjectTypeRetType) { + setProjectGetProjectTypeAttributeType(&o.ProjectType, v) +} + // GetStatus returns the Status field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Project) GetStatus() (ret ProjectGetStatusRetType) { @@ -365,6 +450,33 @@ func (o *Project) SetUpdatedAt(v ProjectGetUpdatedAtRetType) { setProjectGetUpdatedAtAttributeType(&o.UpdatedAt, v) } +// GetVpcId returns the VpcId 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 *Project) GetVpcId() (res ProjectGetVpcIdRetType) { + res, _ = o.GetVpcIdOk() + return +} + +// GetVpcIdOk returns a tuple with the VpcId 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 *Project) GetVpcIdOk() (ret ProjectGetVpcIdRetType, ok bool) { + return getProjectGetVpcIdAttributeTypeOk(o.VpcId) +} + +// HasVpcId 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 *Project) HasVpcId() bool { + _, ok := o.GetVpcIdOk() + return ok +} + +// SetVpcId gets a reference to the given string and assigns it to the VpcId field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Project) SetVpcId(v ProjectGetVpcIdRetType) { + setProjectGetVpcIdAttributeType(&o.VpcId, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Project) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} @@ -380,12 +492,18 @@ func (o Project) ToMap() (map[string]interface{}, error) { if val, ok := getProjectgetInternetAccessAttributeTypeOk(o.InternetAccess); ok { toSerialize["InternetAccess"] = val } + if val, ok := getProjectGetProjectTypeAttributeTypeOk(o.ProjectType); ok { + toSerialize["ProjectType"] = val + } if val, ok := getProjectGetStatusAttributeTypeOk(o.Status); ok { toSerialize["Status"] = val } if val, ok := getProjectGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { toSerialize["UpdatedAt"] = val } + if val, ok := getProjectGetVpcIdAttributeTypeOk(o.VpcId); ok { + toSerialize["VpcId"] = val + } return toSerialize, nil } diff --git a/services/iaas/model_public_ip.go b/services/iaas/model_public_ip.go index 0f40f84f73..fdcdc59bf3 100644 --- a/services/iaas/model_public_ip.go +++ b/services/iaas/model_public_ip.go @@ -13,11 +13,39 @@ package iaas import ( "encoding/json" + "time" ) // checks if the PublicIp type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PublicIp{} +/* + types and functions for createdAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PublicIpGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PublicIpGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PublicIpGetCreatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPublicIpGetCreatedAtAttributeTypeOk(arg PublicIpGetCreatedAtAttributeType) (ret PublicIpGetCreatedAtRetType, 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 setPublicIpGetCreatedAtAttributeType(arg *PublicIpGetCreatedAtAttributeType, val PublicIpGetCreatedAtRetType) { + *arg = &val +} + /* types and functions for id */ @@ -130,17 +158,48 @@ type PublicIpGetNetworkInterfaceArgType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PublicIpGetNetworkInterfaceRetType = *string +/* + types and functions for updatedAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PublicIpGetUpdatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PublicIpGetUpdatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PublicIpGetUpdatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPublicIpGetUpdatedAtAttributeTypeOk(arg PublicIpGetUpdatedAtAttributeType) (ret PublicIpGetUpdatedAtRetType, 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 setPublicIpGetUpdatedAtAttributeType(arg *PublicIpGetUpdatedAtAttributeType, val PublicIpGetUpdatedAtRetType) { + *arg = &val +} + // PublicIp Object that represents a public IP. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PublicIp struct { + // Date-time when resource was created. + CreatedAt PublicIpGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). Id PublicIpGetIdAttributeType `json:"id,omitempty"` // String that represents an IPv4 address. Ip PublicIpGetIpAttributeType `json:"ip,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels PublicIpGetLabelsAttributeType `json:"labels,omitempty"` // Universally Unique Identifier (UUID). NetworkInterface PublicIpGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"` + // Date-time when resource was last updated. + UpdatedAt PublicIpGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` } // NewPublicIp instantiates a new PublicIp object @@ -162,6 +221,33 @@ func NewPublicIpWithDefaults() *PublicIp { return &this } +// GetCreatedAt returns the CreatedAt 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 *PublicIp) GetCreatedAt() (res PublicIpGetCreatedAtRetType) { + res, _ = o.GetCreatedAtOk() + return +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *PublicIp) GetCreatedAtOk() (ret PublicIpGetCreatedAtRetType, ok bool) { + return getPublicIpGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// HasCreatedAt 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 *PublicIp) HasCreatedAt() bool { + _, ok := o.GetCreatedAtOk() + return ok +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PublicIp) SetCreatedAt(v PublicIpGetCreatedAtRetType) { + setPublicIpGetCreatedAtAttributeType(&o.CreatedAt, v) +} + // GetId returns the Id 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 *PublicIp) GetId() (res PublicIpGetIdRetType) { @@ -283,9 +369,39 @@ func (o *PublicIp) UnsetNetworkInterface() { o.NetworkInterface = nil } +// GetUpdatedAt returns the UpdatedAt 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 *PublicIp) GetUpdatedAt() (res PublicIpGetUpdatedAtRetType) { + res, _ = o.GetUpdatedAtOk() + return +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *PublicIp) GetUpdatedAtOk() (ret PublicIpGetUpdatedAtRetType, ok bool) { + return getPublicIpGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// HasUpdatedAt 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 *PublicIp) HasUpdatedAt() bool { + _, ok := o.GetUpdatedAtOk() + return ok +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PublicIp) SetUpdatedAt(v PublicIpGetUpdatedAtRetType) { + setPublicIpGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PublicIp) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getPublicIpGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } if val, ok := getPublicIpGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } @@ -298,6 +414,9 @@ func (o PublicIp) ToMap() (map[string]interface{}, error) { if val, ok := getPublicIpGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok { toSerialize["NetworkInterface"] = val } + if val, ok := getPublicIpGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } return toSerialize, nil } diff --git a/services/iaas/model_route.go b/services/iaas/model_route.go index 40c9e4a6e4..45ecec8da7 100644 --- a/services/iaas/model_route.go +++ b/services/iaas/model_route.go @@ -190,7 +190,7 @@ type Route struct { Destination RouteGetDestinationAttributeType `json:"destination" required:"true"` // Universally Unique Identifier (UUID). Id RouteGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels RouteGetLabelsAttributeType `json:"labels,omitempty"` // REQUIRED Nexthop RouteGetNexthopAttributeType `json:"nexthop" required:"true"` diff --git a/services/iaas/model_routing_table.go b/services/iaas/model_routing_table.go index ac8735e532..cd9ebd1a51 100644 --- a/services/iaas/model_routing_table.go +++ b/services/iaas/model_routing_table.go @@ -275,7 +275,7 @@ type RoutingTable struct { DynamicRoutes RoutingTablegetDynamicRoutesAttributeType `json:"dynamicRoutes,omitempty"` // Universally Unique Identifier (UUID). Id RoutingTableGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels RoutingTableGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_security_group.go b/services/iaas/model_security_group.go index e9e9d20d6b..15b0ced32c 100644 --- a/services/iaas/model_security_group.go +++ b/services/iaas/model_security_group.go @@ -244,7 +244,7 @@ type SecurityGroup struct { Description SecurityGroupGetDescriptionAttributeType `json:"description,omitempty"` // Universally Unique Identifier (UUID). Id SecurityGroupGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels SecurityGroupGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_server.go b/services/iaas/model_server.go index e09fd92cfc..1fc463e500 100644 --- a/services/iaas/model_server.go +++ b/services/iaas/model_server.go @@ -715,7 +715,7 @@ type Server struct { ImageId ServerGetImageIdAttributeType `json:"imageId,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. KeypairName ServerGetKeypairNameAttributeType `json:"keypairName,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels ServerGetLabelsAttributeType `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt ServerGetLaunchedAtAttributeType `json:"launchedAt,omitempty"` diff --git a/services/iaas/model_server_network.go b/services/iaas/model_server_network.go index 9c8b37a5a5..26fde9a000 100644 --- a/services/iaas/model_server_network.go +++ b/services/iaas/model_server_network.go @@ -13,6 +13,7 @@ package iaas import ( "encoding/json" + "time" ) // checks if the ServerNetwork type satisfies the MappedNullable interface at compile time @@ -45,6 +46,33 @@ func setServerNetworkGetAllowedAddressesAttributeType(arg *ServerNetworkGetAllow *arg = &val } +/* + types and functions for createdAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServerNetworkGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServerNetworkGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServerNetworkGetCreatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getServerNetworkGetCreatedAtAttributeTypeOk(arg ServerNetworkGetCreatedAtAttributeType) (ret ServerNetworkGetCreatedAtRetType, 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 setServerNetworkGetCreatedAtAttributeType(arg *ServerNetworkGetCreatedAtAttributeType, val ServerNetworkGetCreatedAtRetType) { + *arg = &val +} + /* types and functions for ipv4 */ @@ -288,11 +316,40 @@ func setServerNetworkGetSecurityGroupsAttributeType(arg *ServerNetworkGetSecurit *arg = &val } +/* + types and functions for updatedAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServerNetworkGetUpdatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServerNetworkGetUpdatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServerNetworkGetUpdatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getServerNetworkGetUpdatedAtAttributeTypeOk(arg ServerNetworkGetUpdatedAtAttributeType) (ret ServerNetworkGetUpdatedAtRetType, 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 setServerNetworkGetUpdatedAtAttributeType(arg *ServerNetworkGetUpdatedAtAttributeType, val ServerNetworkGetUpdatedAtRetType) { + *arg = &val +} + // ServerNetwork Describes the object that matches servers to its networks. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServerNetwork struct { // A list of IPs or CIDR notations. AllowedAddresses ServerNetworkGetAllowedAddressesAttributeType `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt ServerNetworkGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Object that represents an IP address. Ipv4 ServerNetworkGetIpv4AttributeType `json:"ipv4,omitempty"` // String that represents an IPv6 address. @@ -316,6 +373,8 @@ type ServerNetwork struct { PublicIp ServerNetworkGetPublicIpAttributeType `json:"publicIp,omitempty"` // A list of UUIDs. SecurityGroups ServerNetworkGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"` + // Date-time when resource was last updated. + UpdatedAt ServerNetworkGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -372,6 +431,33 @@ func (o *ServerNetwork) SetAllowedAddresses(v ServerNetworkGetAllowedAddressesRe setServerNetworkGetAllowedAddressesAttributeType(&o.AllowedAddresses, v) } +// GetCreatedAt returns the CreatedAt 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 *ServerNetwork) GetCreatedAt() (res ServerNetworkGetCreatedAtRetType) { + res, _ = o.GetCreatedAtOk() + return +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *ServerNetwork) GetCreatedAtOk() (ret ServerNetworkGetCreatedAtRetType, ok bool) { + return getServerNetworkGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// HasCreatedAt 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 *ServerNetwork) HasCreatedAt() bool { + _, ok := o.GetCreatedAtOk() + return ok +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ServerNetwork) SetCreatedAt(v ServerNetworkGetCreatedAtRetType) { + setServerNetworkGetCreatedAtAttributeType(&o.CreatedAt, v) +} + // GetIpv4 returns the Ipv4 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 *ServerNetwork) GetIpv4() (res ServerNetworkGetIpv4RetType) { @@ -580,12 +666,42 @@ func (o *ServerNetwork) SetSecurityGroups(v ServerNetworkGetSecurityGroupsRetTyp setServerNetworkGetSecurityGroupsAttributeType(&o.SecurityGroups, v) } +// GetUpdatedAt returns the UpdatedAt 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 *ServerNetwork) GetUpdatedAt() (res ServerNetworkGetUpdatedAtRetType) { + res, _ = o.GetUpdatedAtOk() + return +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *ServerNetwork) GetUpdatedAtOk() (ret ServerNetworkGetUpdatedAtRetType, ok bool) { + return getServerNetworkGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// HasUpdatedAt 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 *ServerNetwork) HasUpdatedAt() bool { + _, ok := o.GetUpdatedAtOk() + return ok +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ServerNetwork) SetUpdatedAt(v ServerNetworkGetUpdatedAtRetType) { + setServerNetworkGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ServerNetwork) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getServerNetworkGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses); ok { toSerialize["AllowedAddresses"] = val } + if val, ok := getServerNetworkGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } if val, ok := getServerNetworkGetIpv4AttributeTypeOk(o.Ipv4); ok { toSerialize["Ipv4"] = val } @@ -613,6 +729,9 @@ func (o ServerNetwork) ToMap() (map[string]interface{}, error) { if val, ok := getServerNetworkGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok { toSerialize["SecurityGroups"] = val } + if val, ok := getServerNetworkGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } return toSerialize, nil } diff --git a/services/iaas/model_snapshot.go b/services/iaas/model_snapshot.go index 6326a0a1b5..46947c5cc6 100644 --- a/services/iaas/model_snapshot.go +++ b/services/iaas/model_snapshot.go @@ -300,7 +300,7 @@ type Snapshot struct { Description SnapshotGetDescriptionAttributeType `json:"description,omitempty"` // Universally Unique Identifier (UUID). Id SnapshotGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels SnapshotGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name SnapshotGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_update_backup_payload.go b/services/iaas/model_update_backup_payload.go index 7fe251b611..453dd03eb5 100644 --- a/services/iaas/model_update_backup_payload.go +++ b/services/iaas/model_update_backup_payload.go @@ -356,7 +356,7 @@ type UpdateBackupPayload struct { Encrypted UpdateBackupPayloadgetEncryptedAttributeType `json:"encrypted,omitempty"` // Universally Unique Identifier (UUID). Id UpdateBackupPayloadGetIdAttributeType `json:"id,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateBackupPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name UpdateBackupPayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_update_image_payload.go b/services/iaas/model_update_image_payload.go index cb6ef3732d..f8b6c3af25 100644 --- a/services/iaas/model_update_image_payload.go +++ b/services/iaas/model_update_image_payload.go @@ -241,7 +241,7 @@ type UpdateImagePayload struct { Config UpdateImagePayloadGetConfigAttributeType `json:"config,omitempty"` // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. DiskFormat UpdateImagePayloadGetDiskFormatAttributeType `json:"diskFormat,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateImagePayloadGetLabelsAttributeType `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize UpdateImagePayloadGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"` diff --git a/services/iaas/model_update_key_pair_payload.go b/services/iaas/model_update_key_pair_payload.go index 1ae3ec2ebb..6fc20de16b 100644 --- a/services/iaas/model_update_key_pair_payload.go +++ b/services/iaas/model_update_key_pair_payload.go @@ -48,7 +48,7 @@ func setUpdateKeyPairPayloadGetLabelsAttributeType(arg *UpdateKeyPairPayloadGetL // UpdateKeyPairPayload Object that represents an update request body of a public key of an SSH keypair. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateKeyPairPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateKeyPairPayloadGetLabelsAttributeType `json:"labels,omitempty"` } diff --git a/services/iaas/model_update_network_area_route_payload.go b/services/iaas/model_update_network_area_route_payload.go index a047754efd..4a13197f69 100644 --- a/services/iaas/model_update_network_area_route_payload.go +++ b/services/iaas/model_update_network_area_route_payload.go @@ -48,7 +48,7 @@ func setUpdateNetworkAreaRoutePayloadGetLabelsAttributeType(arg *UpdateNetworkAr // UpdateNetworkAreaRoutePayload Object that represents the request body for a route update. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateNetworkAreaRoutePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateNetworkAreaRoutePayloadGetLabelsAttributeType `json:"labels,omitempty"` } diff --git a/services/iaas/model_update_nic_payload.go b/services/iaas/model_update_nic_payload.go index ba960d6b68..5fd1e26578 100644 --- a/services/iaas/model_update_nic_payload.go +++ b/services/iaas/model_update_nic_payload.go @@ -187,7 +187,7 @@ type UpdateNicPayload struct { AllowedAddresses UpdateNicPayloadGetAllowedAddressesAttributeType `json:"allowedAddresses,omitempty"` // Description Object. Allows string up to 255 Characters. Description UpdateNicPayloadGetDescriptionAttributeType `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateNicPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name UpdateNicPayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_update_public_ip_payload.go b/services/iaas/model_update_public_ip_payload.go index fe0f9c26be..f2c15e48df 100644 --- a/services/iaas/model_update_public_ip_payload.go +++ b/services/iaas/model_update_public_ip_payload.go @@ -13,11 +13,39 @@ package iaas import ( "encoding/json" + "time" ) // checks if the UpdatePublicIPPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdatePublicIPPayload{} +/* + types and functions for createdAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdatePublicIPPayloadGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdatePublicIPPayloadGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdatePublicIPPayloadGetCreatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUpdatePublicIPPayloadGetCreatedAtAttributeTypeOk(arg UpdatePublicIPPayloadGetCreatedAtAttributeType) (ret UpdatePublicIPPayloadGetCreatedAtRetType, 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 setUpdatePublicIPPayloadGetCreatedAtAttributeType(arg *UpdatePublicIPPayloadGetCreatedAtAttributeType, val UpdatePublicIPPayloadGetCreatedAtRetType) { + *arg = &val +} + /* types and functions for id */ @@ -130,17 +158,48 @@ type UpdatePublicIPPayloadGetNetworkInterfaceArgType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdatePublicIPPayloadGetNetworkInterfaceRetType = *string +/* + types and functions for updatedAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdatePublicIPPayloadGetUpdatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdatePublicIPPayloadGetUpdatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdatePublicIPPayloadGetUpdatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUpdatePublicIPPayloadGetUpdatedAtAttributeTypeOk(arg UpdatePublicIPPayloadGetUpdatedAtAttributeType) (ret UpdatePublicIPPayloadGetUpdatedAtRetType, 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 setUpdatePublicIPPayloadGetUpdatedAtAttributeType(arg *UpdatePublicIPPayloadGetUpdatedAtAttributeType, val UpdatePublicIPPayloadGetUpdatedAtRetType) { + *arg = &val +} + // UpdatePublicIPPayload Object that represents a public IP. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdatePublicIPPayload struct { + // Date-time when resource was created. + CreatedAt UpdatePublicIPPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). Id UpdatePublicIPPayloadGetIdAttributeType `json:"id,omitempty"` // String that represents an IPv4 address. Ip UpdatePublicIPPayloadGetIpAttributeType `json:"ip,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdatePublicIPPayloadGetLabelsAttributeType `json:"labels,omitempty"` // Universally Unique Identifier (UUID). NetworkInterface UpdatePublicIPPayloadGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"` + // Date-time when resource was last updated. + UpdatedAt UpdatePublicIPPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` } // NewUpdatePublicIPPayload instantiates a new UpdatePublicIPPayload object @@ -162,6 +221,33 @@ func NewUpdatePublicIPPayloadWithDefaults() *UpdatePublicIPPayload { return &this } +// GetCreatedAt returns the CreatedAt 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 *UpdatePublicIPPayload) GetCreatedAt() (res UpdatePublicIPPayloadGetCreatedAtRetType) { + res, _ = o.GetCreatedAtOk() + return +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *UpdatePublicIPPayload) GetCreatedAtOk() (ret UpdatePublicIPPayloadGetCreatedAtRetType, ok bool) { + return getUpdatePublicIPPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// HasCreatedAt 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 *UpdatePublicIPPayload) HasCreatedAt() bool { + _, ok := o.GetCreatedAtOk() + return ok +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdatePublicIPPayload) SetCreatedAt(v UpdatePublicIPPayloadGetCreatedAtRetType) { + setUpdatePublicIPPayloadGetCreatedAtAttributeType(&o.CreatedAt, v) +} + // GetId returns the Id 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 *UpdatePublicIPPayload) GetId() (res UpdatePublicIPPayloadGetIdRetType) { @@ -283,9 +369,39 @@ func (o *UpdatePublicIPPayload) UnsetNetworkInterface() { o.NetworkInterface = nil } +// GetUpdatedAt returns the UpdatedAt 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 *UpdatePublicIPPayload) GetUpdatedAt() (res UpdatePublicIPPayloadGetUpdatedAtRetType) { + res, _ = o.GetUpdatedAtOk() + return +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *UpdatePublicIPPayload) GetUpdatedAtOk() (ret UpdatePublicIPPayloadGetUpdatedAtRetType, ok bool) { + return getUpdatePublicIPPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// HasUpdatedAt 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 *UpdatePublicIPPayload) HasUpdatedAt() bool { + _, ok := o.GetUpdatedAtOk() + return ok +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdatePublicIPPayload) SetUpdatedAt(v UpdatePublicIPPayloadGetUpdatedAtRetType) { + setUpdatePublicIPPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getUpdatePublicIPPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } if val, ok := getUpdatePublicIPPayloadGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } @@ -298,6 +414,9 @@ func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { if val, ok := getUpdatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok { toSerialize["NetworkInterface"] = val } + if val, ok := getUpdatePublicIPPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } return toSerialize, nil } diff --git a/services/iaas/model_update_route_of_routing_table_payload.go b/services/iaas/model_update_route_of_routing_table_payload.go index 5f3d8cf70e..0f9a376b95 100644 --- a/services/iaas/model_update_route_of_routing_table_payload.go +++ b/services/iaas/model_update_route_of_routing_table_payload.go @@ -48,7 +48,7 @@ func setUpdateRouteOfRoutingTablePayloadGetLabelsAttributeType(arg *UpdateRouteO // UpdateRouteOfRoutingTablePayload Object that represents the request body for a route update. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateRouteOfRoutingTablePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateRouteOfRoutingTablePayloadGetLabelsAttributeType `json:"labels,omitempty"` } diff --git a/services/iaas/model_update_routing_table_of_area_payload.go b/services/iaas/model_update_routing_table_of_area_payload.go index f80907e75b..eb2ac16db5 100644 --- a/services/iaas/model_update_routing_table_of_area_payload.go +++ b/services/iaas/model_update_routing_table_of_area_payload.go @@ -160,7 +160,7 @@ type UpdateRoutingTableOfAreaPayload struct { Description UpdateRoutingTableOfAreaPayloadGetDescriptionAttributeType `json:"description,omitempty"` // The update config setting for a routing table which allows propagation of dynamic routes to this routing table. DynamicRoutes UpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeType `json:"dynamicRoutes,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateRoutingTableOfAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name UpdateRoutingTableOfAreaPayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_update_security_group_payload.go b/services/iaas/model_update_security_group_payload.go index b48172a657..0b5fec417a 100644 --- a/services/iaas/model_update_security_group_payload.go +++ b/services/iaas/model_update_security_group_payload.go @@ -104,7 +104,7 @@ type UpdateSecurityGroupPayloadGetNameRetType = string type UpdateSecurityGroupPayload struct { // Description Object. Allows string up to 255 Characters. Description UpdateSecurityGroupPayloadGetDescriptionAttributeType `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateSecurityGroupPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name UpdateSecurityGroupPayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_update_server_payload.go b/services/iaas/model_update_server_payload.go index 7729173653..b60a04df25 100644 --- a/services/iaas/model_update_server_payload.go +++ b/services/iaas/model_update_server_payload.go @@ -102,7 +102,7 @@ type UpdateServerPayloadGetNameRetType = string // UpdateServerPayload Object that represents an update request body of a server. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateServerPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateServerPayloadGetLabelsAttributeType `json:"labels,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata UpdateServerPayloadGetMetadataAttributeType `json:"metadata,omitempty"` diff --git a/services/iaas/model_update_snapshot_payload.go b/services/iaas/model_update_snapshot_payload.go index 63f9c5340b..96713aa9fc 100644 --- a/services/iaas/model_update_snapshot_payload.go +++ b/services/iaas/model_update_snapshot_payload.go @@ -104,7 +104,7 @@ type UpdateSnapshotPayloadGetNameRetType = string type UpdateSnapshotPayload struct { // Description Object. Allows string up to 255 Characters. Description UpdateSnapshotPayloadGetDescriptionAttributeType `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateSnapshotPayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name UpdateSnapshotPayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_update_volume_payload.go b/services/iaas/model_update_volume_payload.go index 231e95bc25..c0964c3f26 100644 --- a/services/iaas/model_update_volume_payload.go +++ b/services/iaas/model_update_volume_payload.go @@ -161,7 +161,7 @@ type UpdateVolumePayload struct { // Description Object. Allows string up to 255 Characters. Description UpdateVolumePayloadGetDescriptionAttributeType `json:"description,omitempty"` ImageConfig UpdateVolumePayloadGetImageConfigAttributeType `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels UpdateVolumePayloadGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name UpdateVolumePayloadGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_volume.go b/services/iaas/model_volume.go index ad86d056a8..53ac3cd492 100644 --- a/services/iaas/model_volume.go +++ b/services/iaas/model_volume.go @@ -469,7 +469,7 @@ type Volume struct { // Universally Unique Identifier (UUID). Id VolumeGetIdAttributeType `json:"id,omitempty"` ImageConfig VolumeGetImageConfigAttributeType `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels VolumeGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name VolumeGetNameAttributeType `json:"name,omitempty"` diff --git a/services/iaas/model_volume_performance_class.go b/services/iaas/model_volume_performance_class.go index 0ba93d4a22..c4dfb2d121 100644 --- a/services/iaas/model_volume_performance_class.go +++ b/services/iaas/model_volume_performance_class.go @@ -160,7 +160,7 @@ type VolumePerformanceClass struct { Description VolumePerformanceClassGetDescriptionAttributeType `json:"description,omitempty"` // Input/Output Operations per second. Iops VolumePerformanceClassGetIopsAttributeType `json:"iops,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels VolumePerformanceClassGetLabelsAttributeType `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/oas_commit b/services/iaas/oas_commit index 25b839ffc3..71a76821d4 100644 --- a/services/iaas/oas_commit +++ b/services/iaas/oas_commit @@ -1 +1 @@ -2a5a2169ae0582ced5fa8ef999784e51e6b56d22 +0afa5e4924e6bf230fdade5cb294ecfd97dd63e5 diff --git a/services/iaas/v1api/model_backup.go b/services/iaas/v1api/model_backup.go index 1852883f99..c7c64072c6 100644 --- a/services/iaas/v1api/model_backup.go +++ b/services/iaas/v1api/model_backup.go @@ -31,7 +31,7 @@ type Backup struct { 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_create_backup_payload.go b/services/iaas/v1api/model_create_backup_payload.go index 3cc348175f..84bd0e4a83 100644 --- a/services/iaas/v1api/model_create_backup_payload.go +++ b/services/iaas/v1api/model_create_backup_payload.go @@ -23,7 +23,7 @@ var _ MappedNullable = &CreateBackupPayload{} type CreateBackupPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_create_image_payload.go b/services/iaas/v1api/model_create_image_payload.go index 7a367786b7..ea4f7c54c8 100644 --- a/services/iaas/v1api/model_create_image_payload.go +++ b/services/iaas/v1api/model_create_image_payload.go @@ -33,7 +33,7 @@ type CreateImagePayload struct { 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}$"` // Indicates Image Import Progress in percent. ImportProgress *int64 `json:"importProgress,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v1api/model_create_key_pair_payload.go b/services/iaas/v1api/model_create_key_pair_payload.go index a0c7b08f80..e28ffd38fe 100644 --- a/services/iaas/v1api/model_create_key_pair_payload.go +++ b/services/iaas/v1api/model_create_key_pair_payload.go @@ -26,7 +26,7 @@ type CreateKeyPairPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint *string `json:"fingerprint,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){15}([0-9A-Fa-f]{2})$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` diff --git a/services/iaas/v1api/model_create_network_area_payload.go b/services/iaas/v1api/model_create_network_area_payload.go index 229a1aa3b4..c4c875fafe 100644 --- a/services/iaas/v1api/model_create_network_area_payload.go +++ b/services/iaas/v1api/model_create_network_area_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &CreateNetworkAreaPayload{} // CreateNetworkAreaPayload struct for CreateNetworkAreaPayload type CreateNetworkAreaPayload struct { AddressFamily CreateAreaAddressFamily `json:"addressFamily"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v1api/model_create_network_payload.go b/services/iaas/v1api/model_create_network_payload.go index add8b7f6ee..32a4ed509c 100644 --- a/services/iaas/v1api/model_create_network_payload.go +++ b/services/iaas/v1api/model_create_network_payload.go @@ -22,9 +22,11 @@ var _ MappedNullable = &CreateNetworkPayload{} // CreateNetworkPayload Object that represents the request body for a network create. type CreateNetworkPayload struct { AddressFamily *CreateNetworkAddressFamily `json:"addressFamily,omitempty"` + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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]+)*$"` @@ -89,6 +91,38 @@ func (o *CreateNetworkPayload) SetAddressFamily(v CreateNetworkAddressFamily) { o.AddressFamily = &v } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateNetworkPayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateNetworkPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateNetworkPayload) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *CreateNetworkPayload) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -222,6 +256,9 @@ func (o CreateNetworkPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.AddressFamily) { toSerialize["addressFamily"] = o.AddressFamily } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -276,6 +313,7 @@ func (o *CreateNetworkPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "addressFamily") + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "labels") delete(additionalProperties, "name") diff --git a/services/iaas/v1api/model_create_nic_payload.go b/services/iaas/v1api/model_create_nic_payload.go index b2a53d8df9..f0703e8dd1 100644 --- a/services/iaas/v1api/model_create_nic_payload.go +++ b/services/iaas/v1api/model_create_nic_payload.go @@ -13,6 +13,7 @@ package v1api import ( "encoding/json" + "time" ) // checks if the CreateNicPayload type satisfies the MappedNullable interface at compile time @@ -22,6 +23,8 @@ var _ MappedNullable = &CreateNicPayload{} type CreateNicPayload struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` // Universally Unique Identifier (UUID). @@ -32,7 +35,7 @@ type CreateNicPayload struct { Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` @@ -47,7 +50,9 @@ type CreateNicPayload struct { // Possible values: `ACTIVE`, `DOWN`. Status *string `json:"status,omitempty"` // Possible values: `server`, `metadata`, `gateway`, `none`. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -106,6 +111,38 @@ func (o *CreateNicPayload) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreateNicPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNicPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreateNicPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreateNicPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *CreateNicPayload) GetDescription() string { if o == nil || IsNil(o.Description) { @@ -522,6 +559,38 @@ func (o *CreateNicPayload) SetType(v string) { o.Type = &v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreateNicPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNicPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreateNicPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreateNicPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o CreateNicPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -535,6 +604,9 @@ func (o CreateNicPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Description) { toSerialize["description"] = o.Description } @@ -574,6 +646,9 @@ func (o CreateNicPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -597,6 +672,7 @@ func (o *CreateNicPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "description") delete(additionalProperties, "device") delete(additionalProperties, "id") @@ -610,6 +686,7 @@ func (o *CreateNicPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "securityGroups") delete(additionalProperties, "status") delete(additionalProperties, "type") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_create_public_ip_payload.go b/services/iaas/v1api/model_create_public_ip_payload.go index 4f4cbcb046..6d9c7de3d1 100644 --- a/services/iaas/v1api/model_create_public_ip_payload.go +++ b/services/iaas/v1api/model_create_public_ip_payload.go @@ -13,6 +13,7 @@ package v1api import ( "encoding/json" + "time" ) // checks if the CreatePublicIPPayload type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &CreatePublicIPPayload{} // CreatePublicIPPayload Object that represents a public IP. type CreatePublicIPPayload struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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 an IP address. Ip *string `json:"ip,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewCreatePublicIPPayloadWithDefaults() *CreatePublicIPPayload { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreatePublicIPPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePublicIPPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreatePublicIPPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *CreatePublicIPPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *CreatePublicIPPayload) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreatePublicIPPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePublicIPPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreatePublicIPPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o CreatePublicIPPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o CreatePublicIPPayload) MarshalJSON() ([]byte, error) { func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *CreatePublicIPPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_create_security_group_payload.go b/services/iaas/v1api/model_create_security_group_payload.go index 783467944d..6fba484328 100644 --- a/services/iaas/v1api/model_create_security_group_payload.go +++ b/services/iaas/v1api/model_create_security_group_payload.go @@ -28,7 +28,7 @@ type CreateSecurityGroupPayload struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v1api/model_create_server_payload.go b/services/iaas/v1api/model_create_server_payload.go index 33085e6066..513c3806d6 100644 --- a/services/iaas/v1api/model_create_server_payload.go +++ b/services/iaas/v1api/model_create_server_payload.go @@ -40,7 +40,7 @@ type CreateServerPayload struct { ImageId *string `json:"imageId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The SSH keypair used during the server creation. KeypairName *string `json:"keypairName,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` diff --git a/services/iaas/v1api/model_create_snapshot_payload.go b/services/iaas/v1api/model_create_snapshot_payload.go index 2e0b6fbbef..3e32004139 100644 --- a/services/iaas/v1api/model_create_snapshot_payload.go +++ b/services/iaas/v1api/model_create_snapshot_payload.go @@ -30,7 +30,7 @@ type CreateSnapshotPayload struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_create_volume_payload.go b/services/iaas/v1api/model_create_volume_payload.go index 8a8b19f8af..e77cd0c1b6 100644 --- a/services/iaas/v1api/model_create_volume_payload.go +++ b/services/iaas/v1api/model_create_volume_payload.go @@ -36,7 +36,7 @@ type CreateVolumePayload struct { // 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}$"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_image.go b/services/iaas/v1api/model_image.go index 92b2eac13c..2ba47961e3 100644 --- a/services/iaas/v1api/model_image.go +++ b/services/iaas/v1api/model_image.go @@ -33,7 +33,7 @@ type Image struct { 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}$"` // Indicates Image Import Progress in percent. ImportProgress *int64 `json:"importProgress,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v1api/model_keypair.go b/services/iaas/v1api/model_keypair.go index 358c9791e3..cc7ba0355e 100644 --- a/services/iaas/v1api/model_keypair.go +++ b/services/iaas/v1api/model_keypair.go @@ -26,7 +26,7 @@ type Keypair struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint *string `json:"fingerprint,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){15}([0-9A-Fa-f]{2})$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` diff --git a/services/iaas/v1api/model_network.go b/services/iaas/v1api/model_network.go index 861cbb388b..5cbb44c2fd 100644 --- a/services/iaas/v1api/model_network.go +++ b/services/iaas/v1api/model_network.go @@ -24,13 +24,15 @@ var _ MappedNullable = &Network{} type Network struct { // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. Gatewayv6 NullableString `json:"gatewayv6,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` // A list containing DNS Servers/Nameservers for IPv4. @@ -106,6 +108,38 @@ func (o *Network) SetCreatedAt(v time.Time) { o.CreatedAt = &v } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Network) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Network) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Network) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *Network) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -565,6 +599,9 @@ func (o Network) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -647,6 +684,7 @@ func (o *Network) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "createdAt") + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "gateway") delete(additionalProperties, "gatewayv6") diff --git a/services/iaas/v1api/model_network_area.go b/services/iaas/v1api/model_network_area.go index 8f0413e038..c9f626222b 100644 --- a/services/iaas/v1api/model_network_area.go +++ b/services/iaas/v1api/model_network_area.go @@ -27,7 +27,7 @@ type NetworkArea struct { // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` Ipv4 *NetworkAreaIPv4 `json:"ipv4,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` // The amount of projects currently referencing a specific area. diff --git a/services/iaas/v1api/model_nic.go b/services/iaas/v1api/model_nic.go index ed3a85b1eb..6b3bc87967 100644 --- a/services/iaas/v1api/model_nic.go +++ b/services/iaas/v1api/model_nic.go @@ -13,6 +13,7 @@ package v1api import ( "encoding/json" + "time" ) // checks if the NIC type satisfies the MappedNullable interface at compile time @@ -22,6 +23,8 @@ var _ MappedNullable = &NIC{} type NIC struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` // Universally Unique Identifier (UUID). @@ -32,7 +35,7 @@ type NIC struct { Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` @@ -47,7 +50,9 @@ type NIC struct { // Possible values: `ACTIVE`, `DOWN`. Status *string `json:"status,omitempty"` // Possible values: `server`, `metadata`, `gateway`, `none`. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -106,6 +111,38 @@ func (o *NIC) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *NIC) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NIC) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *NIC) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *NIC) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *NIC) GetDescription() string { if o == nil || IsNil(o.Description) { @@ -522,6 +559,38 @@ func (o *NIC) SetType(v string) { o.Type = &v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *NIC) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NIC) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *NIC) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *NIC) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o NIC) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -535,6 +604,9 @@ func (o NIC) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Description) { toSerialize["description"] = o.Description } @@ -574,6 +646,9 @@ func (o NIC) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -597,6 +672,7 @@ func (o *NIC) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "description") delete(additionalProperties, "device") delete(additionalProperties, "id") @@ -610,6 +686,7 @@ func (o *NIC) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "securityGroups") delete(additionalProperties, "status") delete(additionalProperties, "type") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_partial_update_network_area_payload.go b/services/iaas/v1api/model_partial_update_network_area_payload.go index 984f2b8b00..8199444398 100644 --- a/services/iaas/v1api/model_partial_update_network_area_payload.go +++ b/services/iaas/v1api/model_partial_update_network_area_payload.go @@ -21,7 +21,7 @@ var _ MappedNullable = &PartialUpdateNetworkAreaPayload{} // PartialUpdateNetworkAreaPayload struct for PartialUpdateNetworkAreaPayload type PartialUpdateNetworkAreaPayload struct { AddressFamily *UpdateAreaAddressFamily `json:"addressFamily,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_partial_update_network_payload.go b/services/iaas/v1api/model_partial_update_network_payload.go index 0dd8893dbb..268d2ec909 100644 --- a/services/iaas/v1api/model_partial_update_network_payload.go +++ b/services/iaas/v1api/model_partial_update_network_payload.go @@ -21,9 +21,11 @@ var _ MappedNullable = &PartialUpdateNetworkPayload{} // PartialUpdateNetworkPayload Object that represents the request body for a network update. type PartialUpdateNetworkPayload struct { AddressFamily *UpdateNetworkAddressFamily `json:"addressFamily,omitempty"` + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` @@ -83,6 +85,38 @@ func (o *PartialUpdateNetworkPayload) SetAddressFamily(v UpdateNetworkAddressFam o.AddressFamily = &v } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PartialUpdateNetworkPayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateNetworkPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PartialUpdateNetworkPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PartialUpdateNetworkPayload) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *PartialUpdateNetworkPayload) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -224,6 +258,9 @@ func (o PartialUpdateNetworkPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.AddressFamily) { toSerialize["addressFamily"] = o.AddressFamily } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -259,6 +296,7 @@ func (o *PartialUpdateNetworkPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "addressFamily") + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "labels") delete(additionalProperties, "name") diff --git a/services/iaas/v1api/model_public_ip.go b/services/iaas/v1api/model_public_ip.go index 059a574422..c500f73c83 100644 --- a/services/iaas/v1api/model_public_ip.go +++ b/services/iaas/v1api/model_public_ip.go @@ -13,6 +13,7 @@ package v1api import ( "encoding/json" + "time" ) // checks if the PublicIp type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &PublicIp{} // PublicIp Object that represents a public IP. type PublicIp struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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 an IP address. Ip *string `json:"ip,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewPublicIpWithDefaults() *PublicIp { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PublicIp) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicIp) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PublicIp) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PublicIp) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *PublicIp) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *PublicIp) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PublicIp) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicIp) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PublicIp) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PublicIp) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o PublicIp) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o PublicIp) MarshalJSON() ([]byte, error) { func (o PublicIp) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o PublicIp) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *PublicIp) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_route.go b/services/iaas/v1api/model_route.go index 25dd59e19b..5abe2d942c 100644 --- a/services/iaas/v1api/model_route.go +++ b/services/iaas/v1api/model_route.go @@ -24,7 +24,7 @@ var _ MappedNullable = &Route{} type Route struct { // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an IP address. Nexthop string `json:"nexthop" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` diff --git a/services/iaas/v1api/model_security_group.go b/services/iaas/v1api/model_security_group.go index aee7b26207..66fcdd69d2 100644 --- a/services/iaas/v1api/model_security_group.go +++ b/services/iaas/v1api/model_security_group.go @@ -28,7 +28,7 @@ type SecurityGroup struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v1api/model_server.go b/services/iaas/v1api/model_server.go index 42b81ba7d1..4e52d4d9d9 100644 --- a/services/iaas/v1api/model_server.go +++ b/services/iaas/v1api/model_server.go @@ -40,7 +40,7 @@ type Server struct { ImageId *string `json:"imageId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The SSH keypair used during the server creation. KeypairName *string `json:"keypairName,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` diff --git a/services/iaas/v1api/model_server_network.go b/services/iaas/v1api/model_server_network.go index 24f01b189f..c1a279cf47 100644 --- a/services/iaas/v1api/model_server_network.go +++ b/services/iaas/v1api/model_server_network.go @@ -14,6 +14,7 @@ package v1api import ( "encoding/json" "fmt" + "time" ) // checks if the ServerNetwork type satisfies the MappedNullable interface at compile time @@ -23,6 +24,8 @@ var _ MappedNullable = &ServerNetwork{} type ServerNetwork struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an IP address. Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. @@ -40,7 +43,9 @@ type ServerNetwork struct { // Object that represents an IP address. PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list of UUIDs. - SecurityGroups []string `json:"securityGroups,omitempty"` + SecurityGroups []string `json:"securityGroups,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -100,6 +105,38 @@ func (o *ServerNetwork) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ServerNetwork) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ServerNetwork) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ServerNetwork) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetIpv4 returns the Ipv4 field value if set, zero value otherwise. func (o *ServerNetwork) GetIpv4() string { if o == nil || IsNil(o.Ipv4) { @@ -348,6 +385,38 @@ func (o *ServerNetwork) SetSecurityGroups(v []string) { o.SecurityGroups = v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ServerNetwork) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ServerNetwork) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ServerNetwork) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o ServerNetwork) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -361,6 +430,9 @@ func (o ServerNetwork) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Ipv4) { toSerialize["ipv4"] = o.Ipv4 } @@ -378,6 +450,9 @@ func (o ServerNetwork) ToMap() (map[string]interface{}, error) { if !IsNil(o.SecurityGroups) { toSerialize["securityGroups"] = o.SecurityGroups } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -426,6 +501,7 @@ func (o *ServerNetwork) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "ipv4") delete(additionalProperties, "ipv6") delete(additionalProperties, "mac") @@ -435,6 +511,7 @@ func (o *ServerNetwork) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "nicSecurity") delete(additionalProperties, "publicIp") delete(additionalProperties, "securityGroups") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_snapshot.go b/services/iaas/v1api/model_snapshot.go index 6ac92a6949..faa09c019d 100644 --- a/services/iaas/v1api/model_snapshot.go +++ b/services/iaas/v1api/model_snapshot.go @@ -30,7 +30,7 @@ type Snapshot struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_update_backup_payload.go b/services/iaas/v1api/model_update_backup_payload.go index 8791527bde..1ddf2335ea 100644 --- a/services/iaas/v1api/model_update_backup_payload.go +++ b/services/iaas/v1api/model_update_backup_payload.go @@ -31,7 +31,7 @@ type UpdateBackupPayload struct { 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_update_image_payload.go b/services/iaas/v1api/model_update_image_payload.go index da3f15dca1..ddf8d4edf3 100644 --- a/services/iaas/v1api/model_update_image_payload.go +++ b/services/iaas/v1api/model_update_image_payload.go @@ -24,7 +24,7 @@ type UpdateImagePayload struct { Config *ImageConfig `json:"config,omitempty"` // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. DiskFormat *string `json:"diskFormat,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v1api/model_update_key_pair_payload.go b/services/iaas/v1api/model_update_key_pair_payload.go index 13c2bfc4bc..3365108ce1 100644 --- a/services/iaas/v1api/model_update_key_pair_payload.go +++ b/services/iaas/v1api/model_update_key_pair_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateKeyPairPayload{} // UpdateKeyPairPayload Object that represents an update request body of a public key of an SSH keypair. type UpdateKeyPairPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_update_network_area_route_payload.go b/services/iaas/v1api/model_update_network_area_route_payload.go index 9180e3224b..dc2c6c938f 100644 --- a/services/iaas/v1api/model_update_network_area_route_payload.go +++ b/services/iaas/v1api/model_update_network_area_route_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateNetworkAreaRoutePayload{} // UpdateNetworkAreaRoutePayload Object that represents the request body for a route update. type UpdateNetworkAreaRoutePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_update_nic_payload.go b/services/iaas/v1api/model_update_nic_payload.go index 1ac98e92a1..18a524928a 100644 --- a/services/iaas/v1api/model_update_nic_payload.go +++ b/services/iaas/v1api/model_update_nic_payload.go @@ -24,7 +24,7 @@ type UpdateNicPayload struct { AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_update_public_ip_payload.go b/services/iaas/v1api/model_update_public_ip_payload.go index a7ce836528..c3ab17095e 100644 --- a/services/iaas/v1api/model_update_public_ip_payload.go +++ b/services/iaas/v1api/model_update_public_ip_payload.go @@ -13,6 +13,7 @@ package v1api import ( "encoding/json" + "time" ) // checks if the UpdatePublicIPPayload type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &UpdatePublicIPPayload{} // UpdatePublicIPPayload Object that represents a public IP. type UpdatePublicIPPayload struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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 an IP address. Ip *string `json:"ip,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewUpdatePublicIPPayloadWithDefaults() *UpdatePublicIPPayload { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *UpdatePublicIPPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePublicIPPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *UpdatePublicIPPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *UpdatePublicIPPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *UpdatePublicIPPayload) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *UpdatePublicIPPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePublicIPPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *UpdatePublicIPPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o UpdatePublicIPPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o UpdatePublicIPPayload) MarshalJSON() ([]byte, error) { func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *UpdatePublicIPPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_update_security_group_payload.go b/services/iaas/v1api/model_update_security_group_payload.go index ad38bf03c4..53058aa7be 100644 --- a/services/iaas/v1api/model_update_security_group_payload.go +++ b/services/iaas/v1api/model_update_security_group_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &UpdateSecurityGroupPayload{} type UpdateSecurityGroupPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_update_server_payload.go b/services/iaas/v1api/model_update_server_payload.go index ab0c49d3b8..4f8cbaa2e4 100644 --- a/services/iaas/v1api/model_update_server_payload.go +++ b/services/iaas/v1api/model_update_server_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateServerPayload{} // UpdateServerPayload Object that represents an update request body of a server. type UpdateServerPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` diff --git a/services/iaas/v1api/model_update_snapshot_payload.go b/services/iaas/v1api/model_update_snapshot_payload.go index af0fee1ffe..1a3db25dda 100644 --- a/services/iaas/v1api/model_update_snapshot_payload.go +++ b/services/iaas/v1api/model_update_snapshot_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &UpdateSnapshotPayload{} type UpdateSnapshotPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_update_volume_payload.go b/services/iaas/v1api/model_update_volume_payload.go index 206ea639ed..b66daa2b9a 100644 --- a/services/iaas/v1api/model_update_volume_payload.go +++ b/services/iaas/v1api/model_update_volume_payload.go @@ -25,7 +25,7 @@ type UpdateVolumePayload struct { // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_volume.go b/services/iaas/v1api/model_volume.go index 5d4e8d0c46..e4bc50d89f 100644 --- a/services/iaas/v1api/model_volume.go +++ b/services/iaas/v1api/model_volume.go @@ -36,7 +36,7 @@ type Volume struct { // 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}$"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v1api/model_volume_performance_class.go b/services/iaas/v1api/model_volume_performance_class.go index 33b839ce78..decf1acbe6 100644 --- a/services/iaas/v1api/model_volume_performance_class.go +++ b/services/iaas/v1api/model_volume_performance_class.go @@ -25,7 +25,7 @@ type VolumePerformanceClass struct { Description *string `json:"description,omitempty"` // Input/Output Operations per second. Iops *int64 `json:"iops,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v2alpha1api/api_default.go b/services/iaas/v2alpha1api/api_default.go deleted file mode 100644 index 7daf31c224..0000000000 --- a/services/iaas/v2alpha1api/api_default.go +++ /dev/null @@ -1,9274 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2alpha1api - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "strings" - - "github.com/stackitcloud/stackit-sdk-go/core/config" - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" -) - -type DefaultAPI interface { - - /* - AddRoutesToRoutingTable Create new routes in a routing table. - - Create new routes in an existing routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiAddRoutesToRoutingTableRequest - */ - AddRoutesToRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiAddRoutesToRoutingTableRequest - - // AddRoutesToRoutingTableExecute executes the request - // @return RouteListResponse - AddRoutesToRoutingTableExecute(r ApiAddRoutesToRoutingTableRequest) (*RouteListResponse, error) - - /* - AddRoutingTableToArea Create new routing table in a network area. - - Create a new routing table in an existing network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @return ApiAddRoutingTableToAreaRequest - */ - AddRoutingTableToArea(ctx context.Context, organizationId string, areaId string, region string) ApiAddRoutingTableToAreaRequest - - // AddRoutingTableToAreaExecute executes the request - // @return RoutingTable - AddRoutingTableToAreaExecute(r ApiAddRoutingTableToAreaRequest) (*RoutingTable, error) - - /* - AddVPCRoutingTable Create a new regional routing table in a VPC. - - Create a new routing table in an existing VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiAddVPCRoutingTableRequest - */ - AddVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string) ApiAddVPCRoutingTableRequest - - // AddVPCRoutingTableExecute executes the request - // @return VPCRoutingTable - AddVPCRoutingTableExecute(r ApiAddVPCRoutingTableRequest) (*VPCRoutingTable, error) - - /* - AddVPCStaticRoute Create new regional static route. - - Create a new static route in the VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiAddVPCStaticRouteRequest - */ - AddVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiAddVPCStaticRouteRequest - - // AddVPCStaticRouteExecute executes the request - // @return Route - AddVPCStaticRouteExecute(r ApiAddVPCStaticRouteRequest) (*Route, error) - - /* - CreateNetwork Create new network. - - Create a new network in a project. `nameservers` will be filled from `defaultNameservers` of the respective area if not specified. If the project has `internetAccess` enabled and this is the first network in the project this might incur cost. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @return ApiCreateNetworkRequest - */ - CreateNetwork(ctx context.Context, projectId string, region string) ApiCreateNetworkRequest - - // CreateNetworkExecute executes the request - // @return Network - CreateNetworkExecute(r ApiCreateNetworkRequest) (*Network, error) - - /* - CreateVPC Create a new VPC. - - Create a new VPC in a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @return ApiCreateVPCRequest - */ - CreateVPC(ctx context.Context, projectId string) ApiCreateVPCRequest - - // CreateVPCExecute executes the request - // @return VPC - CreateVPCExecute(r ApiCreateVPCRequest) (*VPC, error) - - /* - CreateVPCNetworkRange Create new regional network ranges in a VPC. - - Create a new network range in an existing VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiCreateVPCNetworkRangeRequest - */ - CreateVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string) ApiCreateVPCNetworkRangeRequest - - // CreateVPCNetworkRangeExecute executes the request - // @return VPCNetworkRange - CreateVPCNetworkRangeExecute(r ApiCreateVPCNetworkRangeRequest) (*VPCNetworkRange, error) - - /* - CreateVPCRegion Create the regional configuration of a VPC. - - Create the configuration of a region for a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiCreateVPCRegionRequest - */ - CreateVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiCreateVPCRegionRequest - - // CreateVPCRegionExecute executes the request - // @return RegionalVPC - CreateVPCRegionExecute(r ApiCreateVPCRegionRequest) (*RegionalVPC, error) - - /* - DeleteNetwork Delete network. - - Delete a network. If the network is still in use, the deletion will fail. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiDeleteNetworkRequest - */ - DeleteNetwork(ctx context.Context, projectId string, region string, networkId string) ApiDeleteNetworkRequest - - // DeleteNetworkExecute executes the request - DeleteNetworkExecute(r ApiDeleteNetworkRequest) error - - /* - DeleteRouteFromRoutingTable Delete a route in a routing table. - - Delete a route in an existing routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiDeleteRouteFromRoutingTableRequest - */ - DeleteRouteFromRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiDeleteRouteFromRoutingTableRequest - - // DeleteRouteFromRoutingTableExecute executes the request - DeleteRouteFromRoutingTableExecute(r ApiDeleteRouteFromRoutingTableRequest) error - - /* - DeleteRoutingTableFromArea Delete a routing table. - - Delete a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiDeleteRoutingTableFromAreaRequest - */ - DeleteRoutingTableFromArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiDeleteRoutingTableFromAreaRequest - - // DeleteRoutingTableFromAreaExecute executes the request - DeleteRoutingTableFromAreaExecute(r ApiDeleteRoutingTableFromAreaRequest) error - - /* - DeleteVPC Delete a VPC. - - Delete an existing VPC in a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @return ApiDeleteVPCRequest - */ - DeleteVPC(ctx context.Context, projectId string, vpcId string) ApiDeleteVPCRequest - - // DeleteVPCExecute executes the request - DeleteVPCExecute(r ApiDeleteVPCRequest) error - - /* - DeleteVPCNetworkRange Delete a regional network range. - - Delete a network range of a VPC for this region, if the network range is not used anymore. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiDeleteVPCNetworkRangeRequest - */ - DeleteVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiDeleteVPCNetworkRangeRequest - - // DeleteVPCNetworkRangeExecute executes the request - DeleteVPCNetworkRangeExecute(r ApiDeleteVPCNetworkRangeRequest) error - - /* - DeleteVPCRegion Delete the regional configuration of a VPC. - - Delete the current configuration of a region for a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiDeleteVPCRegionRequest - */ - DeleteVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiDeleteVPCRegionRequest - - // DeleteVPCRegionExecute executes the request - DeleteVPCRegionExecute(r ApiDeleteVPCRegionRequest) error - - /* - DeleteVPCRoutingTable Delete a regional routing table. - - Delete a routing table of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiDeleteVPCRoutingTableRequest - */ - DeleteVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiDeleteVPCRoutingTableRequest - - // DeleteVPCRoutingTableExecute executes the request - DeleteVPCRoutingTableExecute(r ApiDeleteVPCRoutingTableRequest) error - - /* - DeleteVPCStaticRoute Delete a regional static route. - - Delete a static route of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiDeleteVPCStaticRouteRequest - */ - DeleteVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiDeleteVPCStaticRouteRequest - - // DeleteVPCStaticRouteExecute executes the request - DeleteVPCStaticRouteExecute(r ApiDeleteVPCStaticRouteRequest) error - - /* - GetNetwork Get network details. - - Get details about a network of a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiGetNetworkRequest - */ - GetNetwork(ctx context.Context, projectId string, region string, networkId string) ApiGetNetworkRequest - - // GetNetworkExecute executes the request - // @return Network - GetNetworkExecute(r ApiGetNetworkRequest) (*Network, error) - - /* - GetRouteOfRoutingTable Get details about a route of a routing table. - - Get details about a route defined in a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiGetRouteOfRoutingTableRequest - */ - GetRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiGetRouteOfRoutingTableRequest - - // GetRouteOfRoutingTableExecute executes the request - // @return Route - GetRouteOfRoutingTableExecute(r ApiGetRouteOfRoutingTableRequest) (*Route, error) - - /* - GetRoutingTableOfArea Get details about a routing table. - - Get details about a routing table defined in a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiGetRoutingTableOfAreaRequest - */ - GetRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiGetRoutingTableOfAreaRequest - - // GetRoutingTableOfAreaExecute executes the request - // @return RoutingTable - GetRoutingTableOfAreaExecute(r ApiGetRoutingTableOfAreaRequest) (*RoutingTable, error) - - /* - GetVPC Get details about a VPC. - - Get details about a VPC in a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @return ApiGetVPCRequest - */ - GetVPC(ctx context.Context, projectId string, vpcId string) ApiGetVPCRequest - - // GetVPCExecute executes the request - // @return VPC - GetVPCExecute(r ApiGetVPCRequest) (*VPC, error) - - /* - GetVPCNetworkRange Get details about a regional network range. - - Get details about a network range in a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiGetVPCNetworkRangeRequest - */ - GetVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiGetVPCNetworkRangeRequest - - // GetVPCNetworkRangeExecute executes the request - // @return VPCNetworkRange - GetVPCNetworkRangeExecute(r ApiGetVPCNetworkRangeRequest) (*VPCNetworkRange, error) - - /* - GetVPCRegion Get the regional configuration of a VPC. - - Get the current configuration of a region for a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiGetVPCRegionRequest - */ - GetVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiGetVPCRegionRequest - - // GetVPCRegionExecute executes the request - // @return RegionalVPC - GetVPCRegionExecute(r ApiGetVPCRegionRequest) (*RegionalVPC, error) - - /* - GetVPCRoutingTable Get details about a regional routing table. - - Get details about a routing table of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiGetVPCRoutingTableRequest - */ - GetVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiGetVPCRoutingTableRequest - - // GetVPCRoutingTableExecute executes the request - // @return VPCRoutingTable - GetVPCRoutingTableExecute(r ApiGetVPCRoutingTableRequest) (*VPCRoutingTable, error) - - /* - GetVPCStaticRoute Get details about a regional static route. - - Get details about a static route of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiGetVPCStaticRouteRequest - */ - GetVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiGetVPCStaticRouteRequest - - // GetVPCStaticRouteExecute executes the request - // @return Route - GetVPCStaticRouteExecute(r ApiGetVPCStaticRouteRequest) (*Route, error) - - /* - ListNetworks List all networks inside a project. - - Get a list of all networks inside a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @return ApiListNetworksRequest - */ - ListNetworks(ctx context.Context, projectId string, region string) ApiListNetworksRequest - - // ListNetworksExecute executes the request - // @return NetworkListResponse - ListNetworksExecute(r ApiListNetworksRequest) (*NetworkListResponse, error) - - /* - ListNetworksOfRoutingTable List all networks in a routing table. - - Get a list of all networks in a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiListNetworksOfRoutingTableRequest - */ - ListNetworksOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiListNetworksOfRoutingTableRequest - - // ListNetworksOfRoutingTableExecute executes the request - // @return NetworkListResponse - ListNetworksOfRoutingTableExecute(r ApiListNetworksOfRoutingTableRequest) (*NetworkListResponse, error) - - /* - ListRoutesOfRoutingTable List all routes in a routing table. - - Get a list of all routes in a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiListRoutesOfRoutingTableRequest - */ - ListRoutesOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiListRoutesOfRoutingTableRequest - - // ListRoutesOfRoutingTableExecute executes the request - // @return RouteListResponse - ListRoutesOfRoutingTableExecute(r ApiListRoutesOfRoutingTableRequest) (*RouteListResponse, error) - - /* - ListRoutingTablesOfArea List all routing tables in a network area. - - Get a list of all routing tables in a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @return ApiListRoutingTablesOfAreaRequest - */ - ListRoutingTablesOfArea(ctx context.Context, organizationId string, areaId string, region string) ApiListRoutingTablesOfAreaRequest - - // ListRoutingTablesOfAreaExecute executes the request - // @return RoutingTableListResponse - ListRoutingTablesOfAreaExecute(r ApiListRoutingTablesOfAreaRequest) (*RoutingTableListResponse, error) - - /* - ListVPCNetworkRanges List all regional network ranges in a VPC. - - Get a list of all network ranges in a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiListVPCNetworkRangesRequest - */ - ListVPCNetworkRanges(ctx context.Context, projectId string, vpcId string, region string) ApiListVPCNetworkRangesRequest - - // ListVPCNetworkRangesExecute executes the request - // @return VPCNetworkRangeList - ListVPCNetworkRangesExecute(r ApiListVPCNetworkRangesRequest) (*VPCNetworkRangeList, error) - - /* - ListVPCRegions List all configured regions in a VPC. - - Get a list of all configured regions in a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @return ApiListVPCRegionsRequest - */ - ListVPCRegions(ctx context.Context, projectId string, vpcId string) ApiListVPCRegionsRequest - - // ListVPCRegionsExecute executes the request - // @return RegionalVPCList - ListVPCRegionsExecute(r ApiListVPCRegionsRequest) (*RegionalVPCList, error) - - /* - ListVPCRoutingTables List all regional routing tables in a VPC. - - Get a list of all routing tables in a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiListVPCRoutingTablesRequest - */ - ListVPCRoutingTables(ctx context.Context, projectId string, vpcId string, region string) ApiListVPCRoutingTablesRequest - - // ListVPCRoutingTablesExecute executes the request - // @return VPCRoutingTableList - ListVPCRoutingTablesExecute(r ApiListVPCRoutingTablesRequest) (*VPCRoutingTableList, error) - - /* - ListVPCStaticRoutes List all regional static routes in a VPC. - - Get a list of all static routes of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiListVPCStaticRoutesRequest - */ - ListVPCStaticRoutes(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiListVPCStaticRoutesRequest - - // ListVPCStaticRoutesExecute executes the request - // @return RouteListResponse - ListVPCStaticRoutesExecute(r ApiListVPCStaticRoutesRequest) (*RouteListResponse, error) - - /* - ListVPCs List project VPCs. - - List all visible VPCs of this project. To list shared VPCs from other projects of the organization use the `List all shared VPCs` endpoint. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @return ApiListVPCsRequest - */ - ListVPCs(ctx context.Context, projectId string) ApiListVPCsRequest - - // ListVPCsExecute executes the request - // @return VPCList - ListVPCsExecute(r ApiListVPCsRequest) (*VPCList, error) - - /* - PartialUpdateNetwork Update network settings. - - Update the settings of a network inside a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiPartialUpdateNetworkRequest - */ - PartialUpdateNetwork(ctx context.Context, projectId string, region string, networkId string) ApiPartialUpdateNetworkRequest - - // PartialUpdateNetworkExecute executes the request - PartialUpdateNetworkExecute(r ApiPartialUpdateNetworkRequest) error - - /* - PartialUpdateVPC Update VPC settings. - - Update the settings of a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @return ApiPartialUpdateVPCRequest - */ - PartialUpdateVPC(ctx context.Context, projectId string, vpcId string) ApiPartialUpdateVPCRequest - - // PartialUpdateVPCExecute executes the request - // @return VPC - PartialUpdateVPCExecute(r ApiPartialUpdateVPCRequest) (*VPC, error) - - /* - UpdateRouteOfRoutingTable Update a route of a routing table. - - Update a route defined in a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiUpdateRouteOfRoutingTableRequest - */ - UpdateRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiUpdateRouteOfRoutingTableRequest - - // UpdateRouteOfRoutingTableExecute executes the request - // @return Route - UpdateRouteOfRoutingTableExecute(r ApiUpdateRouteOfRoutingTableRequest) (*Route, error) - - /* - UpdateRoutingTableOfArea Update a routing table. - - Update a routing table defined in a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiUpdateRoutingTableOfAreaRequest - */ - UpdateRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiUpdateRoutingTableOfAreaRequest - - // UpdateRoutingTableOfAreaExecute executes the request - // @return RoutingTable - UpdateRoutingTableOfAreaExecute(r ApiUpdateRoutingTableOfAreaRequest) (*RoutingTable, error) - - /* - UpdateVPCNetworkRange Update a regional network range. - - Update a network range of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiUpdateVPCNetworkRangeRequest - */ - UpdateVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiUpdateVPCNetworkRangeRequest - - // UpdateVPCNetworkRangeExecute executes the request - // @return VPCNetworkRange - UpdateVPCNetworkRangeExecute(r ApiUpdateVPCNetworkRangeRequest) (*VPCNetworkRange, error) - - /* - UpdateVPCRegion Update the regional configuration of a VPC. - - Update the current configuration of a region for a VPC. - - **Example:** Update nameservers. - - **Request Body:** - ```json - { - "ipv4": { - "defaultNameservers": [ - "10.1.2.10", - "10.1.2.11" - ], - } - } - ``` - - **Result:** - * `ipv4.defaultNameservers`: **Updated** as a new value was provided. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiUpdateVPCRegionRequest - */ - UpdateVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiUpdateVPCRegionRequest - - // UpdateVPCRegionExecute executes the request - // @return RegionalVPC - UpdateVPCRegionExecute(r ApiUpdateVPCRegionRequest) (*RegionalVPC, error) - - /* - UpdateVPCRoutingTable Update a regional routing table. - - Update a routing table of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiUpdateVPCRoutingTableRequest - */ - UpdateVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiUpdateVPCRoutingTableRequest - - // UpdateVPCRoutingTableExecute executes the request - // @return VPCRoutingTable - UpdateVPCRoutingTableExecute(r ApiUpdateVPCRoutingTableRequest) (*VPCRoutingTable, error) - - /* - UpdateVPCStaticRoute Update a regional static route. - - Update a static route of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiUpdateVPCStaticRouteRequest - */ - UpdateVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiUpdateVPCStaticRouteRequest - - // UpdateVPCStaticRouteExecute executes the request - // @return Route - UpdateVPCStaticRouteExecute(r ApiUpdateVPCStaticRouteRequest) (*Route, error) -} - -// DefaultAPIService DefaultAPI service -type DefaultAPIService service - -type ApiAddRoutesToRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string - addRoutesToRoutingTablePayload *AddRoutesToRoutingTablePayload -} - -// Request an addition of routes to a routing table. -func (r ApiAddRoutesToRoutingTableRequest) AddRoutesToRoutingTablePayload(addRoutesToRoutingTablePayload AddRoutesToRoutingTablePayload) ApiAddRoutesToRoutingTableRequest { - r.addRoutesToRoutingTablePayload = &addRoutesToRoutingTablePayload - return r -} - -func (r ApiAddRoutesToRoutingTableRequest) Execute() (*RouteListResponse, error) { - return r.ApiService.AddRoutesToRoutingTableExecute(r) -} - -/* -AddRoutesToRoutingTable Create new routes in a routing table. - -Create new routes in an existing routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiAddRoutesToRoutingTableRequest -*/ -func (a *DefaultAPIService) AddRoutesToRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiAddRoutesToRoutingTableRequest { - return ApiAddRoutesToRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return RouteListResponse -func (a *DefaultAPIService) AddRoutesToRoutingTableExecute(r ApiAddRoutesToRoutingTableRequest) (*RouteListResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RouteListResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.AddRoutesToRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - if r.addRoutesToRoutingTablePayload == nil { - return localVarReturnValue, reportError("addRoutesToRoutingTablePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.addRoutesToRoutingTablePayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiAddRoutingTableToAreaRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - addRoutingTableToAreaPayload *AddRoutingTableToAreaPayload -} - -// Request an addition of a routing table to an area. -func (r ApiAddRoutingTableToAreaRequest) AddRoutingTableToAreaPayload(addRoutingTableToAreaPayload AddRoutingTableToAreaPayload) ApiAddRoutingTableToAreaRequest { - r.addRoutingTableToAreaPayload = &addRoutingTableToAreaPayload - return r -} - -func (r ApiAddRoutingTableToAreaRequest) Execute() (*RoutingTable, error) { - return r.ApiService.AddRoutingTableToAreaExecute(r) -} - -/* -AddRoutingTableToArea Create new routing table in a network area. - -Create a new routing table in an existing network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @return ApiAddRoutingTableToAreaRequest -*/ -func (a *DefaultAPIService) AddRoutingTableToArea(ctx context.Context, organizationId string, areaId string, region string) ApiAddRoutingTableToAreaRequest { - return ApiAddRoutingTableToAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Execute executes the request -// -// @return RoutingTable -func (a *DefaultAPIService) AddRoutingTableToAreaExecute(r ApiAddRoutingTableToAreaRequest) (*RoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RoutingTable - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.AddRoutingTableToArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - if r.addRoutingTableToAreaPayload == nil { - return localVarReturnValue, reportError("addRoutingTableToAreaPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.addRoutingTableToAreaPayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiAddVPCRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - addVPCRoutingTablePayload *AddVPCRoutingTablePayload -} - -// Request an addition of a routing table to a VPC. -func (r ApiAddVPCRoutingTableRequest) AddVPCRoutingTablePayload(addVPCRoutingTablePayload AddVPCRoutingTablePayload) ApiAddVPCRoutingTableRequest { - r.addVPCRoutingTablePayload = &addVPCRoutingTablePayload - return r -} - -func (r ApiAddVPCRoutingTableRequest) Execute() (*VPCRoutingTable, error) { - return r.ApiService.AddVPCRoutingTableExecute(r) -} - -/* -AddVPCRoutingTable Create a new regional routing table in a VPC. - -Create a new routing table in an existing VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiAddVPCRoutingTableRequest -*/ -func (a *DefaultAPIService) AddVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string) ApiAddVPCRoutingTableRequest { - return ApiAddVPCRoutingTableRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// Execute executes the request -// -// @return VPCRoutingTable -func (a *DefaultAPIService) AddVPCRoutingTableExecute(r ApiAddVPCRoutingTableRequest) (*VPCRoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCRoutingTable - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.AddVPCRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if r.addVPCRoutingTablePayload == nil { - return localVarReturnValue, reportError("addVPCRoutingTablePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.addVPCRoutingTablePayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiAddVPCStaticRouteRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - routingTableId string - addVPCStaticRoutePayload *AddVPCStaticRoutePayload -} - -// Request to add a static route to a VPC. -func (r ApiAddVPCStaticRouteRequest) AddVPCStaticRoutePayload(addVPCStaticRoutePayload AddVPCStaticRoutePayload) ApiAddVPCStaticRouteRequest { - r.addVPCStaticRoutePayload = &addVPCStaticRoutePayload - return r -} - -func (r ApiAddVPCStaticRouteRequest) Execute() (*Route, error) { - return r.ApiService.AddVPCStaticRouteExecute(r) -} - -/* -AddVPCStaticRoute Create new regional static route. - -Create a new static route in the VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiAddVPCStaticRouteRequest -*/ -func (a *DefaultAPIService) AddVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiAddVPCStaticRouteRequest { - return ApiAddVPCStaticRouteRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return Route -func (a *DefaultAPIService) AddVPCStaticRouteExecute(r ApiAddVPCStaticRouteRequest) (*Route, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.AddVPCStaticRoute") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - if r.addVPCStaticRoutePayload == nil { - return localVarReturnValue, reportError("addVPCStaticRoutePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.addVPCStaticRoutePayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiCreateNetworkRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - createNetworkPayload *CreateNetworkPayload -} - -// Request a network creation. -func (r ApiCreateNetworkRequest) CreateNetworkPayload(createNetworkPayload CreateNetworkPayload) ApiCreateNetworkRequest { - r.createNetworkPayload = &createNetworkPayload - return r -} - -func (r ApiCreateNetworkRequest) Execute() (*Network, error) { - return r.ApiService.CreateNetworkExecute(r) -} - -/* -CreateNetwork Create new network. - -Create a new network in a project. `nameservers` will be filled from `defaultNameservers` of the respective area if not specified. If the project has `internetAccess` enabled and this is the first network in the project this might incur cost. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @return ApiCreateNetworkRequest -*/ -func (a *DefaultAPIService) CreateNetwork(ctx context.Context, projectId string, region string) ApiCreateNetworkRequest { - return ApiCreateNetworkRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Execute executes the request -// -// @return Network -func (a *DefaultAPIService) CreateNetworkExecute(r ApiCreateNetworkRequest) (*Network, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Network - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateNetwork") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/regions/{region}/networks" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if r.createNetworkPayload == nil { - return localVarReturnValue, reportError("createNetworkPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.createNetworkPayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiCreateVPCRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - createVPCPayload *CreateVPCPayload -} - -// Request a VPC creation. -func (r ApiCreateVPCRequest) CreateVPCPayload(createVPCPayload CreateVPCPayload) ApiCreateVPCRequest { - r.createVPCPayload = &createVPCPayload - return r -} - -func (r ApiCreateVPCRequest) Execute() (*VPC, error) { - return r.ApiService.CreateVPCExecute(r) -} - -/* -CreateVPC Create a new VPC. - -Create a new VPC in a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @return ApiCreateVPCRequest -*/ -func (a *DefaultAPIService) CreateVPC(ctx context.Context, projectId string) ApiCreateVPCRequest { - return ApiCreateVPCRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - } -} - -// Execute executes the request -// -// @return VPC -func (a *DefaultAPIService) CreateVPCExecute(r ApiCreateVPCRequest) (*VPC, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPC - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateVPC") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if r.createVPCPayload == nil { - return localVarReturnValue, reportError("createVPCPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.createVPCPayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiCreateVPCNetworkRangeRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - createVPCNetworkRangePayload *CreateVPCNetworkRangePayload -} - -// Request to add an additional network range to a VPC. -func (r ApiCreateVPCNetworkRangeRequest) CreateVPCNetworkRangePayload(createVPCNetworkRangePayload CreateVPCNetworkRangePayload) ApiCreateVPCNetworkRangeRequest { - r.createVPCNetworkRangePayload = &createVPCNetworkRangePayload - return r -} - -func (r ApiCreateVPCNetworkRangeRequest) Execute() (*VPCNetworkRange, error) { - return r.ApiService.CreateVPCNetworkRangeExecute(r) -} - -/* -CreateVPCNetworkRange Create new regional network ranges in a VPC. - -Create a new network range in an existing VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiCreateVPCNetworkRangeRequest -*/ -func (a *DefaultAPIService) CreateVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string) ApiCreateVPCNetworkRangeRequest { - return ApiCreateVPCNetworkRangeRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// Execute executes the request -// -// @return VPCNetworkRange -func (a *DefaultAPIService) CreateVPCNetworkRangeExecute(r ApiCreateVPCNetworkRangeRequest) (*VPCNetworkRange, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCNetworkRange - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateVPCNetworkRange") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if r.createVPCNetworkRangePayload == nil { - return localVarReturnValue, reportError("createVPCNetworkRangePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.createVPCNetworkRangePayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiCreateVPCRegionRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - createVPCRegionPayload *CreateVPCRegionPayload -} - -// Request to add a new regional VPC configuration. -func (r ApiCreateVPCRegionRequest) CreateVPCRegionPayload(createVPCRegionPayload CreateVPCRegionPayload) ApiCreateVPCRegionRequest { - r.createVPCRegionPayload = &createVPCRegionPayload - return r -} - -func (r ApiCreateVPCRegionRequest) Execute() (*RegionalVPC, error) { - return r.ApiService.CreateVPCRegionExecute(r) -} - -/* -CreateVPCRegion Create the regional configuration of a VPC. - -Create the configuration of a region for a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiCreateVPCRegionRequest -*/ -func (a *DefaultAPIService) CreateVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiCreateVPCRegionRequest { - return ApiCreateVPCRegionRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// Execute executes the request -// -// @return RegionalVPC -func (a *DefaultAPIService) CreateVPCRegionExecute(r ApiCreateVPCRegionRequest) (*RegionalVPC, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegionalVPC - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateVPCRegion") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if r.createVPCRegionPayload == nil { - return localVarReturnValue, reportError("createVPCRegionPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.createVPCRegionPayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiDeleteNetworkRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - networkId string -} - -func (r ApiDeleteNetworkRequest) Execute() error { - return r.ApiService.DeleteNetworkExecute(r) -} - -/* -DeleteNetwork Delete network. - -Delete a network. If the network is still in use, the deletion will fail. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiDeleteNetworkRequest -*/ -func (a *DefaultAPIService) DeleteNetwork(ctx context.Context, projectId string, region string, networkId string) ApiDeleteNetworkRequest { - return ApiDeleteNetworkRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) DeleteNetworkExecute(r ApiDeleteNetworkRequest) error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteNetwork") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"networkId"+"}", url.PathEscape(parameterValueToString(r.networkId, "networkId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return reportError("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return reportError("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return reportError("networkId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiDeleteRouteFromRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string - routeId string -} - -func (r ApiDeleteRouteFromRoutingTableRequest) Execute() error { - return r.ApiService.DeleteRouteFromRoutingTableExecute(r) -} - -/* -DeleteRouteFromRoutingTable Delete a route in a routing table. - -Delete a route in an existing routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiDeleteRouteFromRoutingTableRequest -*/ -func (a *DefaultAPIService) DeleteRouteFromRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiDeleteRouteFromRoutingTableRequest { - return ApiDeleteRouteFromRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) DeleteRouteFromRoutingTableExecute(r ApiDeleteRouteFromRoutingTableRequest) error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteRouteFromRoutingTable") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routeId"+"}", url.PathEscape(parameterValueToString(r.routeId, "routeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return reportError("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return reportError("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return reportError("routeId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiDeleteRoutingTableFromAreaRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string -} - -func (r ApiDeleteRoutingTableFromAreaRequest) Execute() error { - return r.ApiService.DeleteRoutingTableFromAreaExecute(r) -} - -/* -DeleteRoutingTableFromArea Delete a routing table. - -Delete a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiDeleteRoutingTableFromAreaRequest -*/ -func (a *DefaultAPIService) DeleteRoutingTableFromArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiDeleteRoutingTableFromAreaRequest { - return ApiDeleteRoutingTableFromAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) DeleteRoutingTableFromAreaExecute(r ApiDeleteRoutingTableFromAreaRequest) error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteRoutingTableFromArea") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return reportError("routingTableId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiDeleteVPCRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string -} - -func (r ApiDeleteVPCRequest) Execute() error { - return r.ApiService.DeleteVPCExecute(r) -} - -/* -DeleteVPC Delete a VPC. - -Delete an existing VPC in a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @return ApiDeleteVPCRequest -*/ -func (a *DefaultAPIService) DeleteVPC(ctx context.Context, projectId string, vpcId string) ApiDeleteVPCRequest { - return ApiDeleteVPCRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) DeleteVPCExecute(r ApiDeleteVPCRequest) error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteVPC") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return reportError("vpcId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiDeleteVPCNetworkRangeRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - networkRangeId string -} - -func (r ApiDeleteVPCNetworkRangeRequest) Execute() error { - return r.ApiService.DeleteVPCNetworkRangeExecute(r) -} - -/* -DeleteVPCNetworkRange Delete a regional network range. - -Delete a network range of a VPC for this region, if the network range is not used anymore. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiDeleteVPCNetworkRangeRequest -*/ -func (a *DefaultAPIService) DeleteVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiDeleteVPCNetworkRangeRequest { - return ApiDeleteVPCNetworkRangeRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - networkRangeId: networkRangeId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) DeleteVPCNetworkRangeExecute(r ApiDeleteVPCNetworkRangeRequest) error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteVPCNetworkRange") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges/{networkRangeId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"networkRangeId"+"}", url.PathEscape(parameterValueToString(r.networkRangeId, "networkRangeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return reportError("vpcId must have less than 36 elements") - } - if strlen(r.networkRangeId) < 36 { - return reportError("networkRangeId must have at least 36 elements") - } - if strlen(r.networkRangeId) > 36 { - return reportError("networkRangeId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiDeleteVPCRegionRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string -} - -func (r ApiDeleteVPCRegionRequest) Execute() error { - return r.ApiService.DeleteVPCRegionExecute(r) -} - -/* -DeleteVPCRegion Delete the regional configuration of a VPC. - -Delete the current configuration of a region for a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiDeleteVPCRegionRequest -*/ -func (a *DefaultAPIService) DeleteVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiDeleteVPCRegionRequest { - return ApiDeleteVPCRegionRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// Execute executes the request -func (a *DefaultAPIService) DeleteVPCRegionExecute(r ApiDeleteVPCRegionRequest) error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteVPCRegion") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return reportError("vpcId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiDeleteVPCRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - routingTableId string -} - -func (r ApiDeleteVPCRoutingTableRequest) Execute() error { - return r.ApiService.DeleteVPCRoutingTableExecute(r) -} - -/* -DeleteVPCRoutingTable Delete a regional routing table. - -Delete a routing table of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiDeleteVPCRoutingTableRequest -*/ -func (a *DefaultAPIService) DeleteVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiDeleteVPCRoutingTableRequest { - return ApiDeleteVPCRoutingTableRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) DeleteVPCRoutingTableExecute(r ApiDeleteVPCRoutingTableRequest) error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteVPCRoutingTable") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return reportError("vpcId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return reportError("routingTableId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiDeleteVPCStaticRouteRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - routingTableId string - routeId string -} - -func (r ApiDeleteVPCStaticRouteRequest) Execute() error { - return r.ApiService.DeleteVPCStaticRouteExecute(r) -} - -/* -DeleteVPCStaticRoute Delete a regional static route. - -Delete a static route of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiDeleteVPCStaticRouteRequest -*/ -func (a *DefaultAPIService) DeleteVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiDeleteVPCStaticRouteRequest { - return ApiDeleteVPCStaticRouteRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) DeleteVPCStaticRouteExecute(r ApiDeleteVPCStaticRouteRequest) error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteVPCStaticRoute") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes/{routeId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routeId"+"}", url.PathEscape(parameterValueToString(r.routeId, "routeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return reportError("vpcId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return reportError("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return reportError("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return reportError("routeId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiGetNetworkRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - networkId string -} - -func (r ApiGetNetworkRequest) Execute() (*Network, error) { - return r.ApiService.GetNetworkExecute(r) -} - -/* -GetNetwork Get network details. - -Get details about a network of a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiGetNetworkRequest -*/ -func (a *DefaultAPIService) GetNetwork(ctx context.Context, projectId string, region string, networkId string) ApiGetNetworkRequest { - return ApiGetNetworkRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// Execute executes the request -// -// @return Network -func (a *DefaultAPIService) GetNetworkExecute(r ApiGetNetworkRequest) (*Network, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Network - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetNetwork") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"networkId"+"}", url.PathEscape(parameterValueToString(r.networkId, "networkId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return localVarReturnValue, reportError("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return localVarReturnValue, reportError("networkId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiGetRouteOfRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string - routeId string -} - -func (r ApiGetRouteOfRoutingTableRequest) Execute() (*Route, error) { - return r.ApiService.GetRouteOfRoutingTableExecute(r) -} - -/* -GetRouteOfRoutingTable Get details about a route of a routing table. - -Get details about a route defined in a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiGetRouteOfRoutingTableRequest -*/ -func (a *DefaultAPIService) GetRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiGetRouteOfRoutingTableRequest { - return ApiGetRouteOfRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Execute executes the request -// -// @return Route -func (a *DefaultAPIService) GetRouteOfRoutingTableExecute(r ApiGetRouteOfRoutingTableRequest) (*Route, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetRouteOfRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routeId"+"}", url.PathEscape(parameterValueToString(r.routeId, "routeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return localVarReturnValue, reportError("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return localVarReturnValue, reportError("routeId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiGetRoutingTableOfAreaRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string -} - -func (r ApiGetRoutingTableOfAreaRequest) Execute() (*RoutingTable, error) { - return r.ApiService.GetRoutingTableOfAreaExecute(r) -} - -/* -GetRoutingTableOfArea Get details about a routing table. - -Get details about a routing table defined in a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiGetRoutingTableOfAreaRequest -*/ -func (a *DefaultAPIService) GetRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiGetRoutingTableOfAreaRequest { - return ApiGetRoutingTableOfAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return RoutingTable -func (a *DefaultAPIService) GetRoutingTableOfAreaExecute(r ApiGetRoutingTableOfAreaRequest) (*RoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RoutingTable - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetRoutingTableOfArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiGetVPCRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string -} - -func (r ApiGetVPCRequest) Execute() (*VPC, error) { - return r.ApiService.GetVPCExecute(r) -} - -/* -GetVPC Get details about a VPC. - -Get details about a VPC in a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @return ApiGetVPCRequest -*/ -func (a *DefaultAPIService) GetVPC(ctx context.Context, projectId string, vpcId string) ApiGetVPCRequest { - return ApiGetVPCRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - } -} - -// Execute executes the request -// -// @return VPC -func (a *DefaultAPIService) GetVPCExecute(r ApiGetVPCRequest) (*VPC, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPC - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetVPC") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiGetVPCNetworkRangeRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - networkRangeId string -} - -func (r ApiGetVPCNetworkRangeRequest) Execute() (*VPCNetworkRange, error) { - return r.ApiService.GetVPCNetworkRangeExecute(r) -} - -/* -GetVPCNetworkRange Get details about a regional network range. - -Get details about a network range in a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiGetVPCNetworkRangeRequest -*/ -func (a *DefaultAPIService) GetVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiGetVPCNetworkRangeRequest { - return ApiGetVPCNetworkRangeRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - networkRangeId: networkRangeId, - } -} - -// Execute executes the request -// -// @return VPCNetworkRange -func (a *DefaultAPIService) GetVPCNetworkRangeExecute(r ApiGetVPCNetworkRangeRequest) (*VPCNetworkRange, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCNetworkRange - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetVPCNetworkRange") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges/{networkRangeId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"networkRangeId"+"}", url.PathEscape(parameterValueToString(r.networkRangeId, "networkRangeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if strlen(r.networkRangeId) < 36 { - return localVarReturnValue, reportError("networkRangeId must have at least 36 elements") - } - if strlen(r.networkRangeId) > 36 { - return localVarReturnValue, reportError("networkRangeId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiGetVPCRegionRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string -} - -func (r ApiGetVPCRegionRequest) Execute() (*RegionalVPC, error) { - return r.ApiService.GetVPCRegionExecute(r) -} - -/* -GetVPCRegion Get the regional configuration of a VPC. - -Get the current configuration of a region for a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiGetVPCRegionRequest -*/ -func (a *DefaultAPIService) GetVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiGetVPCRegionRequest { - return ApiGetVPCRegionRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// Execute executes the request -// -// @return RegionalVPC -func (a *DefaultAPIService) GetVPCRegionExecute(r ApiGetVPCRegionRequest) (*RegionalVPC, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegionalVPC - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetVPCRegion") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiGetVPCRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - routingTableId string -} - -func (r ApiGetVPCRoutingTableRequest) Execute() (*VPCRoutingTable, error) { - return r.ApiService.GetVPCRoutingTableExecute(r) -} - -/* -GetVPCRoutingTable Get details about a regional routing table. - -Get details about a routing table of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiGetVPCRoutingTableRequest -*/ -func (a *DefaultAPIService) GetVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiGetVPCRoutingTableRequest { - return ApiGetVPCRoutingTableRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return VPCRoutingTable -func (a *DefaultAPIService) GetVPCRoutingTableExecute(r ApiGetVPCRoutingTableRequest) (*VPCRoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCRoutingTable - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetVPCRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiGetVPCStaticRouteRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - routingTableId string - routeId string -} - -func (r ApiGetVPCStaticRouteRequest) Execute() (*Route, error) { - return r.ApiService.GetVPCStaticRouteExecute(r) -} - -/* -GetVPCStaticRoute Get details about a regional static route. - -Get details about a static route of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiGetVPCStaticRouteRequest -*/ -func (a *DefaultAPIService) GetVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiGetVPCStaticRouteRequest { - return ApiGetVPCStaticRouteRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Execute executes the request -// -// @return Route -func (a *DefaultAPIService) GetVPCStaticRouteExecute(r ApiGetVPCStaticRouteRequest) (*Route, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetVPCStaticRoute") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes/{routeId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routeId"+"}", url.PathEscape(parameterValueToString(r.routeId, "routeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return localVarReturnValue, reportError("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return localVarReturnValue, reportError("routeId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListNetworksRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -func (r ApiListNetworksRequest) LabelSelector(labelSelector string) ApiListNetworksRequest { - r.labelSelector = &labelSelector - return r -} - -func (r ApiListNetworksRequest) Execute() (*NetworkListResponse, error) { - return r.ApiService.ListNetworksExecute(r) -} - -/* -ListNetworks List all networks inside a project. - -Get a list of all networks inside a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @return ApiListNetworksRequest -*/ -func (a *DefaultAPIService) ListNetworks(ctx context.Context, projectId string, region string) ApiListNetworksRequest { - return ApiListNetworksRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Execute executes the request -// -// @return NetworkListResponse -func (a *DefaultAPIService) ListNetworksExecute(r ApiListNetworksRequest) (*NetworkListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkListResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListNetworks") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/regions/{region}/networks" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListNetworksOfRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string -} - -func (r ApiListNetworksOfRoutingTableRequest) Execute() (*NetworkListResponse, error) { - return r.ApiService.ListNetworksOfRoutingTableExecute(r) -} - -/* -ListNetworksOfRoutingTable List all networks in a routing table. - -Get a list of all networks in a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiListNetworksOfRoutingTableRequest -*/ -func (a *DefaultAPIService) ListNetworksOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiListNetworksOfRoutingTableRequest { - return ApiListNetworksOfRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return NetworkListResponse -func (a *DefaultAPIService) ListNetworksOfRoutingTableExecute(r ApiListNetworksOfRoutingTableRequest) (*NetworkListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkListResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListNetworksOfRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/networks" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListRoutesOfRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string - labelSelector *string -} - -// Filter resources by labels. -func (r ApiListRoutesOfRoutingTableRequest) LabelSelector(labelSelector string) ApiListRoutesOfRoutingTableRequest { - r.labelSelector = &labelSelector - return r -} - -func (r ApiListRoutesOfRoutingTableRequest) Execute() (*RouteListResponse, error) { - return r.ApiService.ListRoutesOfRoutingTableExecute(r) -} - -/* -ListRoutesOfRoutingTable List all routes in a routing table. - -Get a list of all routes in a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiListRoutesOfRoutingTableRequest -*/ -func (a *DefaultAPIService) ListRoutesOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiListRoutesOfRoutingTableRequest { - return ApiListRoutesOfRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return RouteListResponse -func (a *DefaultAPIService) ListRoutesOfRoutingTableExecute(r ApiListRoutesOfRoutingTableRequest) (*RouteListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RouteListResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListRoutesOfRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListRoutingTablesOfAreaRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - labelSelector *string -} - -// Filter resources by labels. -func (r ApiListRoutingTablesOfAreaRequest) LabelSelector(labelSelector string) ApiListRoutingTablesOfAreaRequest { - r.labelSelector = &labelSelector - return r -} - -func (r ApiListRoutingTablesOfAreaRequest) Execute() (*RoutingTableListResponse, error) { - return r.ApiService.ListRoutingTablesOfAreaExecute(r) -} - -/* -ListRoutingTablesOfArea List all routing tables in a network area. - -Get a list of all routing tables in a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @return ApiListRoutingTablesOfAreaRequest -*/ -func (a *DefaultAPIService) ListRoutingTablesOfArea(ctx context.Context, organizationId string, areaId string, region string) ApiListRoutingTablesOfAreaRequest { - return ApiListRoutingTablesOfAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Execute executes the request -// -// @return RoutingTableListResponse -func (a *DefaultAPIService) ListRoutingTablesOfAreaExecute(r ApiListRoutingTablesOfAreaRequest) (*RoutingTableListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RoutingTableListResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListRoutingTablesOfArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListVPCNetworkRangesRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - labelSelector *string - filter *string -} - -// Filter resources by labels. -func (r ApiListVPCNetworkRangesRequest) LabelSelector(labelSelector string) ApiListVPCNetworkRangesRequest { - r.labelSelector = &labelSelector - return r -} - -// Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. -func (r ApiListVPCNetworkRangesRequest) Filter(filter string) ApiListVPCNetworkRangesRequest { - r.filter = &filter - return r -} - -func (r ApiListVPCNetworkRangesRequest) Execute() (*VPCNetworkRangeList, error) { - return r.ApiService.ListVPCNetworkRangesExecute(r) -} - -/* -ListVPCNetworkRanges List all regional network ranges in a VPC. - -Get a list of all network ranges in a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiListVPCNetworkRangesRequest -*/ -func (a *DefaultAPIService) ListVPCNetworkRanges(ctx context.Context, projectId string, vpcId string, region string) ApiListVPCNetworkRangesRequest { - return ApiListVPCNetworkRangesRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// Execute executes the request -// -// @return VPCNetworkRangeList -func (a *DefaultAPIService) ListVPCNetworkRangesExecute(r ApiListVPCNetworkRangesRequest) (*VPCNetworkRangeList, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCNetworkRangeList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListVPCNetworkRanges") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "form", "") - } - if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListVPCRegionsRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string -} - -func (r ApiListVPCRegionsRequest) Execute() (*RegionalVPCList, error) { - return r.ApiService.ListVPCRegionsExecute(r) -} - -/* -ListVPCRegions List all configured regions in a VPC. - -Get a list of all configured regions in a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @return ApiListVPCRegionsRequest -*/ -func (a *DefaultAPIService) ListVPCRegions(ctx context.Context, projectId string, vpcId string) ApiListVPCRegionsRequest { - return ApiListVPCRegionsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - } -} - -// Execute executes the request -// -// @return RegionalVPCList -func (a *DefaultAPIService) ListVPCRegionsExecute(r ApiListVPCRegionsRequest) (*RegionalVPCList, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegionalVPCList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListVPCRegions") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListVPCRoutingTablesRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - labelSelector *string - filter *string -} - -// Filter resources by labels. -func (r ApiListVPCRoutingTablesRequest) LabelSelector(labelSelector string) ApiListVPCRoutingTablesRequest { - r.labelSelector = &labelSelector - return r -} - -// Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. -func (r ApiListVPCRoutingTablesRequest) Filter(filter string) ApiListVPCRoutingTablesRequest { - r.filter = &filter - return r -} - -func (r ApiListVPCRoutingTablesRequest) Execute() (*VPCRoutingTableList, error) { - return r.ApiService.ListVPCRoutingTablesExecute(r) -} - -/* -ListVPCRoutingTables List all regional routing tables in a VPC. - -Get a list of all routing tables in a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiListVPCRoutingTablesRequest -*/ -func (a *DefaultAPIService) ListVPCRoutingTables(ctx context.Context, projectId string, vpcId string, region string) ApiListVPCRoutingTablesRequest { - return ApiListVPCRoutingTablesRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// Execute executes the request -// -// @return VPCRoutingTableList -func (a *DefaultAPIService) ListVPCRoutingTablesExecute(r ApiListVPCRoutingTablesRequest) (*VPCRoutingTableList, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCRoutingTableList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListVPCRoutingTables") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "form", "") - } - if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListVPCStaticRoutesRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - routingTableId string - labelSelector *string -} - -// Filter resources by labels. -func (r ApiListVPCStaticRoutesRequest) LabelSelector(labelSelector string) ApiListVPCStaticRoutesRequest { - r.labelSelector = &labelSelector - return r -} - -func (r ApiListVPCStaticRoutesRequest) Execute() (*RouteListResponse, error) { - return r.ApiService.ListVPCStaticRoutesExecute(r) -} - -/* -ListVPCStaticRoutes List all regional static routes in a VPC. - -Get a list of all static routes of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiListVPCStaticRoutesRequest -*/ -func (a *DefaultAPIService) ListVPCStaticRoutes(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiListVPCStaticRoutesRequest { - return ApiListVPCStaticRoutesRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return RouteListResponse -func (a *DefaultAPIService) ListVPCStaticRoutesExecute(r ApiListVPCStaticRoutesRequest) (*RouteListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RouteListResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListVPCStaticRoutes") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListVPCsRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - labelSelector *string - filter *string -} - -// Filter resources by labels. -func (r ApiListVPCsRequest) LabelSelector(labelSelector string) ApiListVPCsRequest { - r.labelSelector = &labelSelector - return r -} - -// Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. -func (r ApiListVPCsRequest) Filter(filter string) ApiListVPCsRequest { - r.filter = &filter - return r -} - -func (r ApiListVPCsRequest) Execute() (*VPCList, error) { - return r.ApiService.ListVPCsExecute(r) -} - -/* -ListVPCs List project VPCs. - -List all visible VPCs of this project. To list shared VPCs from other projects of the organization use the `List all shared VPCs` endpoint. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @return ApiListVPCsRequest -*/ -func (a *DefaultAPIService) ListVPCs(ctx context.Context, projectId string) ApiListVPCsRequest { - return ApiListVPCsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - } -} - -// Execute executes the request -// -// @return VPCList -func (a *DefaultAPIService) ListVPCsExecute(r ApiListVPCsRequest) (*VPCList, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListVPCs") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "form", "") - } - if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiPartialUpdateNetworkRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - networkId string - partialUpdateNetworkPayload *PartialUpdateNetworkPayload -} - -// Request an update of a network. -func (r ApiPartialUpdateNetworkRequest) PartialUpdateNetworkPayload(partialUpdateNetworkPayload PartialUpdateNetworkPayload) ApiPartialUpdateNetworkRequest { - r.partialUpdateNetworkPayload = &partialUpdateNetworkPayload - return r -} - -func (r ApiPartialUpdateNetworkRequest) Execute() error { - return r.ApiService.PartialUpdateNetworkExecute(r) -} - -/* -PartialUpdateNetwork Update network settings. - -Update the settings of a network inside a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param region The STACKIT Region of the resources. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiPartialUpdateNetworkRequest -*/ -func (a *DefaultAPIService) PartialUpdateNetwork(ctx context.Context, projectId string, region string, networkId string) ApiPartialUpdateNetworkRequest { - return ApiPartialUpdateNetworkRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) PartialUpdateNetworkExecute(r ApiPartialUpdateNetworkRequest) error { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateNetwork") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"networkId"+"}", url.PathEscape(parameterValueToString(r.networkId, "networkId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return reportError("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return reportError("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return reportError("networkId must have less than 36 elements") - } - if r.partialUpdateNetworkPayload == nil { - return reportError("partialUpdateNetworkPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.partialUpdateNetworkPayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -type ApiPartialUpdateVPCRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - partialUpdateVPCPayload *PartialUpdateVPCPayload -} - -// Request to update a VPC. -func (r ApiPartialUpdateVPCRequest) PartialUpdateVPCPayload(partialUpdateVPCPayload PartialUpdateVPCPayload) ApiPartialUpdateVPCRequest { - r.partialUpdateVPCPayload = &partialUpdateVPCPayload - return r -} - -func (r ApiPartialUpdateVPCRequest) Execute() (*VPC, error) { - return r.ApiService.PartialUpdateVPCExecute(r) -} - -/* -PartialUpdateVPC Update VPC settings. - -Update the settings of a VPC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @return ApiPartialUpdateVPCRequest -*/ -func (a *DefaultAPIService) PartialUpdateVPC(ctx context.Context, projectId string, vpcId string) ApiPartialUpdateVPCRequest { - return ApiPartialUpdateVPCRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - } -} - -// Execute executes the request -// -// @return VPC -func (a *DefaultAPIService) PartialUpdateVPCExecute(r ApiPartialUpdateVPCRequest) (*VPC, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPC - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateVPC") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if r.partialUpdateVPCPayload == nil { - return localVarReturnValue, reportError("partialUpdateVPCPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.partialUpdateVPCPayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiUpdateRouteOfRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string - routeId string - updateRouteOfRoutingTablePayload *UpdateRouteOfRoutingTablePayload -} - -// Request an update of a route in a routing table. -func (r ApiUpdateRouteOfRoutingTableRequest) UpdateRouteOfRoutingTablePayload(updateRouteOfRoutingTablePayload UpdateRouteOfRoutingTablePayload) ApiUpdateRouteOfRoutingTableRequest { - r.updateRouteOfRoutingTablePayload = &updateRouteOfRoutingTablePayload - return r -} - -func (r ApiUpdateRouteOfRoutingTableRequest) Execute() (*Route, error) { - return r.ApiService.UpdateRouteOfRoutingTableExecute(r) -} - -/* -UpdateRouteOfRoutingTable Update a route of a routing table. - -Update a route defined in a routing table of a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiUpdateRouteOfRoutingTableRequest -*/ -func (a *DefaultAPIService) UpdateRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiUpdateRouteOfRoutingTableRequest { - return ApiUpdateRouteOfRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Execute executes the request -// -// @return Route -func (a *DefaultAPIService) UpdateRouteOfRoutingTableExecute(r ApiUpdateRouteOfRoutingTableRequest) (*Route, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateRouteOfRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routeId"+"}", url.PathEscape(parameterValueToString(r.routeId, "routeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return localVarReturnValue, reportError("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return localVarReturnValue, reportError("routeId must have less than 36 elements") - } - if r.updateRouteOfRoutingTablePayload == nil { - return localVarReturnValue, reportError("updateRouteOfRoutingTablePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateRouteOfRoutingTablePayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiUpdateRoutingTableOfAreaRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - areaId string - region string - routingTableId string - updateRoutingTableOfAreaPayload *UpdateRoutingTableOfAreaPayload -} - -// Request an update of a routing table. -func (r ApiUpdateRoutingTableOfAreaRequest) UpdateRoutingTableOfAreaPayload(updateRoutingTableOfAreaPayload UpdateRoutingTableOfAreaPayload) ApiUpdateRoutingTableOfAreaRequest { - r.updateRoutingTableOfAreaPayload = &updateRoutingTableOfAreaPayload - return r -} - -func (r ApiUpdateRoutingTableOfAreaRequest) Execute() (*RoutingTable, error) { - return r.ApiService.UpdateRoutingTableOfAreaExecute(r) -} - -/* -UpdateRoutingTableOfArea Update a routing table. - -Update a routing table defined in a network area. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId The identifier (ID) of a STACKIT Organization. - @param areaId The identifier (ID) of a STACKIT Network Area. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiUpdateRoutingTableOfAreaRequest -*/ -func (a *DefaultAPIService) UpdateRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiUpdateRoutingTableOfAreaRequest { - return ApiUpdateRoutingTableOfAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return RoutingTable -func (a *DefaultAPIService) UpdateRoutingTableOfAreaExecute(r ApiUpdateRoutingTableOfAreaRequest) (*RoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RoutingTable - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateRoutingTableOfArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(parameterValueToString(r.areaId, "areaId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, reportError("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, reportError("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, reportError("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, reportError("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - if r.updateRoutingTableOfAreaPayload == nil { - return localVarReturnValue, reportError("updateRoutingTableOfAreaPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateRoutingTableOfAreaPayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiUpdateVPCNetworkRangeRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - networkRangeId string - updateVPCNetworkRangePayload *UpdateVPCNetworkRangePayload -} - -// Request an update of a network range. -func (r ApiUpdateVPCNetworkRangeRequest) UpdateVPCNetworkRangePayload(updateVPCNetworkRangePayload UpdateVPCNetworkRangePayload) ApiUpdateVPCNetworkRangeRequest { - r.updateVPCNetworkRangePayload = &updateVPCNetworkRangePayload - return r -} - -func (r ApiUpdateVPCNetworkRangeRequest) Execute() (*VPCNetworkRange, error) { - return r.ApiService.UpdateVPCNetworkRangeExecute(r) -} - -/* -UpdateVPCNetworkRange Update a regional network range. - -Update a network range of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiUpdateVPCNetworkRangeRequest -*/ -func (a *DefaultAPIService) UpdateVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiUpdateVPCNetworkRangeRequest { - return ApiUpdateVPCNetworkRangeRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - networkRangeId: networkRangeId, - } -} - -// Execute executes the request -// -// @return VPCNetworkRange -func (a *DefaultAPIService) UpdateVPCNetworkRangeExecute(r ApiUpdateVPCNetworkRangeRequest) (*VPCNetworkRange, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCNetworkRange - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateVPCNetworkRange") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges/{networkRangeId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"networkRangeId"+"}", url.PathEscape(parameterValueToString(r.networkRangeId, "networkRangeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if strlen(r.networkRangeId) < 36 { - return localVarReturnValue, reportError("networkRangeId must have at least 36 elements") - } - if strlen(r.networkRangeId) > 36 { - return localVarReturnValue, reportError("networkRangeId must have less than 36 elements") - } - if r.updateVPCNetworkRangePayload == nil { - return localVarReturnValue, reportError("updateVPCNetworkRangePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateVPCNetworkRangePayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiUpdateVPCRegionRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - updateVPCRegionPayload *UpdateVPCRegionPayload -} - -// Request an update of the regional VPC configuration. -func (r ApiUpdateVPCRegionRequest) UpdateVPCRegionPayload(updateVPCRegionPayload UpdateVPCRegionPayload) ApiUpdateVPCRegionRequest { - r.updateVPCRegionPayload = &updateVPCRegionPayload - return r -} - -func (r ApiUpdateVPCRegionRequest) Execute() (*RegionalVPC, error) { - return r.ApiService.UpdateVPCRegionExecute(r) -} - -/* -UpdateVPCRegion Update the regional configuration of a VPC. - -Update the current configuration of a region for a VPC. - -**Example:** Update nameservers. - -**Request Body:** -```json - - { - "ipv4": { - "defaultNameservers": [ - "10.1.2.10", - "10.1.2.11" - ], - } - } - -``` - -**Result:** -* `ipv4.defaultNameservers`: **Updated** as a new value was provided. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @return ApiUpdateVPCRegionRequest -*/ -func (a *DefaultAPIService) UpdateVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiUpdateVPCRegionRequest { - return ApiUpdateVPCRegionRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// Execute executes the request -// -// @return RegionalVPC -func (a *DefaultAPIService) UpdateVPCRegionExecute(r ApiUpdateVPCRegionRequest) (*RegionalVPC, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegionalVPC - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateVPCRegion") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if r.updateVPCRegionPayload == nil { - return localVarReturnValue, reportError("updateVPCRegionPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateVPCRegionPayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiUpdateVPCRoutingTableRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - routingTableId string - updateVPCRoutingTablePayload *UpdateVPCRoutingTablePayload -} - -// Request an update of a routing table. -func (r ApiUpdateVPCRoutingTableRequest) UpdateVPCRoutingTablePayload(updateVPCRoutingTablePayload UpdateVPCRoutingTablePayload) ApiUpdateVPCRoutingTableRequest { - r.updateVPCRoutingTablePayload = &updateVPCRoutingTablePayload - return r -} - -func (r ApiUpdateVPCRoutingTableRequest) Execute() (*VPCRoutingTable, error) { - return r.ApiService.UpdateVPCRoutingTableExecute(r) -} - -/* -UpdateVPCRoutingTable Update a regional routing table. - -Update a routing table of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @return ApiUpdateVPCRoutingTableRequest -*/ -func (a *DefaultAPIService) UpdateVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiUpdateVPCRoutingTableRequest { - return ApiUpdateVPCRoutingTableRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// Execute executes the request -// -// @return VPCRoutingTable -func (a *DefaultAPIService) UpdateVPCRoutingTableExecute(r ApiUpdateVPCRoutingTableRequest) (*VPCRoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VPCRoutingTable - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateVPCRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - if r.updateVPCRoutingTablePayload == nil { - return localVarReturnValue, reportError("updateVPCRoutingTablePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateVPCRoutingTablePayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiUpdateVPCStaticRouteRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - vpcId string - region string - routingTableId string - routeId string - updateVPCStaticRoutePayload *UpdateVPCStaticRoutePayload -} - -// Request an update of a static route. -func (r ApiUpdateVPCStaticRouteRequest) UpdateVPCStaticRoutePayload(updateVPCStaticRoutePayload UpdateVPCStaticRoutePayload) ApiUpdateVPCStaticRouteRequest { - r.updateVPCStaticRoutePayload = &updateVPCStaticRoutePayload - return r -} - -func (r ApiUpdateVPCStaticRouteRequest) Execute() (*Route, error) { - return r.ApiService.UpdateVPCStaticRouteExecute(r) -} - -/* -UpdateVPCStaticRoute Update a regional static route. - -Update a static route of a VPC for this region. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The identifier (ID) of a STACKIT Project. - @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. - @param region The STACKIT Region of the resources. - @param routingTableId The identifier (ID) of a STACKIT Routing Table. - @param routeId The identifier (ID) of a STACKIT Route. - @return ApiUpdateVPCStaticRouteRequest -*/ -func (a *DefaultAPIService) UpdateVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiUpdateVPCStaticRouteRequest { - return ApiUpdateVPCStaticRouteRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Execute executes the request -// -// @return Route -func (a *DefaultAPIService) UpdateVPCStaticRouteExecute(r ApiUpdateVPCStaticRouteRequest) (*Route, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateVPCStaticRoute") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes/{routeId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vpcId"+"}", url.PathEscape(parameterValueToString(r.vpcId, "vpcId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routingTableId"+"}", url.PathEscape(parameterValueToString(r.routingTableId, "routingTableId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"routeId"+"}", url.PathEscape(parameterValueToString(r.routeId, "routeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") - } - if strlen(r.vpcId) < 36 { - return localVarReturnValue, reportError("vpcId must have at least 36 elements") - } - if strlen(r.vpcId) > 36 { - return localVarReturnValue, reportError("vpcId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, reportError("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, reportError("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return localVarReturnValue, reportError("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return localVarReturnValue, reportError("routeId must have less than 36 elements") - } - if r.updateVPCStaticRoutePayload == nil { - return localVarReturnValue, reportError("updateVPCStaticRoutePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateVPCStaticRoutePayload - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 424 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} diff --git a/services/iaas/v2alpha1api/api_default_mock.go b/services/iaas/v2alpha1api/api_default_mock.go deleted file mode 100644 index 80b1e1d694..0000000000 --- a/services/iaas/v2alpha1api/api_default_mock.go +++ /dev/null @@ -1,933 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "context" -) - -// assert the implementation matches the interface -var _ DefaultAPI = &DefaultAPIServiceMock{} - -// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. -// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. -type DefaultAPIServiceMock struct { - // AddRoutesToRoutingTableExecuteMock can be populated to implement the behavior of the AddRoutesToRoutingTableExecute function of this mock - AddRoutesToRoutingTableExecuteMock *func(r ApiAddRoutesToRoutingTableRequest) (*RouteListResponse, error) - // AddRoutingTableToAreaExecuteMock can be populated to implement the behavior of the AddRoutingTableToAreaExecute function of this mock - AddRoutingTableToAreaExecuteMock *func(r ApiAddRoutingTableToAreaRequest) (*RoutingTable, error) - // AddVPCRoutingTableExecuteMock can be populated to implement the behavior of the AddVPCRoutingTableExecute function of this mock - AddVPCRoutingTableExecuteMock *func(r ApiAddVPCRoutingTableRequest) (*VPCRoutingTable, error) - // AddVPCStaticRouteExecuteMock can be populated to implement the behavior of the AddVPCStaticRouteExecute function of this mock - AddVPCStaticRouteExecuteMock *func(r ApiAddVPCStaticRouteRequest) (*Route, error) - // CreateNetworkExecuteMock can be populated to implement the behavior of the CreateNetworkExecute function of this mock - CreateNetworkExecuteMock *func(r ApiCreateNetworkRequest) (*Network, error) - // CreateVPCExecuteMock can be populated to implement the behavior of the CreateVPCExecute function of this mock - CreateVPCExecuteMock *func(r ApiCreateVPCRequest) (*VPC, error) - // CreateVPCNetworkRangeExecuteMock can be populated to implement the behavior of the CreateVPCNetworkRangeExecute function of this mock - CreateVPCNetworkRangeExecuteMock *func(r ApiCreateVPCNetworkRangeRequest) (*VPCNetworkRange, error) - // CreateVPCRegionExecuteMock can be populated to implement the behavior of the CreateVPCRegionExecute function of this mock - CreateVPCRegionExecuteMock *func(r ApiCreateVPCRegionRequest) (*RegionalVPC, error) - // DeleteNetworkExecuteMock can be populated to implement the behavior of the DeleteNetworkExecute function of this mock - DeleteNetworkExecuteMock *func(r ApiDeleteNetworkRequest) error - // DeleteRouteFromRoutingTableExecuteMock can be populated to implement the behavior of the DeleteRouteFromRoutingTableExecute function of this mock - DeleteRouteFromRoutingTableExecuteMock *func(r ApiDeleteRouteFromRoutingTableRequest) error - // DeleteRoutingTableFromAreaExecuteMock can be populated to implement the behavior of the DeleteRoutingTableFromAreaExecute function of this mock - DeleteRoutingTableFromAreaExecuteMock *func(r ApiDeleteRoutingTableFromAreaRequest) error - // DeleteVPCExecuteMock can be populated to implement the behavior of the DeleteVPCExecute function of this mock - DeleteVPCExecuteMock *func(r ApiDeleteVPCRequest) error - // DeleteVPCNetworkRangeExecuteMock can be populated to implement the behavior of the DeleteVPCNetworkRangeExecute function of this mock - DeleteVPCNetworkRangeExecuteMock *func(r ApiDeleteVPCNetworkRangeRequest) error - // DeleteVPCRegionExecuteMock can be populated to implement the behavior of the DeleteVPCRegionExecute function of this mock - DeleteVPCRegionExecuteMock *func(r ApiDeleteVPCRegionRequest) error - // DeleteVPCRoutingTableExecuteMock can be populated to implement the behavior of the DeleteVPCRoutingTableExecute function of this mock - DeleteVPCRoutingTableExecuteMock *func(r ApiDeleteVPCRoutingTableRequest) error - // DeleteVPCStaticRouteExecuteMock can be populated to implement the behavior of the DeleteVPCStaticRouteExecute function of this mock - DeleteVPCStaticRouteExecuteMock *func(r ApiDeleteVPCStaticRouteRequest) error - // GetNetworkExecuteMock can be populated to implement the behavior of the GetNetworkExecute function of this mock - GetNetworkExecuteMock *func(r ApiGetNetworkRequest) (*Network, error) - // GetRouteOfRoutingTableExecuteMock can be populated to implement the behavior of the GetRouteOfRoutingTableExecute function of this mock - GetRouteOfRoutingTableExecuteMock *func(r ApiGetRouteOfRoutingTableRequest) (*Route, error) - // GetRoutingTableOfAreaExecuteMock can be populated to implement the behavior of the GetRoutingTableOfAreaExecute function of this mock - GetRoutingTableOfAreaExecuteMock *func(r ApiGetRoutingTableOfAreaRequest) (*RoutingTable, error) - // GetVPCExecuteMock can be populated to implement the behavior of the GetVPCExecute function of this mock - GetVPCExecuteMock *func(r ApiGetVPCRequest) (*VPC, error) - // GetVPCNetworkRangeExecuteMock can be populated to implement the behavior of the GetVPCNetworkRangeExecute function of this mock - GetVPCNetworkRangeExecuteMock *func(r ApiGetVPCNetworkRangeRequest) (*VPCNetworkRange, error) - // GetVPCRegionExecuteMock can be populated to implement the behavior of the GetVPCRegionExecute function of this mock - GetVPCRegionExecuteMock *func(r ApiGetVPCRegionRequest) (*RegionalVPC, error) - // GetVPCRoutingTableExecuteMock can be populated to implement the behavior of the GetVPCRoutingTableExecute function of this mock - GetVPCRoutingTableExecuteMock *func(r ApiGetVPCRoutingTableRequest) (*VPCRoutingTable, error) - // GetVPCStaticRouteExecuteMock can be populated to implement the behavior of the GetVPCStaticRouteExecute function of this mock - GetVPCStaticRouteExecuteMock *func(r ApiGetVPCStaticRouteRequest) (*Route, error) - // ListNetworksExecuteMock can be populated to implement the behavior of the ListNetworksExecute function of this mock - ListNetworksExecuteMock *func(r ApiListNetworksRequest) (*NetworkListResponse, error) - // ListNetworksOfRoutingTableExecuteMock can be populated to implement the behavior of the ListNetworksOfRoutingTableExecute function of this mock - ListNetworksOfRoutingTableExecuteMock *func(r ApiListNetworksOfRoutingTableRequest) (*NetworkListResponse, error) - // ListRoutesOfRoutingTableExecuteMock can be populated to implement the behavior of the ListRoutesOfRoutingTableExecute function of this mock - ListRoutesOfRoutingTableExecuteMock *func(r ApiListRoutesOfRoutingTableRequest) (*RouteListResponse, error) - // ListRoutingTablesOfAreaExecuteMock can be populated to implement the behavior of the ListRoutingTablesOfAreaExecute function of this mock - ListRoutingTablesOfAreaExecuteMock *func(r ApiListRoutingTablesOfAreaRequest) (*RoutingTableListResponse, error) - // ListVPCNetworkRangesExecuteMock can be populated to implement the behavior of the ListVPCNetworkRangesExecute function of this mock - ListVPCNetworkRangesExecuteMock *func(r ApiListVPCNetworkRangesRequest) (*VPCNetworkRangeList, error) - // ListVPCRegionsExecuteMock can be populated to implement the behavior of the ListVPCRegionsExecute function of this mock - ListVPCRegionsExecuteMock *func(r ApiListVPCRegionsRequest) (*RegionalVPCList, error) - // ListVPCRoutingTablesExecuteMock can be populated to implement the behavior of the ListVPCRoutingTablesExecute function of this mock - ListVPCRoutingTablesExecuteMock *func(r ApiListVPCRoutingTablesRequest) (*VPCRoutingTableList, error) - // ListVPCStaticRoutesExecuteMock can be populated to implement the behavior of the ListVPCStaticRoutesExecute function of this mock - ListVPCStaticRoutesExecuteMock *func(r ApiListVPCStaticRoutesRequest) (*RouteListResponse, error) - // ListVPCsExecuteMock can be populated to implement the behavior of the ListVPCsExecute function of this mock - ListVPCsExecuteMock *func(r ApiListVPCsRequest) (*VPCList, error) - // PartialUpdateNetworkExecuteMock can be populated to implement the behavior of the PartialUpdateNetworkExecute function of this mock - PartialUpdateNetworkExecuteMock *func(r ApiPartialUpdateNetworkRequest) error - // PartialUpdateVPCExecuteMock can be populated to implement the behavior of the PartialUpdateVPCExecute function of this mock - PartialUpdateVPCExecuteMock *func(r ApiPartialUpdateVPCRequest) (*VPC, error) - // UpdateRouteOfRoutingTableExecuteMock can be populated to implement the behavior of the UpdateRouteOfRoutingTableExecute function of this mock - UpdateRouteOfRoutingTableExecuteMock *func(r ApiUpdateRouteOfRoutingTableRequest) (*Route, error) - // UpdateRoutingTableOfAreaExecuteMock can be populated to implement the behavior of the UpdateRoutingTableOfAreaExecute function of this mock - UpdateRoutingTableOfAreaExecuteMock *func(r ApiUpdateRoutingTableOfAreaRequest) (*RoutingTable, error) - // UpdateVPCNetworkRangeExecuteMock can be populated to implement the behavior of the UpdateVPCNetworkRangeExecute function of this mock - UpdateVPCNetworkRangeExecuteMock *func(r ApiUpdateVPCNetworkRangeRequest) (*VPCNetworkRange, error) - // UpdateVPCRegionExecuteMock can be populated to implement the behavior of the UpdateVPCRegionExecute function of this mock - UpdateVPCRegionExecuteMock *func(r ApiUpdateVPCRegionRequest) (*RegionalVPC, error) - // UpdateVPCRoutingTableExecuteMock can be populated to implement the behavior of the UpdateVPCRoutingTableExecute function of this mock - UpdateVPCRoutingTableExecuteMock *func(r ApiUpdateVPCRoutingTableRequest) (*VPCRoutingTable, error) - // UpdateVPCStaticRouteExecuteMock can be populated to implement the behavior of the UpdateVPCStaticRouteExecute function of this mock - UpdateVPCStaticRouteExecuteMock *func(r ApiUpdateVPCStaticRouteRequest) (*Route, error) -} - -func (a DefaultAPIServiceMock) AddRoutesToRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiAddRoutesToRoutingTableRequest { - return ApiAddRoutesToRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// AddRoutesToRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the AddRoutesToRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) AddRoutesToRoutingTableExecute(r ApiAddRoutesToRoutingTableRequest) (*RouteListResponse, error) { - if a.AddRoutesToRoutingTableExecuteMock == nil { - var localVarReturnValue *RouteListResponse - return localVarReturnValue, nil - } - - return (*a.AddRoutesToRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) AddRoutingTableToArea(ctx context.Context, organizationId string, areaId string, region string) ApiAddRoutingTableToAreaRequest { - return ApiAddRoutingTableToAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// AddRoutingTableToAreaExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the AddRoutingTableToAreaExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) AddRoutingTableToAreaExecute(r ApiAddRoutingTableToAreaRequest) (*RoutingTable, error) { - if a.AddRoutingTableToAreaExecuteMock == nil { - var localVarReturnValue *RoutingTable - return localVarReturnValue, nil - } - - return (*a.AddRoutingTableToAreaExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) AddVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string) ApiAddVPCRoutingTableRequest { - return ApiAddVPCRoutingTableRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// AddVPCRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the AddVPCRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) AddVPCRoutingTableExecute(r ApiAddVPCRoutingTableRequest) (*VPCRoutingTable, error) { - if a.AddVPCRoutingTableExecuteMock == nil { - var localVarReturnValue *VPCRoutingTable - return localVarReturnValue, nil - } - - return (*a.AddVPCRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) AddVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiAddVPCStaticRouteRequest { - return ApiAddVPCStaticRouteRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// AddVPCStaticRouteExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the AddVPCStaticRouteExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) AddVPCStaticRouteExecute(r ApiAddVPCStaticRouteRequest) (*Route, error) { - if a.AddVPCStaticRouteExecuteMock == nil { - var localVarReturnValue *Route - return localVarReturnValue, nil - } - - return (*a.AddVPCStaticRouteExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) CreateNetwork(ctx context.Context, projectId string, region string) ApiCreateNetworkRequest { - return ApiCreateNetworkRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// CreateNetworkExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateNetworkExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) CreateNetworkExecute(r ApiCreateNetworkRequest) (*Network, error) { - if a.CreateNetworkExecuteMock == nil { - var localVarReturnValue *Network - return localVarReturnValue, nil - } - - return (*a.CreateNetworkExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) CreateVPC(ctx context.Context, projectId string) ApiCreateVPCRequest { - return ApiCreateVPCRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - } -} - -// CreateVPCExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateVPCExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) CreateVPCExecute(r ApiCreateVPCRequest) (*VPC, error) { - if a.CreateVPCExecuteMock == nil { - var localVarReturnValue *VPC - return localVarReturnValue, nil - } - - return (*a.CreateVPCExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) CreateVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string) ApiCreateVPCNetworkRangeRequest { - return ApiCreateVPCNetworkRangeRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// CreateVPCNetworkRangeExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateVPCNetworkRangeExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) CreateVPCNetworkRangeExecute(r ApiCreateVPCNetworkRangeRequest) (*VPCNetworkRange, error) { - if a.CreateVPCNetworkRangeExecuteMock == nil { - var localVarReturnValue *VPCNetworkRange - return localVarReturnValue, nil - } - - return (*a.CreateVPCNetworkRangeExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) CreateVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiCreateVPCRegionRequest { - return ApiCreateVPCRegionRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// CreateVPCRegionExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateVPCRegionExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) CreateVPCRegionExecute(r ApiCreateVPCRegionRequest) (*RegionalVPC, error) { - if a.CreateVPCRegionExecuteMock == nil { - var localVarReturnValue *RegionalVPC - return localVarReturnValue, nil - } - - return (*a.CreateVPCRegionExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) DeleteNetwork(ctx context.Context, projectId string, region string, networkId string) ApiDeleteNetworkRequest { - return ApiDeleteNetworkRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// DeleteNetworkExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteNetworkExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteNetworkExecute(r ApiDeleteNetworkRequest) error { - if a.DeleteNetworkExecuteMock == nil { - return nil - } - - return (*a.DeleteNetworkExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) DeleteRouteFromRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiDeleteRouteFromRoutingTableRequest { - return ApiDeleteRouteFromRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// DeleteRouteFromRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteRouteFromRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteRouteFromRoutingTableExecute(r ApiDeleteRouteFromRoutingTableRequest) error { - if a.DeleteRouteFromRoutingTableExecuteMock == nil { - return nil - } - - return (*a.DeleteRouteFromRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) DeleteRoutingTableFromArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiDeleteRoutingTableFromAreaRequest { - return ApiDeleteRoutingTableFromAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// DeleteRoutingTableFromAreaExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteRoutingTableFromAreaExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteRoutingTableFromAreaExecute(r ApiDeleteRoutingTableFromAreaRequest) error { - if a.DeleteRoutingTableFromAreaExecuteMock == nil { - return nil - } - - return (*a.DeleteRoutingTableFromAreaExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) DeleteVPC(ctx context.Context, projectId string, vpcId string) ApiDeleteVPCRequest { - return ApiDeleteVPCRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - } -} - -// DeleteVPCExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteVPCExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteVPCExecute(r ApiDeleteVPCRequest) error { - if a.DeleteVPCExecuteMock == nil { - return nil - } - - return (*a.DeleteVPCExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) DeleteVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiDeleteVPCNetworkRangeRequest { - return ApiDeleteVPCNetworkRangeRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - networkRangeId: networkRangeId, - } -} - -// DeleteVPCNetworkRangeExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteVPCNetworkRangeExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteVPCNetworkRangeExecute(r ApiDeleteVPCNetworkRangeRequest) error { - if a.DeleteVPCNetworkRangeExecuteMock == nil { - return nil - } - - return (*a.DeleteVPCNetworkRangeExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) DeleteVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiDeleteVPCRegionRequest { - return ApiDeleteVPCRegionRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// DeleteVPCRegionExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteVPCRegionExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteVPCRegionExecute(r ApiDeleteVPCRegionRequest) error { - if a.DeleteVPCRegionExecuteMock == nil { - return nil - } - - return (*a.DeleteVPCRegionExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) DeleteVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiDeleteVPCRoutingTableRequest { - return ApiDeleteVPCRoutingTableRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// DeleteVPCRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteVPCRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteVPCRoutingTableExecute(r ApiDeleteVPCRoutingTableRequest) error { - if a.DeleteVPCRoutingTableExecuteMock == nil { - return nil - } - - return (*a.DeleteVPCRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) DeleteVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiDeleteVPCStaticRouteRequest { - return ApiDeleteVPCStaticRouteRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// DeleteVPCStaticRouteExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteVPCStaticRouteExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteVPCStaticRouteExecute(r ApiDeleteVPCStaticRouteRequest) error { - if a.DeleteVPCStaticRouteExecuteMock == nil { - return nil - } - - return (*a.DeleteVPCStaticRouteExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) GetNetwork(ctx context.Context, projectId string, region string, networkId string) ApiGetNetworkRequest { - return ApiGetNetworkRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// GetNetworkExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetNetworkExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetNetworkExecute(r ApiGetNetworkRequest) (*Network, error) { - if a.GetNetworkExecuteMock == nil { - var localVarReturnValue *Network - return localVarReturnValue, nil - } - - return (*a.GetNetworkExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) GetRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiGetRouteOfRoutingTableRequest { - return ApiGetRouteOfRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// GetRouteOfRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetRouteOfRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetRouteOfRoutingTableExecute(r ApiGetRouteOfRoutingTableRequest) (*Route, error) { - if a.GetRouteOfRoutingTableExecuteMock == nil { - var localVarReturnValue *Route - return localVarReturnValue, nil - } - - return (*a.GetRouteOfRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) GetRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiGetRoutingTableOfAreaRequest { - return ApiGetRoutingTableOfAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// GetRoutingTableOfAreaExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetRoutingTableOfAreaExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetRoutingTableOfAreaExecute(r ApiGetRoutingTableOfAreaRequest) (*RoutingTable, error) { - if a.GetRoutingTableOfAreaExecuteMock == nil { - var localVarReturnValue *RoutingTable - return localVarReturnValue, nil - } - - return (*a.GetRoutingTableOfAreaExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) GetVPC(ctx context.Context, projectId string, vpcId string) ApiGetVPCRequest { - return ApiGetVPCRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - } -} - -// GetVPCExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetVPCExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetVPCExecute(r ApiGetVPCRequest) (*VPC, error) { - if a.GetVPCExecuteMock == nil { - var localVarReturnValue *VPC - return localVarReturnValue, nil - } - - return (*a.GetVPCExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) GetVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiGetVPCNetworkRangeRequest { - return ApiGetVPCNetworkRangeRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - networkRangeId: networkRangeId, - } -} - -// GetVPCNetworkRangeExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetVPCNetworkRangeExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetVPCNetworkRangeExecute(r ApiGetVPCNetworkRangeRequest) (*VPCNetworkRange, error) { - if a.GetVPCNetworkRangeExecuteMock == nil { - var localVarReturnValue *VPCNetworkRange - return localVarReturnValue, nil - } - - return (*a.GetVPCNetworkRangeExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) GetVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiGetVPCRegionRequest { - return ApiGetVPCRegionRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// GetVPCRegionExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetVPCRegionExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetVPCRegionExecute(r ApiGetVPCRegionRequest) (*RegionalVPC, error) { - if a.GetVPCRegionExecuteMock == nil { - var localVarReturnValue *RegionalVPC - return localVarReturnValue, nil - } - - return (*a.GetVPCRegionExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) GetVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiGetVPCRoutingTableRequest { - return ApiGetVPCRoutingTableRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// GetVPCRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetVPCRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetVPCRoutingTableExecute(r ApiGetVPCRoutingTableRequest) (*VPCRoutingTable, error) { - if a.GetVPCRoutingTableExecuteMock == nil { - var localVarReturnValue *VPCRoutingTable - return localVarReturnValue, nil - } - - return (*a.GetVPCRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) GetVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiGetVPCStaticRouteRequest { - return ApiGetVPCStaticRouteRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// GetVPCStaticRouteExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetVPCStaticRouteExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetVPCStaticRouteExecute(r ApiGetVPCStaticRouteRequest) (*Route, error) { - if a.GetVPCStaticRouteExecuteMock == nil { - var localVarReturnValue *Route - return localVarReturnValue, nil - } - - return (*a.GetVPCStaticRouteExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListNetworks(ctx context.Context, projectId string, region string) ApiListNetworksRequest { - return ApiListNetworksRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// ListNetworksExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListNetworksExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListNetworksExecute(r ApiListNetworksRequest) (*NetworkListResponse, error) { - if a.ListNetworksExecuteMock == nil { - var localVarReturnValue *NetworkListResponse - return localVarReturnValue, nil - } - - return (*a.ListNetworksExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListNetworksOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiListNetworksOfRoutingTableRequest { - return ApiListNetworksOfRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// ListNetworksOfRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListNetworksOfRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListNetworksOfRoutingTableExecute(r ApiListNetworksOfRoutingTableRequest) (*NetworkListResponse, error) { - if a.ListNetworksOfRoutingTableExecuteMock == nil { - var localVarReturnValue *NetworkListResponse - return localVarReturnValue, nil - } - - return (*a.ListNetworksOfRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListRoutesOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiListRoutesOfRoutingTableRequest { - return ApiListRoutesOfRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// ListRoutesOfRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListRoutesOfRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListRoutesOfRoutingTableExecute(r ApiListRoutesOfRoutingTableRequest) (*RouteListResponse, error) { - if a.ListRoutesOfRoutingTableExecuteMock == nil { - var localVarReturnValue *RouteListResponse - return localVarReturnValue, nil - } - - return (*a.ListRoutesOfRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListRoutingTablesOfArea(ctx context.Context, organizationId string, areaId string, region string) ApiListRoutingTablesOfAreaRequest { - return ApiListRoutingTablesOfAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// ListRoutingTablesOfAreaExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListRoutingTablesOfAreaExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListRoutingTablesOfAreaExecute(r ApiListRoutingTablesOfAreaRequest) (*RoutingTableListResponse, error) { - if a.ListRoutingTablesOfAreaExecuteMock == nil { - var localVarReturnValue *RoutingTableListResponse - return localVarReturnValue, nil - } - - return (*a.ListRoutingTablesOfAreaExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListVPCNetworkRanges(ctx context.Context, projectId string, vpcId string, region string) ApiListVPCNetworkRangesRequest { - return ApiListVPCNetworkRangesRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// ListVPCNetworkRangesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListVPCNetworkRangesExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListVPCNetworkRangesExecute(r ApiListVPCNetworkRangesRequest) (*VPCNetworkRangeList, error) { - if a.ListVPCNetworkRangesExecuteMock == nil { - var localVarReturnValue *VPCNetworkRangeList - return localVarReturnValue, nil - } - - return (*a.ListVPCNetworkRangesExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListVPCRegions(ctx context.Context, projectId string, vpcId string) ApiListVPCRegionsRequest { - return ApiListVPCRegionsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - } -} - -// ListVPCRegionsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListVPCRegionsExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListVPCRegionsExecute(r ApiListVPCRegionsRequest) (*RegionalVPCList, error) { - if a.ListVPCRegionsExecuteMock == nil { - var localVarReturnValue *RegionalVPCList - return localVarReturnValue, nil - } - - return (*a.ListVPCRegionsExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListVPCRoutingTables(ctx context.Context, projectId string, vpcId string, region string) ApiListVPCRoutingTablesRequest { - return ApiListVPCRoutingTablesRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// ListVPCRoutingTablesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListVPCRoutingTablesExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListVPCRoutingTablesExecute(r ApiListVPCRoutingTablesRequest) (*VPCRoutingTableList, error) { - if a.ListVPCRoutingTablesExecuteMock == nil { - var localVarReturnValue *VPCRoutingTableList - return localVarReturnValue, nil - } - - return (*a.ListVPCRoutingTablesExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListVPCStaticRoutes(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiListVPCStaticRoutesRequest { - return ApiListVPCStaticRoutesRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// ListVPCStaticRoutesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListVPCStaticRoutesExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListVPCStaticRoutesExecute(r ApiListVPCStaticRoutesRequest) (*RouteListResponse, error) { - if a.ListVPCStaticRoutesExecuteMock == nil { - var localVarReturnValue *RouteListResponse - return localVarReturnValue, nil - } - - return (*a.ListVPCStaticRoutesExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) ListVPCs(ctx context.Context, projectId string) ApiListVPCsRequest { - return ApiListVPCsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - } -} - -// ListVPCsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListVPCsExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListVPCsExecute(r ApiListVPCsRequest) (*VPCList, error) { - if a.ListVPCsExecuteMock == nil { - var localVarReturnValue *VPCList - return localVarReturnValue, nil - } - - return (*a.ListVPCsExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) PartialUpdateNetwork(ctx context.Context, projectId string, region string, networkId string) ApiPartialUpdateNetworkRequest { - return ApiPartialUpdateNetworkRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// PartialUpdateNetworkExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateNetworkExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) PartialUpdateNetworkExecute(r ApiPartialUpdateNetworkRequest) error { - if a.PartialUpdateNetworkExecuteMock == nil { - return nil - } - - return (*a.PartialUpdateNetworkExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) PartialUpdateVPC(ctx context.Context, projectId string, vpcId string) ApiPartialUpdateVPCRequest { - return ApiPartialUpdateVPCRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - } -} - -// PartialUpdateVPCExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateVPCExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) PartialUpdateVPCExecute(r ApiPartialUpdateVPCRequest) (*VPC, error) { - if a.PartialUpdateVPCExecuteMock == nil { - var localVarReturnValue *VPC - return localVarReturnValue, nil - } - - return (*a.PartialUpdateVPCExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) UpdateRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiUpdateRouteOfRoutingTableRequest { - return ApiUpdateRouteOfRoutingTableRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// UpdateRouteOfRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateRouteOfRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateRouteOfRoutingTableExecute(r ApiUpdateRouteOfRoutingTableRequest) (*Route, error) { - if a.UpdateRouteOfRoutingTableExecuteMock == nil { - var localVarReturnValue *Route - return localVarReturnValue, nil - } - - return (*a.UpdateRouteOfRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) UpdateRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiUpdateRoutingTableOfAreaRequest { - return ApiUpdateRoutingTableOfAreaRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// UpdateRoutingTableOfAreaExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateRoutingTableOfAreaExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateRoutingTableOfAreaExecute(r ApiUpdateRoutingTableOfAreaRequest) (*RoutingTable, error) { - if a.UpdateRoutingTableOfAreaExecuteMock == nil { - var localVarReturnValue *RoutingTable - return localVarReturnValue, nil - } - - return (*a.UpdateRoutingTableOfAreaExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) UpdateVPCNetworkRange(ctx context.Context, projectId string, vpcId string, region string, networkRangeId string) ApiUpdateVPCNetworkRangeRequest { - return ApiUpdateVPCNetworkRangeRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - networkRangeId: networkRangeId, - } -} - -// UpdateVPCNetworkRangeExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateVPCNetworkRangeExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateVPCNetworkRangeExecute(r ApiUpdateVPCNetworkRangeRequest) (*VPCNetworkRange, error) { - if a.UpdateVPCNetworkRangeExecuteMock == nil { - var localVarReturnValue *VPCNetworkRange - return localVarReturnValue, nil - } - - return (*a.UpdateVPCNetworkRangeExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) UpdateVPCRegion(ctx context.Context, projectId string, vpcId string, region string) ApiUpdateVPCRegionRequest { - return ApiUpdateVPCRegionRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - } -} - -// UpdateVPCRegionExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateVPCRegionExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateVPCRegionExecute(r ApiUpdateVPCRegionRequest) (*RegionalVPC, error) { - if a.UpdateVPCRegionExecuteMock == nil { - var localVarReturnValue *RegionalVPC - return localVarReturnValue, nil - } - - return (*a.UpdateVPCRegionExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) UpdateVPCRoutingTable(ctx context.Context, projectId string, vpcId string, region string, routingTableId string) ApiUpdateVPCRoutingTableRequest { - return ApiUpdateVPCRoutingTableRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - } -} - -// UpdateVPCRoutingTableExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateVPCRoutingTableExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateVPCRoutingTableExecute(r ApiUpdateVPCRoutingTableRequest) (*VPCRoutingTable, error) { - if a.UpdateVPCRoutingTableExecuteMock == nil { - var localVarReturnValue *VPCRoutingTable - return localVarReturnValue, nil - } - - return (*a.UpdateVPCRoutingTableExecuteMock)(r) -} - -func (a DefaultAPIServiceMock) UpdateVPCStaticRoute(ctx context.Context, projectId string, vpcId string, region string, routingTableId string, routeId string) ApiUpdateVPCStaticRouteRequest { - return ApiUpdateVPCStaticRouteRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - vpcId: vpcId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// UpdateVPCStaticRouteExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateVPCStaticRouteExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateVPCStaticRouteExecute(r ApiUpdateVPCStaticRouteRequest) (*Route, error) { - if a.UpdateVPCStaticRouteExecuteMock == nil { - var localVarReturnValue *Route - return localVarReturnValue, nil - } - - return (*a.UpdateVPCStaticRouteExecuteMock)(r) -} diff --git a/services/iaas/v2alpha1api/client.go b/services/iaas/v2alpha1api/client.go deleted file mode 100644 index 966f9ab483..0000000000 --- a/services/iaas/v2alpha1api/client.go +++ /dev/null @@ -1,668 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2alpha1api - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - "github.com/stackitcloud/stackit-sdk-go/core/auth" - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -var ( - JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) - XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") -) - -// APIClient manages communication with the STACKIT IaaS API API v2alpha1 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *config.Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultAPI DefaultAPI -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { - cfg := NewConfiguration() - - for _, option := range opts { - err := option(cfg) - if err != nil { - return nil, fmt.Errorf("configuring the client: %w", err) - } - } - - err := config.ConfigureRegion(cfg) - if err != nil { - return nil, fmt.Errorf("configuring region: %w", err) - } - - if cfg.HTTPClient == nil { - cfg.HTTPClient = &http.Client{} - } - - authRoundTripper, err := auth.SetupAuth(cfg) - if err != nil { - return nil, fmt.Errorf("setting up authentication: %w", err) - } - - roundTripper := authRoundTripper - if cfg.Middleware != nil { - roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) - } - - cfg.HTTPClient.Transport = roundTripper - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultAPI = (*DefaultAPIService)(&c.common) - - return c, nil -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString(obj interface{}, key string) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { - return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) - } - - return fmt.Sprintf("%v", obj) - } - var param, ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap, err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t, ok := obj.(MappedNullable); ok { - dataMap, err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i := 0; i < lenIndValue; i++ { - var arrayValue = indValue.Index(i) - var keyPrefixForCollectionType = keyPrefix - if style == "deepObject" { - keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) - } - return - - case reflect.Map: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - iter := indValue.MapRange() - for iter.Next() { - k, v := iter.Key(), iter.Value() - parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) - } - return - - case reflect.Interface: - fallthrough - case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) - return - - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } - - switch valuesMap := headerOrQueryParams.(type) { - case url.Values: - if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { - valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) - } else { - valuesMap.Add(keyPrefix, value) - } - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } -} - -// helper for converting interface{} parameters to json strings -func parameterToJson(obj interface{}) (string, error) { - jsonBuf, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(jsonBuf), err -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - if c.cfg.Debug { - dump, err := httputil.DumpRequestOut(request, true) - if err != nil { - return nil, err - } - log.Printf("\n%s\n", string(dump)) - } - - resp, err := c.cfg.HTTPClient.Do(request) - if err != nil { - return resp, err - } - - if c.cfg.Debug { - dump, err := httputil.DumpResponse(resp, true) - if err != nil { - return resp, err - } - log.Printf("\n%s\n", string(dump)) - } - return resp, err -} - -// Allow modification of underlying config for alternate implementations and testing -// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior -func (c *APIClient) GetConfig() *config.Configuration { - return c.cfg -} - -type formFile struct { - fileBytes []byte - fileName string - formFileName string -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - formFiles []formFile) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if postBody != nil { - contentType := headerParams["Content-Type"] - if contentType == "" { - contentType = detectContentType(postBody) - headerParams["Content-Type"] = contentType - } - - body, err = setBody(postBody, contentType) - if err != nil { - return nil, err - } - } - - // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if r, ok := v.(*io.Reader); ok { - *r = bytes.NewReader(b) - return nil - } - // Must stay before the JSON branch: json.Unmarshal would base64-decode into *[]byte. - if p, ok := v.(*[]byte); ok { - *p = b - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if XmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if JsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - defer file.Close() - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if JsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if XmlCheck.MatchString(contentType) { - var bs []byte - bs, err = xml.Marshal(body) - if err == nil { - bodyBuf.Write(bs) - } - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/services/iaas/v2alpha1api/configuration.go b/services/iaas/v2alpha1api/configuration.go deleted file mode 100644 index 618fd79388..0000000000 --- a/services/iaas/v2alpha1api/configuration.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2alpha1api - -import ( - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *config.Configuration { - cfg := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "stackit-sdk-go/iaas", - Debug: false, - Servers: config.ServerConfigurations{ - { - URL: "https://iaas.api.stackit.cloud", - Description: "No description provided", - Variables: map[string]config.ServerVariable{ - "region": { - Description: "No description provided", - DefaultValue: "global", - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - return cfg -} diff --git a/services/iaas/v2alpha1api/model_add_routes_to_routing_table_payload.go b/services/iaas/v2alpha1api/model_add_routes_to_routing_table_payload.go deleted file mode 100644 index 08b90d0172..0000000000 --- a/services/iaas/v2alpha1api/model_add_routes_to_routing_table_payload.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the AddRoutesToRoutingTablePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddRoutesToRoutingTablePayload{} - -// AddRoutesToRoutingTablePayload Object represents a request to add network routes. -type AddRoutesToRoutingTablePayload struct { - // A list of routes. - Items []Route `json:"items"` - AdditionalProperties map[string]interface{} -} - -type _AddRoutesToRoutingTablePayload AddRoutesToRoutingTablePayload - -// NewAddRoutesToRoutingTablePayload instantiates a new AddRoutesToRoutingTablePayload 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 NewAddRoutesToRoutingTablePayload(items []Route) *AddRoutesToRoutingTablePayload { - this := AddRoutesToRoutingTablePayload{} - this.Items = items - return &this -} - -// NewAddRoutesToRoutingTablePayloadWithDefaults instantiates a new AddRoutesToRoutingTablePayload 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 NewAddRoutesToRoutingTablePayloadWithDefaults() *AddRoutesToRoutingTablePayload { - this := AddRoutesToRoutingTablePayload{} - return &this -} - -// GetItems returns the Items field value -func (o *AddRoutesToRoutingTablePayload) GetItems() []Route { - if o == nil { - var ret []Route - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *AddRoutesToRoutingTablePayload) GetItemsOk() ([]Route, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *AddRoutesToRoutingTablePayload) SetItems(v []Route) { - o.Items = v -} - -func (o AddRoutesToRoutingTablePayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddRoutesToRoutingTablePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AddRoutesToRoutingTablePayload) 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{ - "items", - } - - 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) - } - } - - varAddRoutesToRoutingTablePayload := _AddRoutesToRoutingTablePayload{} - - err = json.Unmarshal(data, &varAddRoutesToRoutingTablePayload) - - if err != nil { - return err - } - - *o = AddRoutesToRoutingTablePayload(varAddRoutesToRoutingTablePayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "items") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAddRoutesToRoutingTablePayload struct { - value *AddRoutesToRoutingTablePayload - isSet bool -} - -func (v NullableAddRoutesToRoutingTablePayload) Get() *AddRoutesToRoutingTablePayload { - return v.value -} - -func (v *NullableAddRoutesToRoutingTablePayload) Set(val *AddRoutesToRoutingTablePayload) { - v.value = val - v.isSet = true -} - -func (v NullableAddRoutesToRoutingTablePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableAddRoutesToRoutingTablePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddRoutesToRoutingTablePayload(val *AddRoutesToRoutingTablePayload) *NullableAddRoutesToRoutingTablePayload { - return &NullableAddRoutesToRoutingTablePayload{value: val, isSet: true} -} - -func (v NullableAddRoutesToRoutingTablePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddRoutesToRoutingTablePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_add_routing_table_to_area_payload.go b/services/iaas/v2alpha1api/model_add_routing_table_to_area_payload.go deleted file mode 100644 index d53d488a47..0000000000 --- a/services/iaas/v2alpha1api/model_add_routing_table_to_area_payload.go +++ /dev/null @@ -1,481 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the AddRoutingTableToAreaPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddRoutingTableToAreaPayload{} - -// AddRoutingTableToAreaPayload An object representing a routing table. Filterable Fields: `dynamicRoutes`, `systemRoutes`. -type AddRoutingTableToAreaPayload struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - // This is the default routing table. It can't be deleted and is used if the user does not specify it otherwise. - Default *bool `json:"default,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - // A config setting for a routing table which allows propagation of dynamic routes to this routing table. - DynamicRoutes *bool `json:"dynamicRoutes,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,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]+)*$"` - // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes *bool `json:"systemRoutes,omitempty"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AddRoutingTableToAreaPayload AddRoutingTableToAreaPayload - -// NewAddRoutingTableToAreaPayload instantiates a new AddRoutingTableToAreaPayload 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 NewAddRoutingTableToAreaPayload(name string) *AddRoutingTableToAreaPayload { - this := AddRoutingTableToAreaPayload{} - var dynamicRoutes bool = true - this.DynamicRoutes = &dynamicRoutes - this.Name = name - var systemRoutes bool = true - this.SystemRoutes = &systemRoutes - return &this -} - -// NewAddRoutingTableToAreaPayloadWithDefaults instantiates a new AddRoutingTableToAreaPayload 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 NewAddRoutingTableToAreaPayloadWithDefaults() *AddRoutingTableToAreaPayload { - this := AddRoutingTableToAreaPayload{} - var dynamicRoutes bool = true - this.DynamicRoutes = &dynamicRoutes - var systemRoutes bool = true - this.SystemRoutes = &systemRoutes - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *AddRoutingTableToAreaPayload) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddRoutingTableToAreaPayload) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *AddRoutingTableToAreaPayload) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *AddRoutingTableToAreaPayload) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDefault returns the Default field value if set, zero value otherwise. -func (o *AddRoutingTableToAreaPayload) GetDefault() bool { - if o == nil || IsNil(o.Default) { - var ret bool - return ret - } - return *o.Default -} - -// GetDefaultOk returns a tuple with the Default field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddRoutingTableToAreaPayload) GetDefaultOk() (*bool, bool) { - if o == nil || IsNil(o.Default) { - return nil, false - } - return o.Default, true -} - -// HasDefault returns a boolean if a field has been set. -func (o *AddRoutingTableToAreaPayload) HasDefault() bool { - if o != nil && !IsNil(o.Default) { - return true - } - - return false -} - -// SetDefault gets a reference to the given bool and assigns it to the Default field. -func (o *AddRoutingTableToAreaPayload) SetDefault(v bool) { - o.Default = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *AddRoutingTableToAreaPayload) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddRoutingTableToAreaPayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *AddRoutingTableToAreaPayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *AddRoutingTableToAreaPayload) SetDescription(v string) { - o.Description = &v -} - -// GetDynamicRoutes returns the DynamicRoutes field value if set, zero value otherwise. -func (o *AddRoutingTableToAreaPayload) GetDynamicRoutes() bool { - if o == nil || IsNil(o.DynamicRoutes) { - var ret bool - return ret - } - return *o.DynamicRoutes -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddRoutingTableToAreaPayload) GetDynamicRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.DynamicRoutes) { - return nil, false - } - return o.DynamicRoutes, true -} - -// HasDynamicRoutes returns a boolean if a field has been set. -func (o *AddRoutingTableToAreaPayload) HasDynamicRoutes() bool { - if o != nil && !IsNil(o.DynamicRoutes) { - return true - } - - return false -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -func (o *AddRoutingTableToAreaPayload) SetDynamicRoutes(v bool) { - o.DynamicRoutes = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *AddRoutingTableToAreaPayload) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddRoutingTableToAreaPayload) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *AddRoutingTableToAreaPayload) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *AddRoutingTableToAreaPayload) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *AddRoutingTableToAreaPayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *AddRoutingTableToAreaPayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *AddRoutingTableToAreaPayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *AddRoutingTableToAreaPayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *AddRoutingTableToAreaPayload) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *AddRoutingTableToAreaPayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *AddRoutingTableToAreaPayload) SetName(v string) { - o.Name = v -} - -// GetSystemRoutes returns the SystemRoutes field value if set, zero value otherwise. -func (o *AddRoutingTableToAreaPayload) GetSystemRoutes() bool { - if o == nil || IsNil(o.SystemRoutes) { - var ret bool - return ret - } - return *o.SystemRoutes -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddRoutingTableToAreaPayload) GetSystemRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.SystemRoutes) { - return nil, false - } - return o.SystemRoutes, true -} - -// HasSystemRoutes returns a boolean if a field has been set. -func (o *AddRoutingTableToAreaPayload) HasSystemRoutes() bool { - if o != nil && !IsNil(o.SystemRoutes) { - return true - } - - return false -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -func (o *AddRoutingTableToAreaPayload) SetSystemRoutes(v bool) { - o.SystemRoutes = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *AddRoutingTableToAreaPayload) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddRoutingTableToAreaPayload) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *AddRoutingTableToAreaPayload) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *AddRoutingTableToAreaPayload) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -func (o AddRoutingTableToAreaPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddRoutingTableToAreaPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - if !IsNil(o.Default) { - toSerialize["default"] = o.Default - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.DynamicRoutes) { - toSerialize["dynamicRoutes"] = o.DynamicRoutes - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - if !IsNil(o.SystemRoutes) { - toSerialize["systemRoutes"] = o.SystemRoutes - } - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AddRoutingTableToAreaPayload) 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{ - "name", - } - - 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) - } - } - - varAddRoutingTableToAreaPayload := _AddRoutingTableToAreaPayload{} - - err = json.Unmarshal(data, &varAddRoutingTableToAreaPayload) - - if err != nil { - return err - } - - *o = AddRoutingTableToAreaPayload(varAddRoutingTableToAreaPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "default") - delete(additionalProperties, "description") - delete(additionalProperties, "dynamicRoutes") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "systemRoutes") - delete(additionalProperties, "updatedAt") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAddRoutingTableToAreaPayload struct { - value *AddRoutingTableToAreaPayload - isSet bool -} - -func (v NullableAddRoutingTableToAreaPayload) Get() *AddRoutingTableToAreaPayload { - return v.value -} - -func (v *NullableAddRoutingTableToAreaPayload) Set(val *AddRoutingTableToAreaPayload) { - v.value = val - v.isSet = true -} - -func (v NullableAddRoutingTableToAreaPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableAddRoutingTableToAreaPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddRoutingTableToAreaPayload(val *AddRoutingTableToAreaPayload) *NullableAddRoutingTableToAreaPayload { - return &NullableAddRoutingTableToAreaPayload{value: val, isSet: true} -} - -func (v NullableAddRoutingTableToAreaPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddRoutingTableToAreaPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_add_vpc_routing_table_payload.go b/services/iaas/v2alpha1api/model_add_vpc_routing_table_payload.go deleted file mode 100644 index fdc5fecfdc..0000000000 --- a/services/iaas/v2alpha1api/model_add_vpc_routing_table_payload.go +++ /dev/null @@ -1,443 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the AddVPCRoutingTablePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddVPCRoutingTablePayload{} - -// AddVPCRoutingTablePayload An object representing a VPC routing table. Filterable Fields: `createdAt`, `dynamicRoutes`, `name`, `systemRoutes`, `updatedAt`. -type AddVPCRoutingTablePayload struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - // A config setting for a routing table which allows propagation of dynamic routes to this routing table. - DynamicRoutes *bool `json:"dynamicRoutes,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,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]+)*$"` - // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes *bool `json:"systemRoutes,omitempty"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AddVPCRoutingTablePayload AddVPCRoutingTablePayload - -// NewAddVPCRoutingTablePayload instantiates a new AddVPCRoutingTablePayload 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 NewAddVPCRoutingTablePayload(name string) *AddVPCRoutingTablePayload { - this := AddVPCRoutingTablePayload{} - var dynamicRoutes bool = true - this.DynamicRoutes = &dynamicRoutes - this.Name = name - var systemRoutes bool = true - this.SystemRoutes = &systemRoutes - return &this -} - -// NewAddVPCRoutingTablePayloadWithDefaults instantiates a new AddVPCRoutingTablePayload 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 NewAddVPCRoutingTablePayloadWithDefaults() *AddVPCRoutingTablePayload { - this := AddVPCRoutingTablePayload{} - var dynamicRoutes bool = true - this.DynamicRoutes = &dynamicRoutes - var systemRoutes bool = true - this.SystemRoutes = &systemRoutes - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *AddVPCRoutingTablePayload) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCRoutingTablePayload) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *AddVPCRoutingTablePayload) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *AddVPCRoutingTablePayload) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *AddVPCRoutingTablePayload) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCRoutingTablePayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *AddVPCRoutingTablePayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *AddVPCRoutingTablePayload) SetDescription(v string) { - o.Description = &v -} - -// GetDynamicRoutes returns the DynamicRoutes field value if set, zero value otherwise. -func (o *AddVPCRoutingTablePayload) GetDynamicRoutes() bool { - if o == nil || IsNil(o.DynamicRoutes) { - var ret bool - return ret - } - return *o.DynamicRoutes -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCRoutingTablePayload) GetDynamicRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.DynamicRoutes) { - return nil, false - } - return o.DynamicRoutes, true -} - -// HasDynamicRoutes returns a boolean if a field has been set. -func (o *AddVPCRoutingTablePayload) HasDynamicRoutes() bool { - if o != nil && !IsNil(o.DynamicRoutes) { - return true - } - - return false -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -func (o *AddVPCRoutingTablePayload) SetDynamicRoutes(v bool) { - o.DynamicRoutes = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *AddVPCRoutingTablePayload) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCRoutingTablePayload) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *AddVPCRoutingTablePayload) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *AddVPCRoutingTablePayload) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *AddVPCRoutingTablePayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *AddVPCRoutingTablePayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *AddVPCRoutingTablePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *AddVPCRoutingTablePayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *AddVPCRoutingTablePayload) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *AddVPCRoutingTablePayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *AddVPCRoutingTablePayload) SetName(v string) { - o.Name = v -} - -// GetSystemRoutes returns the SystemRoutes field value if set, zero value otherwise. -func (o *AddVPCRoutingTablePayload) GetSystemRoutes() bool { - if o == nil || IsNil(o.SystemRoutes) { - var ret bool - return ret - } - return *o.SystemRoutes -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCRoutingTablePayload) GetSystemRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.SystemRoutes) { - return nil, false - } - return o.SystemRoutes, true -} - -// HasSystemRoutes returns a boolean if a field has been set. -func (o *AddVPCRoutingTablePayload) HasSystemRoutes() bool { - if o != nil && !IsNil(o.SystemRoutes) { - return true - } - - return false -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -func (o *AddVPCRoutingTablePayload) SetSystemRoutes(v bool) { - o.SystemRoutes = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *AddVPCRoutingTablePayload) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCRoutingTablePayload) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *AddVPCRoutingTablePayload) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *AddVPCRoutingTablePayload) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -func (o AddVPCRoutingTablePayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddVPCRoutingTablePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.DynamicRoutes) { - toSerialize["dynamicRoutes"] = o.DynamicRoutes - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - if !IsNil(o.SystemRoutes) { - toSerialize["systemRoutes"] = o.SystemRoutes - } - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AddVPCRoutingTablePayload) 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{ - "name", - } - - 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) - } - } - - varAddVPCRoutingTablePayload := _AddVPCRoutingTablePayload{} - - err = json.Unmarshal(data, &varAddVPCRoutingTablePayload) - - if err != nil { - return err - } - - *o = AddVPCRoutingTablePayload(varAddVPCRoutingTablePayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "description") - delete(additionalProperties, "dynamicRoutes") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "systemRoutes") - delete(additionalProperties, "updatedAt") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAddVPCRoutingTablePayload struct { - value *AddVPCRoutingTablePayload - isSet bool -} - -func (v NullableAddVPCRoutingTablePayload) Get() *AddVPCRoutingTablePayload { - return v.value -} - -func (v *NullableAddVPCRoutingTablePayload) Set(val *AddVPCRoutingTablePayload) { - v.value = val - v.isSet = true -} - -func (v NullableAddVPCRoutingTablePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableAddVPCRoutingTablePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddVPCRoutingTablePayload(val *AddVPCRoutingTablePayload) *NullableAddVPCRoutingTablePayload { - return &NullableAddVPCRoutingTablePayload{value: val, isSet: true} -} - -func (v NullableAddVPCRoutingTablePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddVPCRoutingTablePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_add_vpc_static_route_payload.go b/services/iaas/v2alpha1api/model_add_vpc_static_route_payload.go deleted file mode 100644 index 31d897081e..0000000000 --- a/services/iaas/v2alpha1api/model_add_vpc_static_route_payload.go +++ /dev/null @@ -1,349 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the AddVPCStaticRoutePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddVPCStaticRoutePayload{} - -// AddVPCStaticRoutePayload Object represents a network route. -type AddVPCStaticRoutePayload struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - Destination AddVPCStaticRoutePayloadDestination `json:"destination"` - // 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - Nexthop AddVPCStaticRoutePayloadNexthop `json:"nexthop"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AddVPCStaticRoutePayload AddVPCStaticRoutePayload - -// NewAddVPCStaticRoutePayload instantiates a new AddVPCStaticRoutePayload 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 NewAddVPCStaticRoutePayload(destination AddVPCStaticRoutePayloadDestination, nexthop AddVPCStaticRoutePayloadNexthop) *AddVPCStaticRoutePayload { - this := AddVPCStaticRoutePayload{} - this.Destination = destination - this.Nexthop = nexthop - return &this -} - -// NewAddVPCStaticRoutePayloadWithDefaults instantiates a new AddVPCStaticRoutePayload 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 NewAddVPCStaticRoutePayloadWithDefaults() *AddVPCStaticRoutePayload { - this := AddVPCStaticRoutePayload{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *AddVPCStaticRoutePayload) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCStaticRoutePayload) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *AddVPCStaticRoutePayload) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *AddVPCStaticRoutePayload) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDestination returns the Destination field value -func (o *AddVPCStaticRoutePayload) GetDestination() AddVPCStaticRoutePayloadDestination { - if o == nil { - var ret AddVPCStaticRoutePayloadDestination - return ret - } - - return o.Destination -} - -// GetDestinationOk returns a tuple with the Destination field value -// and a boolean to check if the value has been set. -func (o *AddVPCStaticRoutePayload) GetDestinationOk() (*AddVPCStaticRoutePayloadDestination, bool) { - if o == nil { - return nil, false - } - return &o.Destination, true -} - -// SetDestination sets field value -func (o *AddVPCStaticRoutePayload) SetDestination(v AddVPCStaticRoutePayloadDestination) { - o.Destination = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *AddVPCStaticRoutePayload) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCStaticRoutePayload) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *AddVPCStaticRoutePayload) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *AddVPCStaticRoutePayload) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *AddVPCStaticRoutePayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *AddVPCStaticRoutePayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *AddVPCStaticRoutePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *AddVPCStaticRoutePayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetNexthop returns the Nexthop field value -func (o *AddVPCStaticRoutePayload) GetNexthop() AddVPCStaticRoutePayloadNexthop { - if o == nil { - var ret AddVPCStaticRoutePayloadNexthop - return ret - } - - return o.Nexthop -} - -// GetNexthopOk returns a tuple with the Nexthop field value -// and a boolean to check if the value has been set. -func (o *AddVPCStaticRoutePayload) GetNexthopOk() (*AddVPCStaticRoutePayloadNexthop, bool) { - if o == nil { - return nil, false - } - return &o.Nexthop, true -} - -// SetNexthop sets field value -func (o *AddVPCStaticRoutePayload) SetNexthop(v AddVPCStaticRoutePayloadNexthop) { - o.Nexthop = v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *AddVPCStaticRoutePayload) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddVPCStaticRoutePayload) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *AddVPCStaticRoutePayload) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *AddVPCStaticRoutePayload) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -func (o AddVPCStaticRoutePayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddVPCStaticRoutePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - toSerialize["destination"] = o.Destination - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["nexthop"] = o.Nexthop - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AddVPCStaticRoutePayload) 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{ - "destination", - "nexthop", - } - - 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) - } - } - - varAddVPCStaticRoutePayload := _AddVPCStaticRoutePayload{} - - err = json.Unmarshal(data, &varAddVPCStaticRoutePayload) - - if err != nil { - return err - } - - *o = AddVPCStaticRoutePayload(varAddVPCStaticRoutePayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "destination") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "nexthop") - delete(additionalProperties, "updatedAt") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAddVPCStaticRoutePayload struct { - value *AddVPCStaticRoutePayload - isSet bool -} - -func (v NullableAddVPCStaticRoutePayload) Get() *AddVPCStaticRoutePayload { - return v.value -} - -func (v *NullableAddVPCStaticRoutePayload) Set(val *AddVPCStaticRoutePayload) { - v.value = val - v.isSet = true -} - -func (v NullableAddVPCStaticRoutePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableAddVPCStaticRoutePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddVPCStaticRoutePayload(val *AddVPCStaticRoutePayload) *NullableAddVPCStaticRoutePayload { - return &NullableAddVPCStaticRoutePayload{value: val, isSet: true} -} - -func (v NullableAddVPCStaticRoutePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddVPCStaticRoutePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_add_vpc_static_route_payload_destination.go b/services/iaas/v2alpha1api/model_add_vpc_static_route_payload_destination.go deleted file mode 100644 index f319d643a2..0000000000 --- a/services/iaas/v2alpha1api/model_add_vpc_static_route_payload_destination.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// AddVPCStaticRoutePayloadDestination - struct for AddVPCStaticRoutePayloadDestination -type AddVPCStaticRoutePayloadDestination struct { - DestinationCIDRv4 *DestinationCIDRv4 - DestinationCIDRv6 *DestinationCIDRv6 -} - -// DestinationCIDRv4AsAddVPCStaticRoutePayloadDestination is a convenience function that returns DestinationCIDRv4 wrapped in AddVPCStaticRoutePayloadDestination -func DestinationCIDRv4AsAddVPCStaticRoutePayloadDestination(v *DestinationCIDRv4) AddVPCStaticRoutePayloadDestination { - return AddVPCStaticRoutePayloadDestination{ - DestinationCIDRv4: v, - } -} - -// DestinationCIDRv6AsAddVPCStaticRoutePayloadDestination is a convenience function that returns DestinationCIDRv6 wrapped in AddVPCStaticRoutePayloadDestination -func DestinationCIDRv6AsAddVPCStaticRoutePayloadDestination(v *DestinationCIDRv6) AddVPCStaticRoutePayloadDestination { - return AddVPCStaticRoutePayloadDestination{ - DestinationCIDRv6: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *AddVPCStaticRoutePayloadDestination) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'cidrv4' - if jsonDict["type"] == "cidrv4" { - // try to unmarshal JSON data into DestinationCIDRv4 - err = json.Unmarshal(data, &dst.DestinationCIDRv4) - if err == nil { - return nil // data stored in dst.DestinationCIDRv4, return on the first match - } else { - dst.DestinationCIDRv4 = nil - return fmt.Errorf("failed to unmarshal AddVPCStaticRoutePayloadDestination as DestinationCIDRv4: %s", err.Error()) - } - } - - // check if the discriminator value is 'cidrv6' - if jsonDict["type"] == "cidrv6" { - // try to unmarshal JSON data into DestinationCIDRv6 - err = json.Unmarshal(data, &dst.DestinationCIDRv6) - if err == nil { - return nil // data stored in dst.DestinationCIDRv6, return on the first match - } else { - dst.DestinationCIDRv6 = nil - return fmt.Errorf("failed to unmarshal AddVPCStaticRoutePayloadDestination as DestinationCIDRv6: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src AddVPCStaticRoutePayloadDestination) MarshalJSON() ([]byte, error) { - if src.DestinationCIDRv4 != nil { - return json.Marshal(&src.DestinationCIDRv4) - } - - if src.DestinationCIDRv6 != nil { - return json.Marshal(&src.DestinationCIDRv6) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *AddVPCStaticRoutePayloadDestination) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.DestinationCIDRv4 != nil { - return obj.DestinationCIDRv4 - } - - if obj.DestinationCIDRv6 != nil { - return obj.DestinationCIDRv6 - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj AddVPCStaticRoutePayloadDestination) GetActualInstanceValue() interface{} { - if obj.DestinationCIDRv4 != nil { - return *obj.DestinationCIDRv4 - } - - if obj.DestinationCIDRv6 != nil { - return *obj.DestinationCIDRv6 - } - - // all schemas are nil - return nil -} - -type NullableAddVPCStaticRoutePayloadDestination struct { - value *AddVPCStaticRoutePayloadDestination - isSet bool -} - -func (v NullableAddVPCStaticRoutePayloadDestination) Get() *AddVPCStaticRoutePayloadDestination { - return v.value -} - -func (v *NullableAddVPCStaticRoutePayloadDestination) Set(val *AddVPCStaticRoutePayloadDestination) { - v.value = val - v.isSet = true -} - -func (v NullableAddVPCStaticRoutePayloadDestination) IsSet() bool { - return v.isSet -} - -func (v *NullableAddVPCStaticRoutePayloadDestination) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddVPCStaticRoutePayloadDestination(val *AddVPCStaticRoutePayloadDestination) *NullableAddVPCStaticRoutePayloadDestination { - return &NullableAddVPCStaticRoutePayloadDestination{value: val, isSet: true} -} - -func (v NullableAddVPCStaticRoutePayloadDestination) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddVPCStaticRoutePayloadDestination) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_add_vpc_static_route_payload_nexthop.go b/services/iaas/v2alpha1api/model_add_vpc_static_route_payload_nexthop.go deleted file mode 100644 index 59447cec1d..0000000000 --- a/services/iaas/v2alpha1api/model_add_vpc_static_route_payload_nexthop.go +++ /dev/null @@ -1,218 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// AddVPCStaticRoutePayloadNexthop - struct for AddVPCStaticRoutePayloadNexthop -type AddVPCStaticRoutePayloadNexthop struct { - NexthopBlackhole *NexthopBlackhole - NexthopIPv4 *NexthopIPv4 - NexthopIPv6 *NexthopIPv6 - NexthopInternet *NexthopInternet -} - -// NexthopBlackholeAsAddVPCStaticRoutePayloadNexthop is a convenience function that returns NexthopBlackhole wrapped in AddVPCStaticRoutePayloadNexthop -func NexthopBlackholeAsAddVPCStaticRoutePayloadNexthop(v *NexthopBlackhole) AddVPCStaticRoutePayloadNexthop { - return AddVPCStaticRoutePayloadNexthop{ - NexthopBlackhole: v, - } -} - -// NexthopIPv4AsAddVPCStaticRoutePayloadNexthop is a convenience function that returns NexthopIPv4 wrapped in AddVPCStaticRoutePayloadNexthop -func NexthopIPv4AsAddVPCStaticRoutePayloadNexthop(v *NexthopIPv4) AddVPCStaticRoutePayloadNexthop { - return AddVPCStaticRoutePayloadNexthop{ - NexthopIPv4: v, - } -} - -// NexthopIPv6AsAddVPCStaticRoutePayloadNexthop is a convenience function that returns NexthopIPv6 wrapped in AddVPCStaticRoutePayloadNexthop -func NexthopIPv6AsAddVPCStaticRoutePayloadNexthop(v *NexthopIPv6) AddVPCStaticRoutePayloadNexthop { - return AddVPCStaticRoutePayloadNexthop{ - NexthopIPv6: v, - } -} - -// NexthopInternetAsAddVPCStaticRoutePayloadNexthop is a convenience function that returns NexthopInternet wrapped in AddVPCStaticRoutePayloadNexthop -func NexthopInternetAsAddVPCStaticRoutePayloadNexthop(v *NexthopInternet) AddVPCStaticRoutePayloadNexthop { - return AddVPCStaticRoutePayloadNexthop{ - NexthopInternet: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *AddVPCStaticRoutePayloadNexthop) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'blackhole' - if jsonDict["type"] == "blackhole" { - // try to unmarshal JSON data into NexthopBlackhole - err = json.Unmarshal(data, &dst.NexthopBlackhole) - if err == nil { - return nil // data stored in dst.NexthopBlackhole, return on the first match - } else { - dst.NexthopBlackhole = nil - return fmt.Errorf("failed to unmarshal AddVPCStaticRoutePayloadNexthop as NexthopBlackhole: %s", err.Error()) - } - } - - // check if the discriminator value is 'internet' - if jsonDict["type"] == "internet" { - // try to unmarshal JSON data into NexthopInternet - err = json.Unmarshal(data, &dst.NexthopInternet) - if err == nil { - return nil // data stored in dst.NexthopInternet, return on the first match - } else { - dst.NexthopInternet = nil - return fmt.Errorf("failed to unmarshal AddVPCStaticRoutePayloadNexthop as NexthopInternet: %s", err.Error()) - } - } - - // check if the discriminator value is 'ipv4' - if jsonDict["type"] == "ipv4" { - // try to unmarshal JSON data into NexthopIPv4 - err = json.Unmarshal(data, &dst.NexthopIPv4) - if err == nil { - return nil // data stored in dst.NexthopIPv4, return on the first match - } else { - dst.NexthopIPv4 = nil - return fmt.Errorf("failed to unmarshal AddVPCStaticRoutePayloadNexthop as NexthopIPv4: %s", err.Error()) - } - } - - // check if the discriminator value is 'ipv6' - if jsonDict["type"] == "ipv6" { - // try to unmarshal JSON data into NexthopIPv6 - err = json.Unmarshal(data, &dst.NexthopIPv6) - if err == nil { - return nil // data stored in dst.NexthopIPv6, return on the first match - } else { - dst.NexthopIPv6 = nil - return fmt.Errorf("failed to unmarshal AddVPCStaticRoutePayloadNexthop as NexthopIPv6: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src AddVPCStaticRoutePayloadNexthop) MarshalJSON() ([]byte, error) { - if src.NexthopBlackhole != nil { - return json.Marshal(&src.NexthopBlackhole) - } - - if src.NexthopIPv4 != nil { - return json.Marshal(&src.NexthopIPv4) - } - - if src.NexthopIPv6 != nil { - return json.Marshal(&src.NexthopIPv6) - } - - if src.NexthopInternet != nil { - return json.Marshal(&src.NexthopInternet) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *AddVPCStaticRoutePayloadNexthop) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.NexthopBlackhole != nil { - return obj.NexthopBlackhole - } - - if obj.NexthopIPv4 != nil { - return obj.NexthopIPv4 - } - - if obj.NexthopIPv6 != nil { - return obj.NexthopIPv6 - } - - if obj.NexthopInternet != nil { - return obj.NexthopInternet - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj AddVPCStaticRoutePayloadNexthop) GetActualInstanceValue() interface{} { - if obj.NexthopBlackhole != nil { - return *obj.NexthopBlackhole - } - - if obj.NexthopIPv4 != nil { - return *obj.NexthopIPv4 - } - - if obj.NexthopIPv6 != nil { - return *obj.NexthopIPv6 - } - - if obj.NexthopInternet != nil { - return *obj.NexthopInternet - } - - // all schemas are nil - return nil -} - -type NullableAddVPCStaticRoutePayloadNexthop struct { - value *AddVPCStaticRoutePayloadNexthop - isSet bool -} - -func (v NullableAddVPCStaticRoutePayloadNexthop) Get() *AddVPCStaticRoutePayloadNexthop { - return v.value -} - -func (v *NullableAddVPCStaticRoutePayloadNexthop) Set(val *AddVPCStaticRoutePayloadNexthop) { - v.value = val - v.isSet = true -} - -func (v NullableAddVPCStaticRoutePayloadNexthop) IsSet() bool { - return v.isSet -} - -func (v *NullableAddVPCStaticRoutePayloadNexthop) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddVPCStaticRoutePayloadNexthop(val *AddVPCStaticRoutePayloadNexthop) *NullableAddVPCStaticRoutePayloadNexthop { - return &NullableAddVPCStaticRoutePayloadNexthop{value: val, isSet: true} -} - -func (v NullableAddVPCStaticRoutePayloadNexthop) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddVPCStaticRoutePayloadNexthop) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_network_ipv4.go b/services/iaas/v2alpha1api/model_create_network_ipv4.go deleted file mode 100644 index d1afbbd499..0000000000 --- a/services/iaas/v2alpha1api/model_create_network_ipv4.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// CreateNetworkIPv4 - The create request for an IPv4 network. -type CreateNetworkIPv4 struct { - CreateNetworkIPv4WithPrefix *CreateNetworkIPv4WithPrefix - CreateNetworkIPv4WithPrefixLength *CreateNetworkIPv4WithPrefixLength -} - -// CreateNetworkIPv4WithPrefixAsCreateNetworkIPv4 is a convenience function that returns CreateNetworkIPv4WithPrefix wrapped in CreateNetworkIPv4 -func CreateNetworkIPv4WithPrefixAsCreateNetworkIPv4(v *CreateNetworkIPv4WithPrefix) CreateNetworkIPv4 { - return CreateNetworkIPv4{ - CreateNetworkIPv4WithPrefix: v, - } -} - -// CreateNetworkIPv4WithPrefixLengthAsCreateNetworkIPv4 is a convenience function that returns CreateNetworkIPv4WithPrefixLength wrapped in CreateNetworkIPv4 -func CreateNetworkIPv4WithPrefixLengthAsCreateNetworkIPv4(v *CreateNetworkIPv4WithPrefixLength) CreateNetworkIPv4 { - return CreateNetworkIPv4{ - CreateNetworkIPv4WithPrefixLength: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *CreateNetworkIPv4) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into CreateNetworkIPv4WithPrefix - err = json.Unmarshal(data, &dst.CreateNetworkIPv4WithPrefix) - if err == nil { - jsonCreateNetworkIPv4WithPrefix, _ := json.Marshal(dst.CreateNetworkIPv4WithPrefix) - if string(jsonCreateNetworkIPv4WithPrefix) == "{}" { // empty struct - dst.CreateNetworkIPv4WithPrefix = nil - } else { - match++ - } - } else { - dst.CreateNetworkIPv4WithPrefix = nil - } - - // try to unmarshal data into CreateNetworkIPv4WithPrefixLength - err = json.Unmarshal(data, &dst.CreateNetworkIPv4WithPrefixLength) - if err == nil { - jsonCreateNetworkIPv4WithPrefixLength, _ := json.Marshal(dst.CreateNetworkIPv4WithPrefixLength) - if string(jsonCreateNetworkIPv4WithPrefixLength) == "{}" { // empty struct - dst.CreateNetworkIPv4WithPrefixLength = nil - } else { - match++ - } - } else { - dst.CreateNetworkIPv4WithPrefixLength = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.CreateNetworkIPv4WithPrefix = nil - dst.CreateNetworkIPv4WithPrefixLength = nil - - return fmt.Errorf("data matches more than one schema in oneOf(CreateNetworkIPv4)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - if err != nil { - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4): %v", err) - } - - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateNetworkIPv4) MarshalJSON() ([]byte, error) { - if src.CreateNetworkIPv4WithPrefix != nil { - return json.Marshal(&src.CreateNetworkIPv4WithPrefix) - } - - if src.CreateNetworkIPv4WithPrefixLength != nil { - return json.Marshal(&src.CreateNetworkIPv4WithPrefixLength) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *CreateNetworkIPv4) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.CreateNetworkIPv4WithPrefix != nil { - return obj.CreateNetworkIPv4WithPrefix - } - - if obj.CreateNetworkIPv4WithPrefixLength != nil { - return obj.CreateNetworkIPv4WithPrefixLength - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj CreateNetworkIPv4) GetActualInstanceValue() interface{} { - if obj.CreateNetworkIPv4WithPrefix != nil { - return *obj.CreateNetworkIPv4WithPrefix - } - - if obj.CreateNetworkIPv4WithPrefixLength != nil { - return *obj.CreateNetworkIPv4WithPrefixLength - } - - // all schemas are nil - return nil -} - -type NullableCreateNetworkIPv4 struct { - value *CreateNetworkIPv4 - isSet bool -} - -func (v NullableCreateNetworkIPv4) Get() *CreateNetworkIPv4 { - return v.value -} - -func (v *NullableCreateNetworkIPv4) Set(val *CreateNetworkIPv4) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNetworkIPv4) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNetworkIPv4) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNetworkIPv4(val *CreateNetworkIPv4) *NullableCreateNetworkIPv4 { - return &NullableCreateNetworkIPv4{value: val, isSet: true} -} - -func (v NullableCreateNetworkIPv4) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNetworkIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix.go b/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix.go deleted file mode 100644 index 73b8a2c656..0000000000 --- a/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix.go +++ /dev/null @@ -1,293 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateNetworkIPv4WithPrefix type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkIPv4WithPrefix{} - -// CreateNetworkIPv4WithPrefix The create request for an IPv4 network with a specified prefix. -type CreateNetworkIPv4WithPrefix struct { - // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - // IPv4 Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" 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 _CreateNetworkIPv4WithPrefix CreateNetworkIPv4WithPrefix - -// NewCreateNetworkIPv4WithPrefix instantiates a new CreateNetworkIPv4WithPrefix 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 NewCreateNetworkIPv4WithPrefix(prefix string) *CreateNetworkIPv4WithPrefix { - this := CreateNetworkIPv4WithPrefix{} - this.Prefix = prefix - return &this -} - -// NewCreateNetworkIPv4WithPrefixWithDefaults instantiates a new CreateNetworkIPv4WithPrefix 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 NewCreateNetworkIPv4WithPrefixWithDefaults() *CreateNetworkIPv4WithPrefix { - this := CreateNetworkIPv4WithPrefix{} - return &this -} - -// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CreateNetworkIPv4WithPrefix) GetGateway() string { - if o == nil || IsNil(o.Gateway.Get()) { - var ret string - return ret - } - return *o.Gateway.Get() -} - -// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CreateNetworkIPv4WithPrefix) GetGatewayOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Gateway.Get(), o.Gateway.IsSet() -} - -// HasGateway returns a boolean if a field has been set. -func (o *CreateNetworkIPv4WithPrefix) HasGateway() bool { - if o != nil && o.Gateway.IsSet() { - return true - } - - return false -} - -// SetGateway gets a reference to the given NullableString and assigns it to the Gateway field. -func (o *CreateNetworkIPv4WithPrefix) SetGateway(v string) { - o.Gateway.Set(&v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -func (o *CreateNetworkIPv4WithPrefix) SetGatewayNil() { - o.Gateway.Set(nil) -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -func (o *CreateNetworkIPv4WithPrefix) UnsetGateway() { - o.Gateway.Unset() -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *CreateNetworkIPv4WithPrefix) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv4WithPrefix) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *CreateNetworkIPv4WithPrefix) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *CreateNetworkIPv4WithPrefix) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefix returns the Prefix field value -func (o *CreateNetworkIPv4WithPrefix) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv4WithPrefix) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *CreateNetworkIPv4WithPrefix) SetPrefix(v string) { - o.Prefix = v -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId field value if set, zero value otherwise. -func (o *CreateNetworkIPv4WithPrefix) GetVpcNetworkRangeId() string { - if o == nil || IsNil(o.VpcNetworkRangeId) { - var ret string - return ret - } - return *o.VpcNetworkRangeId -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv4WithPrefix) GetVpcNetworkRangeIdOk() (*string, bool) { - if o == nil || IsNil(o.VpcNetworkRangeId) { - return nil, false - } - return o.VpcNetworkRangeId, true -} - -// HasVpcNetworkRangeId returns a boolean if a field has been set. -func (o *CreateNetworkIPv4WithPrefix) HasVpcNetworkRangeId() bool { - if o != nil && !IsNil(o.VpcNetworkRangeId) { - return true - } - - return false -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -func (o *CreateNetworkIPv4WithPrefix) SetVpcNetworkRangeId(v string) { - o.VpcNetworkRangeId = &v -} - -func (o CreateNetworkIPv4WithPrefix) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateNetworkIPv4WithPrefix) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Gateway.IsSet() { - toSerialize["gateway"] = o.Gateway.Get() - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefix"] = o.Prefix - if !IsNil(o.VpcNetworkRangeId) { - toSerialize["vpcNetworkRangeId"] = o.VpcNetworkRangeId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateNetworkIPv4WithPrefix) 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{ - "prefix", - } - - 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) - } - } - - varCreateNetworkIPv4WithPrefix := _CreateNetworkIPv4WithPrefix{} - - err = json.Unmarshal(data, &varCreateNetworkIPv4WithPrefix) - - if err != nil { - return err - } - - *o = CreateNetworkIPv4WithPrefix(varCreateNetworkIPv4WithPrefix) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "gateway") - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefix") - delete(additionalProperties, "vpcNetworkRangeId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateNetworkIPv4WithPrefix struct { - value *CreateNetworkIPv4WithPrefix - isSet bool -} - -func (v NullableCreateNetworkIPv4WithPrefix) Get() *CreateNetworkIPv4WithPrefix { - return v.value -} - -func (v *NullableCreateNetworkIPv4WithPrefix) Set(val *CreateNetworkIPv4WithPrefix) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNetworkIPv4WithPrefix) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNetworkIPv4WithPrefix) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNetworkIPv4WithPrefix(val *CreateNetworkIPv4WithPrefix) *NullableCreateNetworkIPv4WithPrefix { - return &NullableCreateNetworkIPv4WithPrefix{value: val, isSet: true} -} - -func (v NullableCreateNetworkIPv4WithPrefix) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNetworkIPv4WithPrefix) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix_length.go b/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix_length.go deleted file mode 100644 index 88a3425095..0000000000 --- a/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix_length.go +++ /dev/null @@ -1,243 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateNetworkIPv4WithPrefixLength type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkIPv4WithPrefixLength{} - -// CreateNetworkIPv4WithPrefixLength The create request for an IPv4 network with a wanted prefix length. -type CreateNetworkIPv4WithPrefixLength struct { - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - PrefixLength int64 `json:"prefixLength"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" 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 _CreateNetworkIPv4WithPrefixLength CreateNetworkIPv4WithPrefixLength - -// NewCreateNetworkIPv4WithPrefixLength instantiates a new CreateNetworkIPv4WithPrefixLength 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 NewCreateNetworkIPv4WithPrefixLength(prefixLength int64) *CreateNetworkIPv4WithPrefixLength { - this := CreateNetworkIPv4WithPrefixLength{} - this.PrefixLength = prefixLength - return &this -} - -// NewCreateNetworkIPv4WithPrefixLengthWithDefaults instantiates a new CreateNetworkIPv4WithPrefixLength 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 NewCreateNetworkIPv4WithPrefixLengthWithDefaults() *CreateNetworkIPv4WithPrefixLength { - this := CreateNetworkIPv4WithPrefixLength{} - return &this -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *CreateNetworkIPv4WithPrefixLength) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv4WithPrefixLength) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *CreateNetworkIPv4WithPrefixLength) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *CreateNetworkIPv4WithPrefixLength) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefixLength returns the PrefixLength field value -func (o *CreateNetworkIPv4WithPrefixLength) GetPrefixLength() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.PrefixLength -} - -// GetPrefixLengthOk returns a tuple with the PrefixLength field value -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv4WithPrefixLength) GetPrefixLengthOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.PrefixLength, true -} - -// SetPrefixLength sets field value -func (o *CreateNetworkIPv4WithPrefixLength) SetPrefixLength(v int64) { - o.PrefixLength = v -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId field value if set, zero value otherwise. -func (o *CreateNetworkIPv4WithPrefixLength) GetVpcNetworkRangeId() string { - if o == nil || IsNil(o.VpcNetworkRangeId) { - var ret string - return ret - } - return *o.VpcNetworkRangeId -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv4WithPrefixLength) GetVpcNetworkRangeIdOk() (*string, bool) { - if o == nil || IsNil(o.VpcNetworkRangeId) { - return nil, false - } - return o.VpcNetworkRangeId, true -} - -// HasVpcNetworkRangeId returns a boolean if a field has been set. -func (o *CreateNetworkIPv4WithPrefixLength) HasVpcNetworkRangeId() bool { - if o != nil && !IsNil(o.VpcNetworkRangeId) { - return true - } - - return false -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -func (o *CreateNetworkIPv4WithPrefixLength) SetVpcNetworkRangeId(v string) { - o.VpcNetworkRangeId = &v -} - -func (o CreateNetworkIPv4WithPrefixLength) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateNetworkIPv4WithPrefixLength) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefixLength"] = o.PrefixLength - if !IsNil(o.VpcNetworkRangeId) { - toSerialize["vpcNetworkRangeId"] = o.VpcNetworkRangeId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateNetworkIPv4WithPrefixLength) 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{ - "prefixLength", - } - - 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) - } - } - - varCreateNetworkIPv4WithPrefixLength := _CreateNetworkIPv4WithPrefixLength{} - - err = json.Unmarshal(data, &varCreateNetworkIPv4WithPrefixLength) - - if err != nil { - return err - } - - *o = CreateNetworkIPv4WithPrefixLength(varCreateNetworkIPv4WithPrefixLength) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefixLength") - delete(additionalProperties, "vpcNetworkRangeId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateNetworkIPv4WithPrefixLength struct { - value *CreateNetworkIPv4WithPrefixLength - isSet bool -} - -func (v NullableCreateNetworkIPv4WithPrefixLength) Get() *CreateNetworkIPv4WithPrefixLength { - return v.value -} - -func (v *NullableCreateNetworkIPv4WithPrefixLength) Set(val *CreateNetworkIPv4WithPrefixLength) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNetworkIPv4WithPrefixLength) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNetworkIPv4WithPrefixLength) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNetworkIPv4WithPrefixLength(val *CreateNetworkIPv4WithPrefixLength) *NullableCreateNetworkIPv4WithPrefixLength { - return &NullableCreateNetworkIPv4WithPrefixLength{value: val, isSet: true} -} - -func (v NullableCreateNetworkIPv4WithPrefixLength) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNetworkIPv4WithPrefixLength) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_network_ipv6.go b/services/iaas/v2alpha1api/model_create_network_ipv6.go deleted file mode 100644 index fc225d9970..0000000000 --- a/services/iaas/v2alpha1api/model_create_network_ipv6.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// CreateNetworkIPv6 - The create request for an IPv6 network. -type CreateNetworkIPv6 struct { - CreateNetworkIPv6WithPrefix *CreateNetworkIPv6WithPrefix - CreateNetworkIPv6WithPrefixLength *CreateNetworkIPv6WithPrefixLength -} - -// CreateNetworkIPv6WithPrefixAsCreateNetworkIPv6 is a convenience function that returns CreateNetworkIPv6WithPrefix wrapped in CreateNetworkIPv6 -func CreateNetworkIPv6WithPrefixAsCreateNetworkIPv6(v *CreateNetworkIPv6WithPrefix) CreateNetworkIPv6 { - return CreateNetworkIPv6{ - CreateNetworkIPv6WithPrefix: v, - } -} - -// CreateNetworkIPv6WithPrefixLengthAsCreateNetworkIPv6 is a convenience function that returns CreateNetworkIPv6WithPrefixLength wrapped in CreateNetworkIPv6 -func CreateNetworkIPv6WithPrefixLengthAsCreateNetworkIPv6(v *CreateNetworkIPv6WithPrefixLength) CreateNetworkIPv6 { - return CreateNetworkIPv6{ - CreateNetworkIPv6WithPrefixLength: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *CreateNetworkIPv6) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into CreateNetworkIPv6WithPrefix - err = json.Unmarshal(data, &dst.CreateNetworkIPv6WithPrefix) - if err == nil { - jsonCreateNetworkIPv6WithPrefix, _ := json.Marshal(dst.CreateNetworkIPv6WithPrefix) - if string(jsonCreateNetworkIPv6WithPrefix) == "{}" { // empty struct - dst.CreateNetworkIPv6WithPrefix = nil - } else { - match++ - } - } else { - dst.CreateNetworkIPv6WithPrefix = nil - } - - // try to unmarshal data into CreateNetworkIPv6WithPrefixLength - err = json.Unmarshal(data, &dst.CreateNetworkIPv6WithPrefixLength) - if err == nil { - jsonCreateNetworkIPv6WithPrefixLength, _ := json.Marshal(dst.CreateNetworkIPv6WithPrefixLength) - if string(jsonCreateNetworkIPv6WithPrefixLength) == "{}" { // empty struct - dst.CreateNetworkIPv6WithPrefixLength = nil - } else { - match++ - } - } else { - dst.CreateNetworkIPv6WithPrefixLength = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.CreateNetworkIPv6WithPrefix = nil - dst.CreateNetworkIPv6WithPrefixLength = nil - - return fmt.Errorf("data matches more than one schema in oneOf(CreateNetworkIPv6)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - if err != nil { - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6): %v", err) - } - - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateNetworkIPv6) MarshalJSON() ([]byte, error) { - if src.CreateNetworkIPv6WithPrefix != nil { - return json.Marshal(&src.CreateNetworkIPv6WithPrefix) - } - - if src.CreateNetworkIPv6WithPrefixLength != nil { - return json.Marshal(&src.CreateNetworkIPv6WithPrefixLength) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *CreateNetworkIPv6) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.CreateNetworkIPv6WithPrefix != nil { - return obj.CreateNetworkIPv6WithPrefix - } - - if obj.CreateNetworkIPv6WithPrefixLength != nil { - return obj.CreateNetworkIPv6WithPrefixLength - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj CreateNetworkIPv6) GetActualInstanceValue() interface{} { - if obj.CreateNetworkIPv6WithPrefix != nil { - return *obj.CreateNetworkIPv6WithPrefix - } - - if obj.CreateNetworkIPv6WithPrefixLength != nil { - return *obj.CreateNetworkIPv6WithPrefixLength - } - - // all schemas are nil - return nil -} - -type NullableCreateNetworkIPv6 struct { - value *CreateNetworkIPv6 - isSet bool -} - -func (v NullableCreateNetworkIPv6) Get() *CreateNetworkIPv6 { - return v.value -} - -func (v *NullableCreateNetworkIPv6) Set(val *CreateNetworkIPv6) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNetworkIPv6) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNetworkIPv6) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNetworkIPv6(val *CreateNetworkIPv6) *NullableCreateNetworkIPv6 { - return &NullableCreateNetworkIPv6{value: val, isSet: true} -} - -func (v NullableCreateNetworkIPv6) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNetworkIPv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix.go b/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix.go deleted file mode 100644 index 9fe0c649b1..0000000000 --- a/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix.go +++ /dev/null @@ -1,293 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateNetworkIPv6WithPrefix type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkIPv6WithPrefix{} - -// CreateNetworkIPv6WithPrefix The create request for an IPv6 network with a specified prefix. -type CreateNetworkIPv6WithPrefix struct { - // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers []string `json:"nameservers,omitempty"` - // Classless Inter-Domain Routing (CIDR) for IPv6. - Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" 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 _CreateNetworkIPv6WithPrefix CreateNetworkIPv6WithPrefix - -// NewCreateNetworkIPv6WithPrefix instantiates a new CreateNetworkIPv6WithPrefix 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 NewCreateNetworkIPv6WithPrefix(prefix string) *CreateNetworkIPv6WithPrefix { - this := CreateNetworkIPv6WithPrefix{} - this.Prefix = prefix - return &this -} - -// NewCreateNetworkIPv6WithPrefixWithDefaults instantiates a new CreateNetworkIPv6WithPrefix 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 NewCreateNetworkIPv6WithPrefixWithDefaults() *CreateNetworkIPv6WithPrefix { - this := CreateNetworkIPv6WithPrefix{} - return &this -} - -// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CreateNetworkIPv6WithPrefix) GetGateway() string { - if o == nil || IsNil(o.Gateway.Get()) { - var ret string - return ret - } - return *o.Gateway.Get() -} - -// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CreateNetworkIPv6WithPrefix) GetGatewayOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Gateway.Get(), o.Gateway.IsSet() -} - -// HasGateway returns a boolean if a field has been set. -func (o *CreateNetworkIPv6WithPrefix) HasGateway() bool { - if o != nil && o.Gateway.IsSet() { - return true - } - - return false -} - -// SetGateway gets a reference to the given NullableString and assigns it to the Gateway field. -func (o *CreateNetworkIPv6WithPrefix) SetGateway(v string) { - o.Gateway.Set(&v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -func (o *CreateNetworkIPv6WithPrefix) SetGatewayNil() { - o.Gateway.Set(nil) -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -func (o *CreateNetworkIPv6WithPrefix) UnsetGateway() { - o.Gateway.Unset() -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *CreateNetworkIPv6WithPrefix) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv6WithPrefix) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *CreateNetworkIPv6WithPrefix) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *CreateNetworkIPv6WithPrefix) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefix returns the Prefix field value -func (o *CreateNetworkIPv6WithPrefix) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv6WithPrefix) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *CreateNetworkIPv6WithPrefix) SetPrefix(v string) { - o.Prefix = v -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId field value if set, zero value otherwise. -func (o *CreateNetworkIPv6WithPrefix) GetVpcNetworkRangeId() string { - if o == nil || IsNil(o.VpcNetworkRangeId) { - var ret string - return ret - } - return *o.VpcNetworkRangeId -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv6WithPrefix) GetVpcNetworkRangeIdOk() (*string, bool) { - if o == nil || IsNil(o.VpcNetworkRangeId) { - return nil, false - } - return o.VpcNetworkRangeId, true -} - -// HasVpcNetworkRangeId returns a boolean if a field has been set. -func (o *CreateNetworkIPv6WithPrefix) HasVpcNetworkRangeId() bool { - if o != nil && !IsNil(o.VpcNetworkRangeId) { - return true - } - - return false -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -func (o *CreateNetworkIPv6WithPrefix) SetVpcNetworkRangeId(v string) { - o.VpcNetworkRangeId = &v -} - -func (o CreateNetworkIPv6WithPrefix) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateNetworkIPv6WithPrefix) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Gateway.IsSet() { - toSerialize["gateway"] = o.Gateway.Get() - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefix"] = o.Prefix - if !IsNil(o.VpcNetworkRangeId) { - toSerialize["vpcNetworkRangeId"] = o.VpcNetworkRangeId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateNetworkIPv6WithPrefix) 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{ - "prefix", - } - - 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) - } - } - - varCreateNetworkIPv6WithPrefix := _CreateNetworkIPv6WithPrefix{} - - err = json.Unmarshal(data, &varCreateNetworkIPv6WithPrefix) - - if err != nil { - return err - } - - *o = CreateNetworkIPv6WithPrefix(varCreateNetworkIPv6WithPrefix) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "gateway") - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefix") - delete(additionalProperties, "vpcNetworkRangeId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateNetworkIPv6WithPrefix struct { - value *CreateNetworkIPv6WithPrefix - isSet bool -} - -func (v NullableCreateNetworkIPv6WithPrefix) Get() *CreateNetworkIPv6WithPrefix { - return v.value -} - -func (v *NullableCreateNetworkIPv6WithPrefix) Set(val *CreateNetworkIPv6WithPrefix) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNetworkIPv6WithPrefix) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNetworkIPv6WithPrefix) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNetworkIPv6WithPrefix(val *CreateNetworkIPv6WithPrefix) *NullableCreateNetworkIPv6WithPrefix { - return &NullableCreateNetworkIPv6WithPrefix{value: val, isSet: true} -} - -func (v NullableCreateNetworkIPv6WithPrefix) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNetworkIPv6WithPrefix) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix_length.go b/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix_length.go deleted file mode 100644 index f295afaecf..0000000000 --- a/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix_length.go +++ /dev/null @@ -1,243 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateNetworkIPv6WithPrefixLength type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkIPv6WithPrefixLength{} - -// CreateNetworkIPv6WithPrefixLength The create request for an IPv6 network with a wanted prefix length. -type CreateNetworkIPv6WithPrefixLength struct { - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers []string `json:"nameservers,omitempty"` - PrefixLength int64 `json:"prefixLength"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" 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 _CreateNetworkIPv6WithPrefixLength CreateNetworkIPv6WithPrefixLength - -// NewCreateNetworkIPv6WithPrefixLength instantiates a new CreateNetworkIPv6WithPrefixLength 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 NewCreateNetworkIPv6WithPrefixLength(prefixLength int64) *CreateNetworkIPv6WithPrefixLength { - this := CreateNetworkIPv6WithPrefixLength{} - this.PrefixLength = prefixLength - return &this -} - -// NewCreateNetworkIPv6WithPrefixLengthWithDefaults instantiates a new CreateNetworkIPv6WithPrefixLength 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 NewCreateNetworkIPv6WithPrefixLengthWithDefaults() *CreateNetworkIPv6WithPrefixLength { - this := CreateNetworkIPv6WithPrefixLength{} - return &this -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *CreateNetworkIPv6WithPrefixLength) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv6WithPrefixLength) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *CreateNetworkIPv6WithPrefixLength) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *CreateNetworkIPv6WithPrefixLength) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefixLength returns the PrefixLength field value -func (o *CreateNetworkIPv6WithPrefixLength) GetPrefixLength() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.PrefixLength -} - -// GetPrefixLengthOk returns a tuple with the PrefixLength field value -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv6WithPrefixLength) GetPrefixLengthOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.PrefixLength, true -} - -// SetPrefixLength sets field value -func (o *CreateNetworkIPv6WithPrefixLength) SetPrefixLength(v int64) { - o.PrefixLength = v -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId field value if set, zero value otherwise. -func (o *CreateNetworkIPv6WithPrefixLength) GetVpcNetworkRangeId() string { - if o == nil || IsNil(o.VpcNetworkRangeId) { - var ret string - return ret - } - return *o.VpcNetworkRangeId -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkIPv6WithPrefixLength) GetVpcNetworkRangeIdOk() (*string, bool) { - if o == nil || IsNil(o.VpcNetworkRangeId) { - return nil, false - } - return o.VpcNetworkRangeId, true -} - -// HasVpcNetworkRangeId returns a boolean if a field has been set. -func (o *CreateNetworkIPv6WithPrefixLength) HasVpcNetworkRangeId() bool { - if o != nil && !IsNil(o.VpcNetworkRangeId) { - return true - } - - return false -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -func (o *CreateNetworkIPv6WithPrefixLength) SetVpcNetworkRangeId(v string) { - o.VpcNetworkRangeId = &v -} - -func (o CreateNetworkIPv6WithPrefixLength) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateNetworkIPv6WithPrefixLength) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefixLength"] = o.PrefixLength - if !IsNil(o.VpcNetworkRangeId) { - toSerialize["vpcNetworkRangeId"] = o.VpcNetworkRangeId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateNetworkIPv6WithPrefixLength) 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{ - "prefixLength", - } - - 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) - } - } - - varCreateNetworkIPv6WithPrefixLength := _CreateNetworkIPv6WithPrefixLength{} - - err = json.Unmarshal(data, &varCreateNetworkIPv6WithPrefixLength) - - if err != nil { - return err - } - - *o = CreateNetworkIPv6WithPrefixLength(varCreateNetworkIPv6WithPrefixLength) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefixLength") - delete(additionalProperties, "vpcNetworkRangeId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateNetworkIPv6WithPrefixLength struct { - value *CreateNetworkIPv6WithPrefixLength - isSet bool -} - -func (v NullableCreateNetworkIPv6WithPrefixLength) Get() *CreateNetworkIPv6WithPrefixLength { - return v.value -} - -func (v *NullableCreateNetworkIPv6WithPrefixLength) Set(val *CreateNetworkIPv6WithPrefixLength) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNetworkIPv6WithPrefixLength) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNetworkIPv6WithPrefixLength) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNetworkIPv6WithPrefixLength(val *CreateNetworkIPv6WithPrefixLength) *NullableCreateNetworkIPv6WithPrefixLength { - return &NullableCreateNetworkIPv6WithPrefixLength{value: val, isSet: true} -} - -func (v NullableCreateNetworkIPv6WithPrefixLength) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNetworkIPv6WithPrefixLength) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_network_payload.go b/services/iaas/v2alpha1api/model_create_network_payload.go deleted file mode 100644 index 05b926c76c..0000000000 --- a/services/iaas/v2alpha1api/model_create_network_payload.go +++ /dev/null @@ -1,436 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateNetworkPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkPayload{} - -// CreateNetworkPayload Object that represents the request body for a network create. -type CreateNetworkPayload struct { - // Enable or disable DHCP for a network. - Dhcp *bool `json:"dhcp,omitempty"` - Ipv4 *CreateNetworkIPv4 `json:"ipv4,omitempty"` - Ipv6 *CreateNetworkIPv6 `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,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]+)*$"` - // Shows if the network is routed and therefore accessible from other networks. - Routed *bool `json:"routed,omitempty"` - // Universally Unique Identifier (UUID). - RoutingTableId *string `json:"routingTableId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` - // The identifier (ID) of a STACKIT VPC. - VpcId *string `json:"vpcId,omitempty" 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 _CreateNetworkPayload CreateNetworkPayload - -// NewCreateNetworkPayload instantiates a new CreateNetworkPayload 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 NewCreateNetworkPayload(name string) *CreateNetworkPayload { - this := CreateNetworkPayload{} - var dhcp bool = true - this.Dhcp = &dhcp - this.Name = name - return &this -} - -// NewCreateNetworkPayloadWithDefaults instantiates a new CreateNetworkPayload 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 NewCreateNetworkPayloadWithDefaults() *CreateNetworkPayload { - this := CreateNetworkPayload{} - var dhcp bool = true - this.Dhcp = &dhcp - return &this -} - -// GetDhcp returns the Dhcp field value if set, zero value otherwise. -func (o *CreateNetworkPayload) GetDhcp() bool { - if o == nil || IsNil(o.Dhcp) { - var ret bool - return ret - } - return *o.Dhcp -} - -// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkPayload) GetDhcpOk() (*bool, bool) { - if o == nil || IsNil(o.Dhcp) { - return nil, false - } - return o.Dhcp, true -} - -// HasDhcp returns a boolean if a field has been set. -func (o *CreateNetworkPayload) HasDhcp() bool { - if o != nil && !IsNil(o.Dhcp) { - return true - } - - return false -} - -// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. -func (o *CreateNetworkPayload) SetDhcp(v bool) { - o.Dhcp = &v -} - -// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. -func (o *CreateNetworkPayload) GetIpv4() CreateNetworkIPv4 { - if o == nil || IsNil(o.Ipv4) { - var ret CreateNetworkIPv4 - return ret - } - return *o.Ipv4 -} - -// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkPayload) GetIpv4Ok() (*CreateNetworkIPv4, bool) { - if o == nil || IsNil(o.Ipv4) { - return nil, false - } - return o.Ipv4, true -} - -// HasIpv4 returns a boolean if a field has been set. -func (o *CreateNetworkPayload) HasIpv4() bool { - if o != nil && !IsNil(o.Ipv4) { - return true - } - - return false -} - -// SetIpv4 gets a reference to the given CreateNetworkIPv4 and assigns it to the Ipv4 field. -func (o *CreateNetworkPayload) SetIpv4(v CreateNetworkIPv4) { - o.Ipv4 = &v -} - -// GetIpv6 returns the Ipv6 field value if set, zero value otherwise. -func (o *CreateNetworkPayload) GetIpv6() CreateNetworkIPv6 { - if o == nil || IsNil(o.Ipv6) { - var ret CreateNetworkIPv6 - return ret - } - return *o.Ipv6 -} - -// GetIpv6Ok returns a tuple with the Ipv6 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkPayload) GetIpv6Ok() (*CreateNetworkIPv6, bool) { - if o == nil || IsNil(o.Ipv6) { - return nil, false - } - return o.Ipv6, true -} - -// HasIpv6 returns a boolean if a field has been set. -func (o *CreateNetworkPayload) HasIpv6() bool { - if o != nil && !IsNil(o.Ipv6) { - return true - } - - return false -} - -// SetIpv6 gets a reference to the given CreateNetworkIPv6 and assigns it to the Ipv6 field. -func (o *CreateNetworkPayload) SetIpv6(v CreateNetworkIPv6) { - o.Ipv6 = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *CreateNetworkPayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *CreateNetworkPayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *CreateNetworkPayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *CreateNetworkPayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *CreateNetworkPayload) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateNetworkPayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateNetworkPayload) SetName(v string) { - o.Name = v -} - -// GetRouted returns the Routed field value if set, zero value otherwise. -func (o *CreateNetworkPayload) GetRouted() bool { - if o == nil || IsNil(o.Routed) { - var ret bool - return ret - } - return *o.Routed -} - -// GetRoutedOk returns a tuple with the Routed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkPayload) GetRoutedOk() (*bool, bool) { - if o == nil || IsNil(o.Routed) { - return nil, false - } - return o.Routed, true -} - -// HasRouted returns a boolean if a field has been set. -func (o *CreateNetworkPayload) HasRouted() bool { - if o != nil && !IsNil(o.Routed) { - return true - } - - return false -} - -// SetRouted gets a reference to the given bool and assigns it to the Routed field. -func (o *CreateNetworkPayload) SetRouted(v bool) { - o.Routed = &v -} - -// GetRoutingTableId returns the RoutingTableId field value if set, zero value otherwise. -func (o *CreateNetworkPayload) GetRoutingTableId() string { - if o == nil || IsNil(o.RoutingTableId) { - var ret string - return ret - } - return *o.RoutingTableId -} - -// GetRoutingTableIdOk returns a tuple with the RoutingTableId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkPayload) GetRoutingTableIdOk() (*string, bool) { - if o == nil || IsNil(o.RoutingTableId) { - return nil, false - } - return o.RoutingTableId, true -} - -// HasRoutingTableId returns a boolean if a field has been set. -func (o *CreateNetworkPayload) HasRoutingTableId() bool { - if o != nil && !IsNil(o.RoutingTableId) { - return true - } - - return false -} - -// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field. -func (o *CreateNetworkPayload) SetRoutingTableId(v string) { - o.RoutingTableId = &v -} - -// GetVpcId returns the VpcId field value if set, zero value otherwise. -func (o *CreateNetworkPayload) GetVpcId() string { - if o == nil || IsNil(o.VpcId) { - var ret string - return ret - } - return *o.VpcId -} - -// GetVpcIdOk returns a tuple with the VpcId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNetworkPayload) GetVpcIdOk() (*string, bool) { - if o == nil || IsNil(o.VpcId) { - return nil, false - } - return o.VpcId, true -} - -// HasVpcId returns a boolean if a field has been set. -func (o *CreateNetworkPayload) HasVpcId() bool { - if o != nil && !IsNil(o.VpcId) { - return true - } - - return false -} - -// SetVpcId gets a reference to the given string and assigns it to the VpcId field. -func (o *CreateNetworkPayload) SetVpcId(v string) { - o.VpcId = &v -} - -func (o CreateNetworkPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateNetworkPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Dhcp) { - toSerialize["dhcp"] = o.Dhcp - } - if !IsNil(o.Ipv4) { - toSerialize["ipv4"] = o.Ipv4 - } - if !IsNil(o.Ipv6) { - toSerialize["ipv6"] = o.Ipv6 - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - if !IsNil(o.Routed) { - toSerialize["routed"] = o.Routed - } - if !IsNil(o.RoutingTableId) { - toSerialize["routingTableId"] = o.RoutingTableId - } - if !IsNil(o.VpcId) { - toSerialize["vpcId"] = o.VpcId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateNetworkPayload) 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{ - "name", - } - - 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) - } - } - - varCreateNetworkPayload := _CreateNetworkPayload{} - - err = json.Unmarshal(data, &varCreateNetworkPayload) - - if err != nil { - return err - } - - *o = CreateNetworkPayload(varCreateNetworkPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "dhcp") - delete(additionalProperties, "ipv4") - delete(additionalProperties, "ipv6") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "routed") - delete(additionalProperties, "routingTableId") - delete(additionalProperties, "vpcId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateNetworkPayload struct { - value *CreateNetworkPayload - isSet bool -} - -func (v NullableCreateNetworkPayload) Get() *CreateNetworkPayload { - return v.value -} - -func (v *NullableCreateNetworkPayload) Set(val *CreateNetworkPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNetworkPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNetworkPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNetworkPayload(val *CreateNetworkPayload) *NullableCreateNetworkPayload { - return &NullableCreateNetworkPayload{value: val, isSet: true} -} - -func (v NullableCreateNetworkPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNetworkPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_vpc_network_range_payload.go b/services/iaas/v2alpha1api/model_create_vpc_network_range_payload.go deleted file mode 100644 index f4295955ac..0000000000 --- a/services/iaas/v2alpha1api/model_create_vpc_network_range_payload.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// CreateVPCNetworkRangePayload - The request body of a VPC network range. -type CreateVPCNetworkRangePayload struct { - NetworkRangeIPv4Request *NetworkRangeIPv4Request -} - -// NetworkRangeIPv4RequestAsCreateVPCNetworkRangePayload is a convenience function that returns NetworkRangeIPv4Request wrapped in CreateVPCNetworkRangePayload -func NetworkRangeIPv4RequestAsCreateVPCNetworkRangePayload(v *NetworkRangeIPv4Request) CreateVPCNetworkRangePayload { - return CreateVPCNetworkRangePayload{ - NetworkRangeIPv4Request: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *CreateVPCNetworkRangePayload) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'ipv4' - if jsonDict["ipVersion"] == "ipv4" { - // try to unmarshal JSON data into NetworkRangeIPv4Request - err = json.Unmarshal(data, &dst.NetworkRangeIPv4Request) - if err == nil { - return nil // data stored in dst.NetworkRangeIPv4Request, return on the first match - } else { - dst.NetworkRangeIPv4Request = nil - return fmt.Errorf("failed to unmarshal CreateVPCNetworkRangePayload as NetworkRangeIPv4Request: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateVPCNetworkRangePayload) MarshalJSON() ([]byte, error) { - if src.NetworkRangeIPv4Request != nil { - return json.Marshal(&src.NetworkRangeIPv4Request) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *CreateVPCNetworkRangePayload) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.NetworkRangeIPv4Request != nil { - return obj.NetworkRangeIPv4Request - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj CreateVPCNetworkRangePayload) GetActualInstanceValue() interface{} { - if obj.NetworkRangeIPv4Request != nil { - return *obj.NetworkRangeIPv4Request - } - - // all schemas are nil - return nil -} - -type NullableCreateVPCNetworkRangePayload struct { - value *CreateVPCNetworkRangePayload - isSet bool -} - -func (v NullableCreateVPCNetworkRangePayload) Get() *CreateVPCNetworkRangePayload { - return v.value -} - -func (v *NullableCreateVPCNetworkRangePayload) Set(val *CreateVPCNetworkRangePayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateVPCNetworkRangePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateVPCNetworkRangePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateVPCNetworkRangePayload(val *CreateVPCNetworkRangePayload) *NullableCreateVPCNetworkRangePayload { - return &NullableCreateVPCNetworkRangePayload{value: val, isSet: true} -} - -func (v NullableCreateVPCNetworkRangePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateVPCNetworkRangePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_vpc_payload.go b/services/iaas/v2alpha1api/model_create_vpc_payload.go deleted file mode 100644 index ea4024d802..0000000000 --- a/services/iaas/v2alpha1api/model_create_vpc_payload.go +++ /dev/null @@ -1,244 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateVPCPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateVPCPayload{} - -// CreateVPCPayload Object that represents a create VPC request. -type CreateVPCPayload struct { - // Description Object. Allows string up to 255 Characters. - Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,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]+)*$"` - AdditionalProperties map[string]interface{} -} - -type _CreateVPCPayload CreateVPCPayload - -// NewCreateVPCPayload instantiates a new CreateVPCPayload 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 NewCreateVPCPayload(name string) *CreateVPCPayload { - this := CreateVPCPayload{} - this.Name = name - return &this -} - -// NewCreateVPCPayloadWithDefaults instantiates a new CreateVPCPayload 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 NewCreateVPCPayloadWithDefaults() *CreateVPCPayload { - this := CreateVPCPayload{} - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *CreateVPCPayload) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateVPCPayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *CreateVPCPayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *CreateVPCPayload) SetDescription(v string) { - o.Description = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *CreateVPCPayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *CreateVPCPayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *CreateVPCPayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *CreateVPCPayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *CreateVPCPayload) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateVPCPayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateVPCPayload) SetName(v string) { - o.Name = v -} - -func (o CreateVPCPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateVPCPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateVPCPayload) 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{ - "name", - } - - 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) - } - } - - varCreateVPCPayload := _CreateVPCPayload{} - - err = json.Unmarshal(data, &varCreateVPCPayload) - - if err != nil { - return err - } - - *o = CreateVPCPayload(varCreateVPCPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "description") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateVPCPayload struct { - value *CreateVPCPayload - isSet bool -} - -func (v NullableCreateVPCPayload) Get() *CreateVPCPayload { - return v.value -} - -func (v *NullableCreateVPCPayload) Set(val *CreateVPCPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateVPCPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateVPCPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateVPCPayload(val *CreateVPCPayload) *NullableCreateVPCPayload { - return &NullableCreateVPCPayload{value: val, isSet: true} -} - -func (v NullableCreateVPCPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateVPCPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_create_vpc_region_payload.go b/services/iaas/v2alpha1api/model_create_vpc_region_payload.go deleted file mode 100644 index 8adc4d8298..0000000000 --- a/services/iaas/v2alpha1api/model_create_vpc_region_payload.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the CreateVPCRegionPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateVPCRegionPayload{} - -// CreateVPCRegionPayload The basic properties of a regional VPC. -type CreateVPCRegionPayload struct { - Ipv4 *RegionalVPCIPv4 `json:"ipv4,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status *string `json:"status,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CreateVPCRegionPayload CreateVPCRegionPayload - -// NewCreateVPCRegionPayload instantiates a new CreateVPCRegionPayload 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 NewCreateVPCRegionPayload() *CreateVPCRegionPayload { - this := CreateVPCRegionPayload{} - return &this -} - -// NewCreateVPCRegionPayloadWithDefaults instantiates a new CreateVPCRegionPayload 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 NewCreateVPCRegionPayloadWithDefaults() *CreateVPCRegionPayload { - this := CreateVPCRegionPayload{} - return &this -} - -// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. -func (o *CreateVPCRegionPayload) GetIpv4() RegionalVPCIPv4 { - if o == nil || IsNil(o.Ipv4) { - var ret RegionalVPCIPv4 - return ret - } - return *o.Ipv4 -} - -// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateVPCRegionPayload) GetIpv4Ok() (*RegionalVPCIPv4, bool) { - if o == nil || IsNil(o.Ipv4) { - return nil, false - } - return o.Ipv4, true -} - -// HasIpv4 returns a boolean if a field has been set. -func (o *CreateVPCRegionPayload) HasIpv4() bool { - if o != nil && !IsNil(o.Ipv4) { - return true - } - - return false -} - -// SetIpv4 gets a reference to the given RegionalVPCIPv4 and assigns it to the Ipv4 field. -func (o *CreateVPCRegionPayload) SetIpv4(v RegionalVPCIPv4) { - o.Ipv4 = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *CreateVPCRegionPayload) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateVPCRegionPayload) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *CreateVPCRegionPayload) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *CreateVPCRegionPayload) SetStatus(v string) { - o.Status = &v -} - -func (o CreateVPCRegionPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateVPCRegionPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Ipv4) { - toSerialize["ipv4"] = o.Ipv4 - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateVPCRegionPayload) UnmarshalJSON(data []byte) (err error) { - varCreateVPCRegionPayload := _CreateVPCRegionPayload{} - - err = json.Unmarshal(data, &varCreateVPCRegionPayload) - - if err != nil { - return err - } - - *o = CreateVPCRegionPayload(varCreateVPCRegionPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "ipv4") - delete(additionalProperties, "status") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateVPCRegionPayload struct { - value *CreateVPCRegionPayload - isSet bool -} - -func (v NullableCreateVPCRegionPayload) Get() *CreateVPCRegionPayload { - return v.value -} - -func (v *NullableCreateVPCRegionPayload) Set(val *CreateVPCRegionPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateVPCRegionPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateVPCRegionPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateVPCRegionPayload(val *CreateVPCRegionPayload) *NullableCreateVPCRegionPayload { - return &NullableCreateVPCRegionPayload{value: val, isSet: true} -} - -func (v NullableCreateVPCRegionPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateVPCRegionPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_destination_cidrv4.go b/services/iaas/v2alpha1api/model_destination_cidrv4.go deleted file mode 100644 index 7fa385304e..0000000000 --- a/services/iaas/v2alpha1api/model_destination_cidrv4.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the DestinationCIDRv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DestinationCIDRv4{} - -// DestinationCIDRv4 IPv4 Classless Inter-Domain Routing (CIDR) Object. -type DestinationCIDRv4 struct { - Type string `json:"type"` - // An CIDRv4 string. - Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` - AdditionalProperties map[string]interface{} -} - -type _DestinationCIDRv4 DestinationCIDRv4 - -// NewDestinationCIDRv4 instantiates a new DestinationCIDRv4 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 NewDestinationCIDRv4(types string, value string) *DestinationCIDRv4 { - this := DestinationCIDRv4{} - this.Type = types - this.Value = value - return &this -} - -// NewDestinationCIDRv4WithDefaults instantiates a new DestinationCIDRv4 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 NewDestinationCIDRv4WithDefaults() *DestinationCIDRv4 { - this := DestinationCIDRv4{} - return &this -} - -// GetType returns the Type field value -func (o *DestinationCIDRv4) GetType() string { - if o == nil { - var ret string - 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 *DestinationCIDRv4) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *DestinationCIDRv4) SetType(v string) { - o.Type = v -} - -// GetValue returns the Value field value -func (o *DestinationCIDRv4) 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 *DestinationCIDRv4) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *DestinationCIDRv4) SetValue(v string) { - o.Value = v -} - -func (o DestinationCIDRv4) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DestinationCIDRv4) 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 *DestinationCIDRv4) 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) - } - } - - varDestinationCIDRv4 := _DestinationCIDRv4{} - - err = json.Unmarshal(data, &varDestinationCIDRv4) - - if err != nil { - return err - } - - *o = DestinationCIDRv4(varDestinationCIDRv4) - - 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 NullableDestinationCIDRv4 struct { - value *DestinationCIDRv4 - isSet bool -} - -func (v NullableDestinationCIDRv4) Get() *DestinationCIDRv4 { - return v.value -} - -func (v *NullableDestinationCIDRv4) Set(val *DestinationCIDRv4) { - v.value = val - v.isSet = true -} - -func (v NullableDestinationCIDRv4) IsSet() bool { - return v.isSet -} - -func (v *NullableDestinationCIDRv4) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDestinationCIDRv4(val *DestinationCIDRv4) *NullableDestinationCIDRv4 { - return &NullableDestinationCIDRv4{value: val, isSet: true} -} - -func (v NullableDestinationCIDRv4) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDestinationCIDRv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_destination_cidrv6.go b/services/iaas/v2alpha1api/model_destination_cidrv6.go deleted file mode 100644 index 9d360e9ece..0000000000 --- a/services/iaas/v2alpha1api/model_destination_cidrv6.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the DestinationCIDRv6 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DestinationCIDRv6{} - -// DestinationCIDRv6 IPv6 Classless Inter-Domain Routing (CIDR) Object. -type DestinationCIDRv6 struct { - Type string `json:"type"` - // An CIDRv6 string. - Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` - AdditionalProperties map[string]interface{} -} - -type _DestinationCIDRv6 DestinationCIDRv6 - -// NewDestinationCIDRv6 instantiates a new DestinationCIDRv6 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 NewDestinationCIDRv6(types string, value string) *DestinationCIDRv6 { - this := DestinationCIDRv6{} - this.Type = types - this.Value = value - return &this -} - -// NewDestinationCIDRv6WithDefaults instantiates a new DestinationCIDRv6 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 NewDestinationCIDRv6WithDefaults() *DestinationCIDRv6 { - this := DestinationCIDRv6{} - return &this -} - -// GetType returns the Type field value -func (o *DestinationCIDRv6) GetType() string { - if o == nil { - var ret string - 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 *DestinationCIDRv6) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *DestinationCIDRv6) SetType(v string) { - o.Type = v -} - -// GetValue returns the Value field value -func (o *DestinationCIDRv6) 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 *DestinationCIDRv6) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *DestinationCIDRv6) SetValue(v string) { - o.Value = v -} - -func (o DestinationCIDRv6) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DestinationCIDRv6) 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 *DestinationCIDRv6) 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) - } - } - - varDestinationCIDRv6 := _DestinationCIDRv6{} - - err = json.Unmarshal(data, &varDestinationCIDRv6) - - if err != nil { - return err - } - - *o = DestinationCIDRv6(varDestinationCIDRv6) - - 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 NullableDestinationCIDRv6 struct { - value *DestinationCIDRv6 - isSet bool -} - -func (v NullableDestinationCIDRv6) Get() *DestinationCIDRv6 { - return v.value -} - -func (v *NullableDestinationCIDRv6) Set(val *DestinationCIDRv6) { - v.value = val - v.isSet = true -} - -func (v NullableDestinationCIDRv6) IsSet() bool { - return v.isSet -} - -func (v *NullableDestinationCIDRv6) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDestinationCIDRv6(val *DestinationCIDRv6) *NullableDestinationCIDRv6 { - return &NullableDestinationCIDRv6{value: val, isSet: true} -} - -func (v NullableDestinationCIDRv6) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDestinationCIDRv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_error.go b/services/iaas/v2alpha1api/model_error.go deleted file mode 100644 index c6f67bd97c..0000000000 --- a/services/iaas/v2alpha1api/model_error.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the Error type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Error{} - -// Error Error with HTTP error code and an error message. -type Error struct { - Code int64 `json:"code"` - // An error message. - Msg string `json:"msg"` - AdditionalProperties map[string]interface{} -} - -type _Error Error - -// NewError instantiates a new Error 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 NewError(code int64, msg string) *Error { - this := Error{} - this.Code = code - this.Msg = msg - return &this -} - -// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { - this := Error{} - return &this -} - -// GetCode returns the Code field value -func (o *Error) GetCode() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value -// and a boolean to check if the value has been set. -func (o *Error) GetCodeOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.Code, true -} - -// SetCode sets field value -func (o *Error) SetCode(v int64) { - o.Code = v -} - -// GetMsg returns the Msg field value -func (o *Error) GetMsg() string { - if o == nil { - var ret string - return ret - } - - return o.Msg -} - -// GetMsgOk returns a tuple with the Msg field value -// and a boolean to check if the value has been set. -func (o *Error) GetMsgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Msg, true -} - -// SetMsg sets field value -func (o *Error) SetMsg(v string) { - o.Msg = v -} - -func (o Error) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Error) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["code"] = o.Code - toSerialize["msg"] = o.Msg - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Error) 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{ - "code", - "msg", - } - - 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) - } - } - - varError := _Error{} - - err = json.Unmarshal(data, &varError) - - if err != nil { - return err - } - - *o = Error(varError) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "code") - delete(additionalProperties, "msg") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableError struct { - value *Error - isSet bool -} - -func (v NullableError) Get() *Error { - return v.value -} - -func (v *NullableError) Set(val *Error) { - v.value = val - v.isSet = true -} - -func (v NullableError) IsSet() bool { - return v.isSet -} - -func (v *NullableError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableError(val *Error) *NullableError { - return &NullableError{value: val, isSet: true} -} - -func (v NullableError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_network.go b/services/iaas/v2alpha1api/model_network.go deleted file mode 100644 index f8b70ac321..0000000000 --- a/services/iaas/v2alpha1api/model_network.go +++ /dev/null @@ -1,568 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the Network type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Network{} - -// Network Object that represents a network. If no routing table is specified, the default routing table is used. -type Network struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - // Enable or disable DHCP for a network. - Dhcp *bool `json:"dhcp,omitempty"` - // Universally Unique Identifier (UUID). - Id string `json:"id" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` - Ipv4 *NetworkIPv4 `json:"ipv4,omitempty"` - Ipv6 *NetworkIPv6 `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - Name string `json:"name"` - // Shows if the network is routed and therefore accessible from other networks. - Routed *bool `json:"routed,omitempty"` - // Universally Unique Identifier (UUID). - RoutingTableId *string `json:"routingTableId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status string `json:"status"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - // The identifier (ID) of a STACKIT VPC. - VpcId *string `json:"vpcId,omitempty" 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 _Network Network - -// NewNetwork instantiates a new Network 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 NewNetwork(id string, name string, status string) *Network { - this := Network{} - this.Id = id - this.Name = name - this.Status = status - return &this -} - -// NewNetworkWithDefaults instantiates a new Network 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 NewNetworkWithDefaults() *Network { - this := Network{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Network) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *Network) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *Network) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDhcp returns the Dhcp field value if set, zero value otherwise. -func (o *Network) GetDhcp() bool { - if o == nil || IsNil(o.Dhcp) { - var ret bool - return ret - } - return *o.Dhcp -} - -// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetDhcpOk() (*bool, bool) { - if o == nil || IsNil(o.Dhcp) { - return nil, false - } - return o.Dhcp, true -} - -// HasDhcp returns a boolean if a field has been set. -func (o *Network) HasDhcp() bool { - if o != nil && !IsNil(o.Dhcp) { - return true - } - - return false -} - -// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. -func (o *Network) SetDhcp(v bool) { - o.Dhcp = &v -} - -// GetId returns the Id field value -func (o *Network) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *Network) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *Network) SetId(v string) { - o.Id = v -} - -// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. -func (o *Network) GetIpv4() NetworkIPv4 { - if o == nil || IsNil(o.Ipv4) { - var ret NetworkIPv4 - return ret - } - return *o.Ipv4 -} - -// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetIpv4Ok() (*NetworkIPv4, bool) { - if o == nil || IsNil(o.Ipv4) { - return nil, false - } - return o.Ipv4, true -} - -// HasIpv4 returns a boolean if a field has been set. -func (o *Network) HasIpv4() bool { - if o != nil && !IsNil(o.Ipv4) { - return true - } - - return false -} - -// SetIpv4 gets a reference to the given NetworkIPv4 and assigns it to the Ipv4 field. -func (o *Network) SetIpv4(v NetworkIPv4) { - o.Ipv4 = &v -} - -// GetIpv6 returns the Ipv6 field value if set, zero value otherwise. -func (o *Network) GetIpv6() NetworkIPv6 { - if o == nil || IsNil(o.Ipv6) { - var ret NetworkIPv6 - return ret - } - return *o.Ipv6 -} - -// GetIpv6Ok returns a tuple with the Ipv6 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetIpv6Ok() (*NetworkIPv6, bool) { - if o == nil || IsNil(o.Ipv6) { - return nil, false - } - return o.Ipv6, true -} - -// HasIpv6 returns a boolean if a field has been set. -func (o *Network) HasIpv6() bool { - if o != nil && !IsNil(o.Ipv6) { - return true - } - - return false -} - -// SetIpv6 gets a reference to the given NetworkIPv6 and assigns it to the Ipv6 field. -func (o *Network) SetIpv6(v NetworkIPv6) { - o.Ipv6 = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *Network) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *Network) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *Network) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *Network) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *Network) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *Network) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *Network) SetName(v string) { - o.Name = v -} - -// GetRouted returns the Routed field value if set, zero value otherwise. -func (o *Network) GetRouted() bool { - if o == nil || IsNil(o.Routed) { - var ret bool - return ret - } - return *o.Routed -} - -// GetRoutedOk returns a tuple with the Routed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetRoutedOk() (*bool, bool) { - if o == nil || IsNil(o.Routed) { - return nil, false - } - return o.Routed, true -} - -// HasRouted returns a boolean if a field has been set. -func (o *Network) HasRouted() bool { - if o != nil && !IsNil(o.Routed) { - return true - } - - return false -} - -// SetRouted gets a reference to the given bool and assigns it to the Routed field. -func (o *Network) SetRouted(v bool) { - o.Routed = &v -} - -// GetRoutingTableId returns the RoutingTableId field value if set, zero value otherwise. -func (o *Network) GetRoutingTableId() string { - if o == nil || IsNil(o.RoutingTableId) { - var ret string - return ret - } - return *o.RoutingTableId -} - -// GetRoutingTableIdOk returns a tuple with the RoutingTableId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetRoutingTableIdOk() (*string, bool) { - if o == nil || IsNil(o.RoutingTableId) { - return nil, false - } - return o.RoutingTableId, true -} - -// HasRoutingTableId returns a boolean if a field has been set. -func (o *Network) HasRoutingTableId() bool { - if o != nil && !IsNil(o.RoutingTableId) { - return true - } - - return false -} - -// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field. -func (o *Network) SetRoutingTableId(v string) { - o.RoutingTableId = &v -} - -// GetStatus returns the Status field value -func (o *Network) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *Network) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *Network) SetStatus(v string) { - o.Status = v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *Network) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *Network) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *Network) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -// GetVpcId returns the VpcId field value if set, zero value otherwise. -func (o *Network) GetVpcId() string { - if o == nil || IsNil(o.VpcId) { - var ret string - return ret - } - return *o.VpcId -} - -// GetVpcIdOk returns a tuple with the VpcId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetVpcIdOk() (*string, bool) { - if o == nil || IsNil(o.VpcId) { - return nil, false - } - return o.VpcId, true -} - -// HasVpcId returns a boolean if a field has been set. -func (o *Network) HasVpcId() bool { - if o != nil && !IsNil(o.VpcId) { - return true - } - - return false -} - -// SetVpcId gets a reference to the given string and assigns it to the VpcId field. -func (o *Network) SetVpcId(v string) { - o.VpcId = &v -} - -func (o Network) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Network) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - if !IsNil(o.Dhcp) { - toSerialize["dhcp"] = o.Dhcp - } - toSerialize["id"] = o.Id - if !IsNil(o.Ipv4) { - toSerialize["ipv4"] = o.Ipv4 - } - if !IsNil(o.Ipv6) { - toSerialize["ipv6"] = o.Ipv6 - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - if !IsNil(o.Routed) { - toSerialize["routed"] = o.Routed - } - if !IsNil(o.RoutingTableId) { - toSerialize["routingTableId"] = o.RoutingTableId - } - toSerialize["status"] = o.Status - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - if !IsNil(o.VpcId) { - toSerialize["vpcId"] = o.VpcId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Network) 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{ - "id", - "name", - "status", - } - - 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) - } - } - - varNetwork := _Network{} - - err = json.Unmarshal(data, &varNetwork) - - if err != nil { - return err - } - - *o = Network(varNetwork) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "dhcp") - delete(additionalProperties, "id") - delete(additionalProperties, "ipv4") - delete(additionalProperties, "ipv6") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "routed") - delete(additionalProperties, "routingTableId") - delete(additionalProperties, "status") - delete(additionalProperties, "updatedAt") - delete(additionalProperties, "vpcId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableNetwork struct { - value *Network - isSet bool -} - -func (v NullableNetwork) Get() *Network { - return v.value -} - -func (v *NullableNetwork) Set(val *Network) { - v.value = val - v.isSet = true -} - -func (v NullableNetwork) IsSet() bool { - return v.isSet -} - -func (v *NullableNetwork) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetwork(val *Network) *NullableNetwork { - return &NullableNetwork{value: val, isSet: true} -} - -func (v NullableNetwork) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetwork) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_network_ipv4.go b/services/iaas/v2alpha1api/model_network_ipv4.go deleted file mode 100644 index a154ef12d7..0000000000 --- a/services/iaas/v2alpha1api/model_network_ipv4.go +++ /dev/null @@ -1,330 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the NetworkIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkIPv4{} - -// NetworkIPv4 Object that represents the IPv4 part of a network. -type NetworkIPv4 struct { - // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - Prefixes []string `json:"prefixes"` - // String that represents an IPv4 address. - PublicIp *string `json:"publicIp,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" 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 _NetworkIPv4 NetworkIPv4 - -// NewNetworkIPv4 instantiates a new NetworkIPv4 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 NewNetworkIPv4(prefixes []string) *NetworkIPv4 { - this := NetworkIPv4{} - this.Prefixes = prefixes - return &this -} - -// NewNetworkIPv4WithDefaults instantiates a new NetworkIPv4 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 NewNetworkIPv4WithDefaults() *NetworkIPv4 { - this := NetworkIPv4{} - return &this -} - -// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NetworkIPv4) GetGateway() string { - if o == nil || IsNil(o.Gateway.Get()) { - var ret string - return ret - } - return *o.Gateway.Get() -} - -// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkIPv4) GetGatewayOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Gateway.Get(), o.Gateway.IsSet() -} - -// HasGateway returns a boolean if a field has been set. -func (o *NetworkIPv4) HasGateway() bool { - if o != nil && o.Gateway.IsSet() { - return true - } - - return false -} - -// SetGateway gets a reference to the given NullableString and assigns it to the Gateway field. -func (o *NetworkIPv4) SetGateway(v string) { - o.Gateway.Set(&v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -func (o *NetworkIPv4) SetGatewayNil() { - o.Gateway.Set(nil) -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -func (o *NetworkIPv4) UnsetGateway() { - o.Gateway.Unset() -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *NetworkIPv4) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkIPv4) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *NetworkIPv4) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *NetworkIPv4) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefixes returns the Prefixes field value -func (o *NetworkIPv4) GetPrefixes() []string { - if o == nil { - var ret []string - return ret - } - - return o.Prefixes -} - -// GetPrefixesOk returns a tuple with the Prefixes field value -// and a boolean to check if the value has been set. -func (o *NetworkIPv4) GetPrefixesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Prefixes, true -} - -// SetPrefixes sets field value -func (o *NetworkIPv4) SetPrefixes(v []string) { - o.Prefixes = v -} - -// GetPublicIp returns the PublicIp field value if set, zero value otherwise. -func (o *NetworkIPv4) GetPublicIp() string { - if o == nil || IsNil(o.PublicIp) { - var ret string - return ret - } - return *o.PublicIp -} - -// GetPublicIpOk returns a tuple with the PublicIp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkIPv4) GetPublicIpOk() (*string, bool) { - if o == nil || IsNil(o.PublicIp) { - return nil, false - } - return o.PublicIp, true -} - -// HasPublicIp returns a boolean if a field has been set. -func (o *NetworkIPv4) HasPublicIp() bool { - if o != nil && !IsNil(o.PublicIp) { - return true - } - - return false -} - -// SetPublicIp gets a reference to the given string and assigns it to the PublicIp field. -func (o *NetworkIPv4) SetPublicIp(v string) { - o.PublicIp = &v -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId field value if set, zero value otherwise. -func (o *NetworkIPv4) GetVpcNetworkRangeId() string { - if o == nil || IsNil(o.VpcNetworkRangeId) { - var ret string - return ret - } - return *o.VpcNetworkRangeId -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkIPv4) GetVpcNetworkRangeIdOk() (*string, bool) { - if o == nil || IsNil(o.VpcNetworkRangeId) { - return nil, false - } - return o.VpcNetworkRangeId, true -} - -// HasVpcNetworkRangeId returns a boolean if a field has been set. -func (o *NetworkIPv4) HasVpcNetworkRangeId() bool { - if o != nil && !IsNil(o.VpcNetworkRangeId) { - return true - } - - return false -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -func (o *NetworkIPv4) SetVpcNetworkRangeId(v string) { - o.VpcNetworkRangeId = &v -} - -func (o NetworkIPv4) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NetworkIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Gateway.IsSet() { - toSerialize["gateway"] = o.Gateway.Get() - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefixes"] = o.Prefixes - if !IsNil(o.PublicIp) { - toSerialize["publicIp"] = o.PublicIp - } - if !IsNil(o.VpcNetworkRangeId) { - toSerialize["vpcNetworkRangeId"] = o.VpcNetworkRangeId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *NetworkIPv4) 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{ - "prefixes", - } - - 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) - } - } - - varNetworkIPv4 := _NetworkIPv4{} - - err = json.Unmarshal(data, &varNetworkIPv4) - - if err != nil { - return err - } - - *o = NetworkIPv4(varNetworkIPv4) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "gateway") - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefixes") - delete(additionalProperties, "publicIp") - delete(additionalProperties, "vpcNetworkRangeId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableNetworkIPv4 struct { - value *NetworkIPv4 - isSet bool -} - -func (v NullableNetworkIPv4) Get() *NetworkIPv4 { - return v.value -} - -func (v *NullableNetworkIPv4) Set(val *NetworkIPv4) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkIPv4) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkIPv4) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkIPv4(val *NetworkIPv4) *NullableNetworkIPv4 { - return &NullableNetworkIPv4{value: val, isSet: true} -} - -func (v NullableNetworkIPv4) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_network_ipv6.go b/services/iaas/v2alpha1api/model_network_ipv6.go deleted file mode 100644 index c916696b41..0000000000 --- a/services/iaas/v2alpha1api/model_network_ipv6.go +++ /dev/null @@ -1,292 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the NetworkIPv6 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkIPv6{} - -// NetworkIPv6 Object that represents the IPv6 part of a network. -type NetworkIPv6 struct { - // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers []string `json:"nameservers,omitempty"` - Prefixes []string `json:"prefixes"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" 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 _NetworkIPv6 NetworkIPv6 - -// NewNetworkIPv6 instantiates a new NetworkIPv6 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 NewNetworkIPv6(prefixes []string) *NetworkIPv6 { - this := NetworkIPv6{} - this.Prefixes = prefixes - return &this -} - -// NewNetworkIPv6WithDefaults instantiates a new NetworkIPv6 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 NewNetworkIPv6WithDefaults() *NetworkIPv6 { - this := NetworkIPv6{} - return &this -} - -// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NetworkIPv6) GetGateway() string { - if o == nil || IsNil(o.Gateway.Get()) { - var ret string - return ret - } - return *o.Gateway.Get() -} - -// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkIPv6) GetGatewayOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Gateway.Get(), o.Gateway.IsSet() -} - -// HasGateway returns a boolean if a field has been set. -func (o *NetworkIPv6) HasGateway() bool { - if o != nil && o.Gateway.IsSet() { - return true - } - - return false -} - -// SetGateway gets a reference to the given NullableString and assigns it to the Gateway field. -func (o *NetworkIPv6) SetGateway(v string) { - o.Gateway.Set(&v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -func (o *NetworkIPv6) SetGatewayNil() { - o.Gateway.Set(nil) -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -func (o *NetworkIPv6) UnsetGateway() { - o.Gateway.Unset() -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *NetworkIPv6) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkIPv6) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *NetworkIPv6) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *NetworkIPv6) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefixes returns the Prefixes field value -func (o *NetworkIPv6) GetPrefixes() []string { - if o == nil { - var ret []string - return ret - } - - return o.Prefixes -} - -// GetPrefixesOk returns a tuple with the Prefixes field value -// and a boolean to check if the value has been set. -func (o *NetworkIPv6) GetPrefixesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Prefixes, true -} - -// SetPrefixes sets field value -func (o *NetworkIPv6) SetPrefixes(v []string) { - o.Prefixes = v -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId field value if set, zero value otherwise. -func (o *NetworkIPv6) GetVpcNetworkRangeId() string { - if o == nil || IsNil(o.VpcNetworkRangeId) { - var ret string - return ret - } - return *o.VpcNetworkRangeId -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkIPv6) GetVpcNetworkRangeIdOk() (*string, bool) { - if o == nil || IsNil(o.VpcNetworkRangeId) { - return nil, false - } - return o.VpcNetworkRangeId, true -} - -// HasVpcNetworkRangeId returns a boolean if a field has been set. -func (o *NetworkIPv6) HasVpcNetworkRangeId() bool { - if o != nil && !IsNil(o.VpcNetworkRangeId) { - return true - } - - return false -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -func (o *NetworkIPv6) SetVpcNetworkRangeId(v string) { - o.VpcNetworkRangeId = &v -} - -func (o NetworkIPv6) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NetworkIPv6) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Gateway.IsSet() { - toSerialize["gateway"] = o.Gateway.Get() - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefixes"] = o.Prefixes - if !IsNil(o.VpcNetworkRangeId) { - toSerialize["vpcNetworkRangeId"] = o.VpcNetworkRangeId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *NetworkIPv6) 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{ - "prefixes", - } - - 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) - } - } - - varNetworkIPv6 := _NetworkIPv6{} - - err = json.Unmarshal(data, &varNetworkIPv6) - - if err != nil { - return err - } - - *o = NetworkIPv6(varNetworkIPv6) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "gateway") - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefixes") - delete(additionalProperties, "vpcNetworkRangeId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableNetworkIPv6 struct { - value *NetworkIPv6 - isSet bool -} - -func (v NullableNetworkIPv6) Get() *NetworkIPv6 { - return v.value -} - -func (v *NullableNetworkIPv6) Set(val *NetworkIPv6) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkIPv6) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkIPv6) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkIPv6(val *NetworkIPv6) *NullableNetworkIPv6 { - return &NullableNetworkIPv6{value: val, isSet: true} -} - -func (v NullableNetworkIPv6) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkIPv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_network_list_response.go b/services/iaas/v2alpha1api/model_network_list_response.go deleted file mode 100644 index cbeeb2906e..0000000000 --- a/services/iaas/v2alpha1api/model_network_list_response.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the NetworkListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkListResponse{} - -// NetworkListResponse Network list response. -type NetworkListResponse struct { - // A list of networks. - Items []Network `json:"items"` - AdditionalProperties map[string]interface{} -} - -type _NetworkListResponse NetworkListResponse - -// NewNetworkListResponse instantiates a new NetworkListResponse 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 NewNetworkListResponse(items []Network) *NetworkListResponse { - this := NetworkListResponse{} - this.Items = items - return &this -} - -// NewNetworkListResponseWithDefaults instantiates a new NetworkListResponse 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 NewNetworkListResponseWithDefaults() *NetworkListResponse { - this := NetworkListResponse{} - return &this -} - -// GetItems returns the Items field value -func (o *NetworkListResponse) GetItems() []Network { - if o == nil { - var ret []Network - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *NetworkListResponse) GetItemsOk() ([]Network, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *NetworkListResponse) SetItems(v []Network) { - o.Items = v -} - -func (o NetworkListResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NetworkListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *NetworkListResponse) 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{ - "items", - } - - 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) - } - } - - varNetworkListResponse := _NetworkListResponse{} - - err = json.Unmarshal(data, &varNetworkListResponse) - - if err != nil { - return err - } - - *o = NetworkListResponse(varNetworkListResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "items") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableNetworkListResponse struct { - value *NetworkListResponse - isSet bool -} - -func (v NullableNetworkListResponse) Get() *NetworkListResponse { - return v.value -} - -func (v *NullableNetworkListResponse) Set(val *NetworkListResponse) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkListResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkListResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkListResponse(val *NetworkListResponse) *NullableNetworkListResponse { - return &NullableNetworkListResponse{value: val, isSet: true} -} - -func (v NullableNetworkListResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_network_range_ipv4_request.go b/services/iaas/v2alpha1api/model_network_range_ipv4_request.go deleted file mode 100644 index 8bb847b526..0000000000 --- a/services/iaas/v2alpha1api/model_network_range_ipv4_request.go +++ /dev/null @@ -1,437 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the NetworkRangeIPv4Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkRangeIPv4Request{} - -// NetworkRangeIPv4Request Contains the IPv4 properties of a VPC network range request. Filterable Fields: `defaultPrefixLen`, `maxPrefixLen`, `minPrefixLen`, `nameservers`, `prefix`. -type NetworkRangeIPv4Request struct { - // The default prefix length for network ranges in the VPC. - DefaultPrefixLen *int64 `json:"defaultPrefixLen,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - IpVersion NetworkRangeIPv4RequestIpVersion `json:"ipVersion"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The maximal prefix length for network ranges in the VPC. - MaxPrefixLen *int64 `json:"maxPrefixLen,omitempty"` - // The minimal prefix length for network ranges in the VPC. - MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` - AdditionalProperties map[string]interface{} -} - -type _NetworkRangeIPv4Request NetworkRangeIPv4Request - -// NewNetworkRangeIPv4Request instantiates a new NetworkRangeIPv4Request 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 NewNetworkRangeIPv4Request(ipVersion NetworkRangeIPv4RequestIpVersion, prefix string) *NetworkRangeIPv4Request { - this := NetworkRangeIPv4Request{} - var defaultPrefixLen int64 = 25 - this.DefaultPrefixLen = &defaultPrefixLen - this.IpVersion = ipVersion - var maxPrefixLen int64 = 29 - this.MaxPrefixLen = &maxPrefixLen - var minPrefixLen int64 = 24 - this.MinPrefixLen = &minPrefixLen - this.Prefix = prefix - return &this -} - -// NewNetworkRangeIPv4RequestWithDefaults instantiates a new NetworkRangeIPv4Request 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 NewNetworkRangeIPv4RequestWithDefaults() *NetworkRangeIPv4Request { - this := NetworkRangeIPv4Request{} - var defaultPrefixLen int64 = 25 - this.DefaultPrefixLen = &defaultPrefixLen - var maxPrefixLen int64 = 29 - this.MaxPrefixLen = &maxPrefixLen - var minPrefixLen int64 = 24 - this.MinPrefixLen = &minPrefixLen - return &this -} - -// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. -func (o *NetworkRangeIPv4Request) GetDefaultPrefixLen() int64 { - if o == nil || IsNil(o.DefaultPrefixLen) { - var ret int64 - return ret - } - return *o.DefaultPrefixLen -} - -// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkRangeIPv4Request) GetDefaultPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.DefaultPrefixLen) { - return nil, false - } - return o.DefaultPrefixLen, true -} - -// HasDefaultPrefixLen returns a boolean if a field has been set. -func (o *NetworkRangeIPv4Request) HasDefaultPrefixLen() bool { - if o != nil && !IsNil(o.DefaultPrefixLen) { - return true - } - - return false -} - -// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. -func (o *NetworkRangeIPv4Request) SetDefaultPrefixLen(v int64) { - o.DefaultPrefixLen = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *NetworkRangeIPv4Request) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkRangeIPv4Request) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *NetworkRangeIPv4Request) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *NetworkRangeIPv4Request) SetDescription(v string) { - o.Description = &v -} - -// GetIpVersion returns the IpVersion field value -func (o *NetworkRangeIPv4Request) GetIpVersion() NetworkRangeIPv4RequestIpVersion { - if o == nil { - var ret NetworkRangeIPv4RequestIpVersion - return ret - } - - return o.IpVersion -} - -// GetIpVersionOk returns a tuple with the IpVersion field value -// and a boolean to check if the value has been set. -func (o *NetworkRangeIPv4Request) GetIpVersionOk() (*NetworkRangeIPv4RequestIpVersion, bool) { - if o == nil { - return nil, false - } - return &o.IpVersion, true -} - -// SetIpVersion sets field value -func (o *NetworkRangeIPv4Request) SetIpVersion(v NetworkRangeIPv4RequestIpVersion) { - o.IpVersion = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *NetworkRangeIPv4Request) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *NetworkRangeIPv4Request) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *NetworkRangeIPv4Request) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *NetworkRangeIPv4Request) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. -func (o *NetworkRangeIPv4Request) GetMaxPrefixLen() int64 { - if o == nil || IsNil(o.MaxPrefixLen) { - var ret int64 - return ret - } - return *o.MaxPrefixLen -} - -// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkRangeIPv4Request) GetMaxPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MaxPrefixLen) { - return nil, false - } - return o.MaxPrefixLen, true -} - -// HasMaxPrefixLen returns a boolean if a field has been set. -func (o *NetworkRangeIPv4Request) HasMaxPrefixLen() bool { - if o != nil && !IsNil(o.MaxPrefixLen) { - return true - } - - return false -} - -// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. -func (o *NetworkRangeIPv4Request) SetMaxPrefixLen(v int64) { - o.MaxPrefixLen = &v -} - -// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. -func (o *NetworkRangeIPv4Request) GetMinPrefixLen() int64 { - if o == nil || IsNil(o.MinPrefixLen) { - var ret int64 - return ret - } - return *o.MinPrefixLen -} - -// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkRangeIPv4Request) GetMinPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MinPrefixLen) { - return nil, false - } - return o.MinPrefixLen, true -} - -// HasMinPrefixLen returns a boolean if a field has been set. -func (o *NetworkRangeIPv4Request) HasMinPrefixLen() bool { - if o != nil && !IsNil(o.MinPrefixLen) { - return true - } - - return false -} - -// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. -func (o *NetworkRangeIPv4Request) SetMinPrefixLen(v int64) { - o.MinPrefixLen = &v -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *NetworkRangeIPv4Request) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NetworkRangeIPv4Request) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *NetworkRangeIPv4Request) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *NetworkRangeIPv4Request) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefix returns the Prefix field value -func (o *NetworkRangeIPv4Request) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *NetworkRangeIPv4Request) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *NetworkRangeIPv4Request) SetPrefix(v string) { - o.Prefix = v -} - -func (o NetworkRangeIPv4Request) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NetworkRangeIPv4Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DefaultPrefixLen) { - toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - toSerialize["ipVersion"] = o.IpVersion - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.MaxPrefixLen) { - toSerialize["maxPrefixLen"] = o.MaxPrefixLen - } - if !IsNil(o.MinPrefixLen) { - toSerialize["minPrefixLen"] = o.MinPrefixLen - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefix"] = o.Prefix - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *NetworkRangeIPv4Request) 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{ - "ipVersion", - "prefix", - } - - 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) - } - } - - varNetworkRangeIPv4Request := _NetworkRangeIPv4Request{} - - err = json.Unmarshal(data, &varNetworkRangeIPv4Request) - - if err != nil { - return err - } - - *o = NetworkRangeIPv4Request(varNetworkRangeIPv4Request) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "defaultPrefixLen") - delete(additionalProperties, "description") - delete(additionalProperties, "ipVersion") - delete(additionalProperties, "labels") - delete(additionalProperties, "maxPrefixLen") - delete(additionalProperties, "minPrefixLen") - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefix") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableNetworkRangeIPv4Request struct { - value *NetworkRangeIPv4Request - isSet bool -} - -func (v NullableNetworkRangeIPv4Request) Get() *NetworkRangeIPv4Request { - return v.value -} - -func (v *NullableNetworkRangeIPv4Request) Set(val *NetworkRangeIPv4Request) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkRangeIPv4Request) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkRangeIPv4Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkRangeIPv4Request(val *NetworkRangeIPv4Request) *NullableNetworkRangeIPv4Request { - return &NullableNetworkRangeIPv4Request{value: val, isSet: true} -} - -func (v NullableNetworkRangeIPv4Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkRangeIPv4Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_network_range_ipv4_request_ip_version.go b/services/iaas/v2alpha1api/model_network_range_ipv4_request_ip_version.go deleted file mode 100644 index 87b88789a5..0000000000 --- a/services/iaas/v2alpha1api/model_network_range_ipv4_request_ip_version.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// NetworkRangeIPv4RequestIpVersion the model 'NetworkRangeIPv4RequestIpVersion' -type NetworkRangeIPv4RequestIpVersion string - -// List of NetworkRangeIPv4Request_ipVersion -const ( - NETWORKRANGEIPV4REQUESTIPVERSION_IPV4 NetworkRangeIPv4RequestIpVersion = "ipv4" - NETWORKRANGEIPV4REQUESTIPVERSION_UNKNOWN_DEFAULT_OPEN_API NetworkRangeIPv4RequestIpVersion = "unknown_default_open_api" -) - -// All allowed values of NetworkRangeIPv4RequestIpVersion enum -var AllowedNetworkRangeIPv4RequestIpVersionEnumValues = []NetworkRangeIPv4RequestIpVersion{ - "ipv4", - "unknown_default_open_api", -} - -func (v *NetworkRangeIPv4RequestIpVersion) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := NetworkRangeIPv4RequestIpVersion(value) - for _, existing := range AllowedNetworkRangeIPv4RequestIpVersionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = NETWORKRANGEIPV4REQUESTIPVERSION_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewNetworkRangeIPv4RequestIpVersionFromValue returns a pointer to a valid NetworkRangeIPv4RequestIpVersion -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewNetworkRangeIPv4RequestIpVersionFromValue(v string) (*NetworkRangeIPv4RequestIpVersion, error) { - ev := NetworkRangeIPv4RequestIpVersion(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for NetworkRangeIPv4RequestIpVersion: valid values are %v", v, AllowedNetworkRangeIPv4RequestIpVersionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v NetworkRangeIPv4RequestIpVersion) IsValid() bool { - for _, existing := range AllowedNetworkRangeIPv4RequestIpVersionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to NetworkRangeIPv4Request_ipVersion value -func (v NetworkRangeIPv4RequestIpVersion) Ptr() *NetworkRangeIPv4RequestIpVersion { - return &v -} - -type NullableNetworkRangeIPv4RequestIpVersion struct { - value *NetworkRangeIPv4RequestIpVersion - isSet bool -} - -func (v NullableNetworkRangeIPv4RequestIpVersion) Get() *NetworkRangeIPv4RequestIpVersion { - return v.value -} - -func (v *NullableNetworkRangeIPv4RequestIpVersion) Set(val *NetworkRangeIPv4RequestIpVersion) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkRangeIPv4RequestIpVersion) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkRangeIPv4RequestIpVersion) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkRangeIPv4RequestIpVersion(val *NetworkRangeIPv4RequestIpVersion) *NullableNetworkRangeIPv4RequestIpVersion { - return &NullableNetworkRangeIPv4RequestIpVersion{value: val, isSet: true} -} - -func (v NullableNetworkRangeIPv4RequestIpVersion) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkRangeIPv4RequestIpVersion) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_nexthop_blackhole.go b/services/iaas/v2alpha1api/model_nexthop_blackhole.go deleted file mode 100644 index 98543e9d15..0000000000 --- a/services/iaas/v2alpha1api/model_nexthop_blackhole.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the NexthopBlackhole type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NexthopBlackhole{} - -// NexthopBlackhole Object that represents a blackhole route. -type NexthopBlackhole struct { - Type string `json:"type"` - AdditionalProperties map[string]interface{} -} - -type _NexthopBlackhole NexthopBlackhole - -// NewNexthopBlackhole instantiates a new NexthopBlackhole 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 NewNexthopBlackhole(types string) *NexthopBlackhole { - this := NexthopBlackhole{} - this.Type = types - return &this -} - -// NewNexthopBlackholeWithDefaults instantiates a new NexthopBlackhole 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 NewNexthopBlackholeWithDefaults() *NexthopBlackhole { - this := NexthopBlackhole{} - return &this -} - -// GetType returns the Type field value -func (o *NexthopBlackhole) GetType() string { - if o == nil { - var ret string - 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 *NexthopBlackhole) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *NexthopBlackhole) SetType(v string) { - o.Type = v -} - -func (o NexthopBlackhole) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NexthopBlackhole) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *NexthopBlackhole) 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", - } - - 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) - } - } - - varNexthopBlackhole := _NexthopBlackhole{} - - err = json.Unmarshal(data, &varNexthopBlackhole) - - if err != nil { - return err - } - - *o = NexthopBlackhole(varNexthopBlackhole) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "type") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableNexthopBlackhole struct { - value *NexthopBlackhole - isSet bool -} - -func (v NullableNexthopBlackhole) Get() *NexthopBlackhole { - return v.value -} - -func (v *NullableNexthopBlackhole) Set(val *NexthopBlackhole) { - v.value = val - v.isSet = true -} - -func (v NullableNexthopBlackhole) IsSet() bool { - return v.isSet -} - -func (v *NullableNexthopBlackhole) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNexthopBlackhole(val *NexthopBlackhole) *NullableNexthopBlackhole { - return &NullableNexthopBlackhole{value: val, isSet: true} -} - -func (v NullableNexthopBlackhole) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNexthopBlackhole) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_nexthop_internet.go b/services/iaas/v2alpha1api/model_nexthop_internet.go deleted file mode 100644 index a3c6760fdd..0000000000 --- a/services/iaas/v2alpha1api/model_nexthop_internet.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the NexthopInternet type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NexthopInternet{} - -// NexthopInternet Object that represents a route to the internet. -type NexthopInternet struct { - Type string `json:"type"` - AdditionalProperties map[string]interface{} -} - -type _NexthopInternet NexthopInternet - -// NewNexthopInternet instantiates a new NexthopInternet 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 NewNexthopInternet(types string) *NexthopInternet { - this := NexthopInternet{} - this.Type = types - return &this -} - -// NewNexthopInternetWithDefaults instantiates a new NexthopInternet 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 NewNexthopInternetWithDefaults() *NexthopInternet { - this := NexthopInternet{} - return &this -} - -// GetType returns the Type field value -func (o *NexthopInternet) GetType() string { - if o == nil { - var ret string - 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 *NexthopInternet) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *NexthopInternet) SetType(v string) { - o.Type = v -} - -func (o NexthopInternet) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NexthopInternet) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *NexthopInternet) 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", - } - - 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) - } - } - - varNexthopInternet := _NexthopInternet{} - - err = json.Unmarshal(data, &varNexthopInternet) - - if err != nil { - return err - } - - *o = NexthopInternet(varNexthopInternet) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "type") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableNexthopInternet struct { - value *NexthopInternet - isSet bool -} - -func (v NullableNexthopInternet) Get() *NexthopInternet { - return v.value -} - -func (v *NullableNexthopInternet) Set(val *NexthopInternet) { - v.value = val - v.isSet = true -} - -func (v NullableNexthopInternet) IsSet() bool { - return v.isSet -} - -func (v *NullableNexthopInternet) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNexthopInternet(val *NexthopInternet) *NullableNexthopInternet { - return &NullableNexthopInternet{value: val, isSet: true} -} - -func (v NullableNexthopInternet) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNexthopInternet) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_nexthop_ipv4.go b/services/iaas/v2alpha1api/model_nexthop_ipv4.go deleted file mode 100644 index 2c57966c20..0000000000 --- a/services/iaas/v2alpha1api/model_nexthop_ipv4.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the NexthopIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NexthopIPv4{} - -// NexthopIPv4 Object that represents an IPv4 address. -type NexthopIPv4 struct { - Type string `json:"type"` - // An IPv4 address. - Value string `json:"value" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` - AdditionalProperties map[string]interface{} -} - -type _NexthopIPv4 NexthopIPv4 - -// NewNexthopIPv4 instantiates a new NexthopIPv4 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 NewNexthopIPv4(types string, value string) *NexthopIPv4 { - this := NexthopIPv4{} - this.Type = types - this.Value = value - return &this -} - -// NewNexthopIPv4WithDefaults instantiates a new NexthopIPv4 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 NewNexthopIPv4WithDefaults() *NexthopIPv4 { - this := NexthopIPv4{} - return &this -} - -// GetType returns the Type field value -func (o *NexthopIPv4) GetType() string { - if o == nil { - var ret string - 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 *NexthopIPv4) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *NexthopIPv4) SetType(v string) { - o.Type = v -} - -// GetValue returns the Value field value -func (o *NexthopIPv4) 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 *NexthopIPv4) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *NexthopIPv4) SetValue(v string) { - o.Value = v -} - -func (o NexthopIPv4) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NexthopIPv4) 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 *NexthopIPv4) 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) - } - } - - varNexthopIPv4 := _NexthopIPv4{} - - err = json.Unmarshal(data, &varNexthopIPv4) - - if err != nil { - return err - } - - *o = NexthopIPv4(varNexthopIPv4) - - 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 NullableNexthopIPv4 struct { - value *NexthopIPv4 - isSet bool -} - -func (v NullableNexthopIPv4) Get() *NexthopIPv4 { - return v.value -} - -func (v *NullableNexthopIPv4) Set(val *NexthopIPv4) { - v.value = val - v.isSet = true -} - -func (v NullableNexthopIPv4) IsSet() bool { - return v.isSet -} - -func (v *NullableNexthopIPv4) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNexthopIPv4(val *NexthopIPv4) *NullableNexthopIPv4 { - return &NullableNexthopIPv4{value: val, isSet: true} -} - -func (v NullableNexthopIPv4) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNexthopIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_nexthop_ipv6.go b/services/iaas/v2alpha1api/model_nexthop_ipv6.go deleted file mode 100644 index 3c73d303d3..0000000000 --- a/services/iaas/v2alpha1api/model_nexthop_ipv6.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the NexthopIPv6 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NexthopIPv6{} - -// NexthopIPv6 Object that represents an IPv6 address. -type NexthopIPv6 struct { - Type string `json:"type"` - // An IPv6 address. - Value string `json:"value" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` - AdditionalProperties map[string]interface{} -} - -type _NexthopIPv6 NexthopIPv6 - -// NewNexthopIPv6 instantiates a new NexthopIPv6 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 NewNexthopIPv6(types string, value string) *NexthopIPv6 { - this := NexthopIPv6{} - this.Type = types - this.Value = value - return &this -} - -// NewNexthopIPv6WithDefaults instantiates a new NexthopIPv6 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 NewNexthopIPv6WithDefaults() *NexthopIPv6 { - this := NexthopIPv6{} - return &this -} - -// GetType returns the Type field value -func (o *NexthopIPv6) GetType() string { - if o == nil { - var ret string - 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 *NexthopIPv6) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *NexthopIPv6) SetType(v string) { - o.Type = v -} - -// GetValue returns the Value field value -func (o *NexthopIPv6) 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 *NexthopIPv6) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *NexthopIPv6) SetValue(v string) { - o.Value = v -} - -func (o NexthopIPv6) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NexthopIPv6) 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 *NexthopIPv6) 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) - } - } - - varNexthopIPv6 := _NexthopIPv6{} - - err = json.Unmarshal(data, &varNexthopIPv6) - - if err != nil { - return err - } - - *o = NexthopIPv6(varNexthopIPv6) - - 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 NullableNexthopIPv6 struct { - value *NexthopIPv6 - isSet bool -} - -func (v NullableNexthopIPv6) Get() *NexthopIPv6 { - return v.value -} - -func (v *NullableNexthopIPv6) Set(val *NexthopIPv6) { - v.value = val - v.isSet = true -} - -func (v NullableNexthopIPv6) IsSet() bool { - return v.isSet -} - -func (v *NullableNexthopIPv6) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNexthopIPv6(val *NexthopIPv6) *NullableNexthopIPv6 { - return &NullableNexthopIPv6{value: val, isSet: true} -} - -func (v NullableNexthopIPv6) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNexthopIPv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_partial_update_network_payload.go b/services/iaas/v2alpha1api/model_partial_update_network_payload.go deleted file mode 100644 index d62ff4960f..0000000000 --- a/services/iaas/v2alpha1api/model_partial_update_network_payload.go +++ /dev/null @@ -1,381 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the PartialUpdateNetworkPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PartialUpdateNetworkPayload{} - -// PartialUpdateNetworkPayload Object that represents the request body for a network update. -type PartialUpdateNetworkPayload struct { - // Enable or disable DHCP for a network. - Dhcp *bool `json:"dhcp,omitempty"` - Ipv4 *UpdateNetworkIPv4Body `json:"ipv4,omitempty"` - Ipv6 *UpdateNetworkIPv6Body `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` - // Shows if the network is routed and therefore accessible from other networks. - Routed *bool `json:"routed,omitempty"` - // Universally Unique Identifier (UUID). - RoutingTableId *string `json:"routingTableId,omitempty" 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 _PartialUpdateNetworkPayload PartialUpdateNetworkPayload - -// NewPartialUpdateNetworkPayload instantiates a new PartialUpdateNetworkPayload 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 NewPartialUpdateNetworkPayload() *PartialUpdateNetworkPayload { - this := PartialUpdateNetworkPayload{} - return &this -} - -// NewPartialUpdateNetworkPayloadWithDefaults instantiates a new PartialUpdateNetworkPayload 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 NewPartialUpdateNetworkPayloadWithDefaults() *PartialUpdateNetworkPayload { - this := PartialUpdateNetworkPayload{} - return &this -} - -// GetDhcp returns the Dhcp field value if set, zero value otherwise. -func (o *PartialUpdateNetworkPayload) GetDhcp() bool { - if o == nil || IsNil(o.Dhcp) { - var ret bool - return ret - } - return *o.Dhcp -} - -// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateNetworkPayload) GetDhcpOk() (*bool, bool) { - if o == nil || IsNil(o.Dhcp) { - return nil, false - } - return o.Dhcp, true -} - -// HasDhcp returns a boolean if a field has been set. -func (o *PartialUpdateNetworkPayload) HasDhcp() bool { - if o != nil && !IsNil(o.Dhcp) { - return true - } - - return false -} - -// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. -func (o *PartialUpdateNetworkPayload) SetDhcp(v bool) { - o.Dhcp = &v -} - -// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. -func (o *PartialUpdateNetworkPayload) GetIpv4() UpdateNetworkIPv4Body { - if o == nil || IsNil(o.Ipv4) { - var ret UpdateNetworkIPv4Body - return ret - } - return *o.Ipv4 -} - -// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateNetworkPayload) GetIpv4Ok() (*UpdateNetworkIPv4Body, bool) { - if o == nil || IsNil(o.Ipv4) { - return nil, false - } - return o.Ipv4, true -} - -// HasIpv4 returns a boolean if a field has been set. -func (o *PartialUpdateNetworkPayload) HasIpv4() bool { - if o != nil && !IsNil(o.Ipv4) { - return true - } - - return false -} - -// SetIpv4 gets a reference to the given UpdateNetworkIPv4Body and assigns it to the Ipv4 field. -func (o *PartialUpdateNetworkPayload) SetIpv4(v UpdateNetworkIPv4Body) { - o.Ipv4 = &v -} - -// GetIpv6 returns the Ipv6 field value if set, zero value otherwise. -func (o *PartialUpdateNetworkPayload) GetIpv6() UpdateNetworkIPv6Body { - if o == nil || IsNil(o.Ipv6) { - var ret UpdateNetworkIPv6Body - return ret - } - return *o.Ipv6 -} - -// GetIpv6Ok returns a tuple with the Ipv6 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateNetworkPayload) GetIpv6Ok() (*UpdateNetworkIPv6Body, bool) { - if o == nil || IsNil(o.Ipv6) { - return nil, false - } - return o.Ipv6, true -} - -// HasIpv6 returns a boolean if a field has been set. -func (o *PartialUpdateNetworkPayload) HasIpv6() bool { - if o != nil && !IsNil(o.Ipv6) { - return true - } - - return false -} - -// SetIpv6 gets a reference to the given UpdateNetworkIPv6Body and assigns it to the Ipv6 field. -func (o *PartialUpdateNetworkPayload) SetIpv6(v UpdateNetworkIPv6Body) { - o.Ipv6 = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *PartialUpdateNetworkPayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *PartialUpdateNetworkPayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *PartialUpdateNetworkPayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *PartialUpdateNetworkPayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PartialUpdateNetworkPayload) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateNetworkPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *PartialUpdateNetworkPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *PartialUpdateNetworkPayload) SetName(v string) { - o.Name = &v -} - -// GetRouted returns the Routed field value if set, zero value otherwise. -func (o *PartialUpdateNetworkPayload) GetRouted() bool { - if o == nil || IsNil(o.Routed) { - var ret bool - return ret - } - return *o.Routed -} - -// GetRoutedOk returns a tuple with the Routed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateNetworkPayload) GetRoutedOk() (*bool, bool) { - if o == nil || IsNil(o.Routed) { - return nil, false - } - return o.Routed, true -} - -// HasRouted returns a boolean if a field has been set. -func (o *PartialUpdateNetworkPayload) HasRouted() bool { - if o != nil && !IsNil(o.Routed) { - return true - } - - return false -} - -// SetRouted gets a reference to the given bool and assigns it to the Routed field. -func (o *PartialUpdateNetworkPayload) SetRouted(v bool) { - o.Routed = &v -} - -// GetRoutingTableId returns the RoutingTableId field value if set, zero value otherwise. -func (o *PartialUpdateNetworkPayload) GetRoutingTableId() string { - if o == nil || IsNil(o.RoutingTableId) { - var ret string - return ret - } - return *o.RoutingTableId -} - -// GetRoutingTableIdOk returns a tuple with the RoutingTableId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateNetworkPayload) GetRoutingTableIdOk() (*string, bool) { - if o == nil || IsNil(o.RoutingTableId) { - return nil, false - } - return o.RoutingTableId, true -} - -// HasRoutingTableId returns a boolean if a field has been set. -func (o *PartialUpdateNetworkPayload) HasRoutingTableId() bool { - if o != nil && !IsNil(o.RoutingTableId) { - return true - } - - return false -} - -// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field. -func (o *PartialUpdateNetworkPayload) SetRoutingTableId(v string) { - o.RoutingTableId = &v -} - -func (o PartialUpdateNetworkPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PartialUpdateNetworkPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Dhcp) { - toSerialize["dhcp"] = o.Dhcp - } - if !IsNil(o.Ipv4) { - toSerialize["ipv4"] = o.Ipv4 - } - if !IsNil(o.Ipv6) { - toSerialize["ipv6"] = o.Ipv6 - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Routed) { - toSerialize["routed"] = o.Routed - } - if !IsNil(o.RoutingTableId) { - toSerialize["routingTableId"] = o.RoutingTableId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *PartialUpdateNetworkPayload) UnmarshalJSON(data []byte) (err error) { - varPartialUpdateNetworkPayload := _PartialUpdateNetworkPayload{} - - err = json.Unmarshal(data, &varPartialUpdateNetworkPayload) - - if err != nil { - return err - } - - *o = PartialUpdateNetworkPayload(varPartialUpdateNetworkPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "dhcp") - delete(additionalProperties, "ipv4") - delete(additionalProperties, "ipv6") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "routed") - delete(additionalProperties, "routingTableId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullablePartialUpdateNetworkPayload struct { - value *PartialUpdateNetworkPayload - isSet bool -} - -func (v NullablePartialUpdateNetworkPayload) Get() *PartialUpdateNetworkPayload { - return v.value -} - -func (v *NullablePartialUpdateNetworkPayload) Set(val *PartialUpdateNetworkPayload) { - v.value = val - v.isSet = true -} - -func (v NullablePartialUpdateNetworkPayload) IsSet() bool { - return v.isSet -} - -func (v *NullablePartialUpdateNetworkPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePartialUpdateNetworkPayload(val *PartialUpdateNetworkPayload) *NullablePartialUpdateNetworkPayload { - return &NullablePartialUpdateNetworkPayload{value: val, isSet: true} -} - -func (v NullablePartialUpdateNetworkPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePartialUpdateNetworkPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_partial_update_vpc_payload.go b/services/iaas/v2alpha1api/model_partial_update_vpc_payload.go deleted file mode 100644 index 3b45029b45..0000000000 --- a/services/iaas/v2alpha1api/model_partial_update_vpc_payload.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the PartialUpdateVPCPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PartialUpdateVPCPayload{} - -// PartialUpdateVPCPayload Object that represents a update VPC request. -type PartialUpdateVPCPayload struct { - // Description Object. Allows string up to 255 Characters. - Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` - AdditionalProperties map[string]interface{} -} - -type _PartialUpdateVPCPayload PartialUpdateVPCPayload - -// NewPartialUpdateVPCPayload instantiates a new PartialUpdateVPCPayload 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 NewPartialUpdateVPCPayload() *PartialUpdateVPCPayload { - this := PartialUpdateVPCPayload{} - return &this -} - -// NewPartialUpdateVPCPayloadWithDefaults instantiates a new PartialUpdateVPCPayload 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 NewPartialUpdateVPCPayloadWithDefaults() *PartialUpdateVPCPayload { - this := PartialUpdateVPCPayload{} - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *PartialUpdateVPCPayload) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateVPCPayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *PartialUpdateVPCPayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PartialUpdateVPCPayload) SetDescription(v string) { - o.Description = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *PartialUpdateVPCPayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *PartialUpdateVPCPayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *PartialUpdateVPCPayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *PartialUpdateVPCPayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PartialUpdateVPCPayload) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateVPCPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *PartialUpdateVPCPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *PartialUpdateVPCPayload) SetName(v string) { - o.Name = &v -} - -func (o PartialUpdateVPCPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PartialUpdateVPCPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *PartialUpdateVPCPayload) UnmarshalJSON(data []byte) (err error) { - varPartialUpdateVPCPayload := _PartialUpdateVPCPayload{} - - err = json.Unmarshal(data, &varPartialUpdateVPCPayload) - - if err != nil { - return err - } - - *o = PartialUpdateVPCPayload(varPartialUpdateVPCPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "description") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullablePartialUpdateVPCPayload struct { - value *PartialUpdateVPCPayload - isSet bool -} - -func (v NullablePartialUpdateVPCPayload) Get() *PartialUpdateVPCPayload { - return v.value -} - -func (v *NullablePartialUpdateVPCPayload) Set(val *PartialUpdateVPCPayload) { - v.value = val - v.isSet = true -} - -func (v NullablePartialUpdateVPCPayload) IsSet() bool { - return v.isSet -} - -func (v *NullablePartialUpdateVPCPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePartialUpdateVPCPayload(val *PartialUpdateVPCPayload) *NullablePartialUpdateVPCPayload { - return &NullablePartialUpdateVPCPayload{value: val, isSet: true} -} - -func (v NullablePartialUpdateVPCPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePartialUpdateVPCPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_regional_vpc.go b/services/iaas/v2alpha1api/model_regional_vpc.go deleted file mode 100644 index 32774e397f..0000000000 --- a/services/iaas/v2alpha1api/model_regional_vpc.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the RegionalVPC type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegionalVPC{} - -// RegionalVPC The basic properties of a regional VPC. -type RegionalVPC struct { - Ipv4 *RegionalVPCIPv4 `json:"ipv4,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status *string `json:"status,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _RegionalVPC RegionalVPC - -// NewRegionalVPC instantiates a new RegionalVPC 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 NewRegionalVPC() *RegionalVPC { - this := RegionalVPC{} - return &this -} - -// NewRegionalVPCWithDefaults instantiates a new RegionalVPC 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 NewRegionalVPCWithDefaults() *RegionalVPC { - this := RegionalVPC{} - return &this -} - -// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. -func (o *RegionalVPC) GetIpv4() RegionalVPCIPv4 { - if o == nil || IsNil(o.Ipv4) { - var ret RegionalVPCIPv4 - return ret - } - return *o.Ipv4 -} - -// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RegionalVPC) GetIpv4Ok() (*RegionalVPCIPv4, bool) { - if o == nil || IsNil(o.Ipv4) { - return nil, false - } - return o.Ipv4, true -} - -// HasIpv4 returns a boolean if a field has been set. -func (o *RegionalVPC) HasIpv4() bool { - if o != nil && !IsNil(o.Ipv4) { - return true - } - - return false -} - -// SetIpv4 gets a reference to the given RegionalVPCIPv4 and assigns it to the Ipv4 field. -func (o *RegionalVPC) SetIpv4(v RegionalVPCIPv4) { - o.Ipv4 = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *RegionalVPC) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RegionalVPC) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *RegionalVPC) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *RegionalVPC) SetStatus(v string) { - o.Status = &v -} - -func (o RegionalVPC) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RegionalVPC) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Ipv4) { - toSerialize["ipv4"] = o.Ipv4 - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *RegionalVPC) UnmarshalJSON(data []byte) (err error) { - varRegionalVPC := _RegionalVPC{} - - err = json.Unmarshal(data, &varRegionalVPC) - - if err != nil { - return err - } - - *o = RegionalVPC(varRegionalVPC) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "ipv4") - delete(additionalProperties, "status") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRegionalVPC struct { - value *RegionalVPC - isSet bool -} - -func (v NullableRegionalVPC) Get() *RegionalVPC { - return v.value -} - -func (v *NullableRegionalVPC) Set(val *RegionalVPC) { - v.value = val - v.isSet = true -} - -func (v NullableRegionalVPC) IsSet() bool { - return v.isSet -} - -func (v *NullableRegionalVPC) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegionalVPC(val *RegionalVPC) *NullableRegionalVPC { - return &NullableRegionalVPC{value: val, isSet: true} -} - -func (v NullableRegionalVPC) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegionalVPC) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_regional_vpc_list.go b/services/iaas/v2alpha1api/model_regional_vpc_list.go deleted file mode 100644 index 729e72a3bc..0000000000 --- a/services/iaas/v2alpha1api/model_regional_vpc_list.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the RegionalVPCList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegionalVPCList{} - -// RegionalVPCList Regional VPC list response. -type RegionalVPCList struct { - Regions map[string]RegionalVPC `json:"regions"` - AdditionalProperties map[string]interface{} -} - -type _RegionalVPCList RegionalVPCList - -// NewRegionalVPCList instantiates a new RegionalVPCList 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 NewRegionalVPCList(regions map[string]RegionalVPC) *RegionalVPCList { - this := RegionalVPCList{} - this.Regions = regions - return &this -} - -// NewRegionalVPCListWithDefaults instantiates a new RegionalVPCList 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 NewRegionalVPCListWithDefaults() *RegionalVPCList { - this := RegionalVPCList{} - return &this -} - -// GetRegions returns the Regions field value -func (o *RegionalVPCList) GetRegions() map[string]RegionalVPC { - if o == nil { - var ret map[string]RegionalVPC - return ret - } - - return o.Regions -} - -// GetRegionsOk returns a tuple with the Regions field value -// and a boolean to check if the value has been set. -func (o *RegionalVPCList) GetRegionsOk() (*map[string]RegionalVPC, bool) { - if o == nil { - return nil, false - } - return &o.Regions, true -} - -// SetRegions sets field value -func (o *RegionalVPCList) SetRegions(v map[string]RegionalVPC) { - o.Regions = v -} - -func (o RegionalVPCList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RegionalVPCList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["regions"] = o.Regions - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *RegionalVPCList) 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{ - "regions", - } - - 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) - } - } - - varRegionalVPCList := _RegionalVPCList{} - - err = json.Unmarshal(data, &varRegionalVPCList) - - if err != nil { - return err - } - - *o = RegionalVPCList(varRegionalVPCList) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "regions") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRegionalVPCList struct { - value *RegionalVPCList - isSet bool -} - -func (v NullableRegionalVPCList) Get() *RegionalVPCList { - return v.value -} - -func (v *NullableRegionalVPCList) Set(val *RegionalVPCList) { - v.value = val - v.isSet = true -} - -func (v NullableRegionalVPCList) IsSet() bool { - return v.isSet -} - -func (v *NullableRegionalVPCList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegionalVPCList(val *RegionalVPCList) *NullableRegionalVPCList { - return &NullableRegionalVPCList{value: val, isSet: true} -} - -func (v NullableRegionalVPCList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegionalVPCList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_regional_vpcipv4.go b/services/iaas/v2alpha1api/model_regional_vpcipv4.go deleted file mode 100644 index 80982be6d3..0000000000 --- a/services/iaas/v2alpha1api/model_regional_vpcipv4.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the RegionalVPCIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegionalVPCIPv4{} - -// RegionalVPCIPv4 The regional IPv4 config of a VPC. -type RegionalVPCIPv4 struct { - DefaultNameservers []string `json:"defaultNameservers"` - AdditionalProperties map[string]interface{} -} - -type _RegionalVPCIPv4 RegionalVPCIPv4 - -// NewRegionalVPCIPv4 instantiates a new RegionalVPCIPv4 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 NewRegionalVPCIPv4(defaultNameservers []string) *RegionalVPCIPv4 { - this := RegionalVPCIPv4{} - this.DefaultNameservers = defaultNameservers - return &this -} - -// NewRegionalVPCIPv4WithDefaults instantiates a new RegionalVPCIPv4 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 NewRegionalVPCIPv4WithDefaults() *RegionalVPCIPv4 { - this := RegionalVPCIPv4{} - return &this -} - -// GetDefaultNameservers returns the DefaultNameservers field value -func (o *RegionalVPCIPv4) GetDefaultNameservers() []string { - if o == nil { - var ret []string - return ret - } - - return o.DefaultNameservers -} - -// GetDefaultNameserversOk returns a tuple with the DefaultNameservers field value -// and a boolean to check if the value has been set. -func (o *RegionalVPCIPv4) GetDefaultNameserversOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.DefaultNameservers, true -} - -// SetDefaultNameservers sets field value -func (o *RegionalVPCIPv4) SetDefaultNameservers(v []string) { - o.DefaultNameservers = v -} - -func (o RegionalVPCIPv4) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RegionalVPCIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["defaultNameservers"] = o.DefaultNameservers - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *RegionalVPCIPv4) 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{ - "defaultNameservers", - } - - 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) - } - } - - varRegionalVPCIPv4 := _RegionalVPCIPv4{} - - err = json.Unmarshal(data, &varRegionalVPCIPv4) - - if err != nil { - return err - } - - *o = RegionalVPCIPv4(varRegionalVPCIPv4) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "defaultNameservers") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRegionalVPCIPv4 struct { - value *RegionalVPCIPv4 - isSet bool -} - -func (v NullableRegionalVPCIPv4) Get() *RegionalVPCIPv4 { - return v.value -} - -func (v *NullableRegionalVPCIPv4) Set(val *RegionalVPCIPv4) { - v.value = val - v.isSet = true -} - -func (v NullableRegionalVPCIPv4) IsSet() bool { - return v.isSet -} - -func (v *NullableRegionalVPCIPv4) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegionalVPCIPv4(val *RegionalVPCIPv4) *NullableRegionalVPCIPv4 { - return &NullableRegionalVPCIPv4{value: val, isSet: true} -} - -func (v NullableRegionalVPCIPv4) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegionalVPCIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_route.go b/services/iaas/v2alpha1api/model_route.go deleted file mode 100644 index 376949f2d1..0000000000 --- a/services/iaas/v2alpha1api/model_route.go +++ /dev/null @@ -1,349 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the Route type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Route{} - -// Route Object represents a network route. -type Route struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - Destination RouteDestination `json:"destination"` - // 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - Nexthop RouteNexthop `json:"nexthop"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _Route Route - -// NewRoute instantiates a new Route 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 NewRoute(destination RouteDestination, nexthop RouteNexthop) *Route { - this := Route{} - this.Destination = destination - this.Nexthop = nexthop - return &this -} - -// NewRouteWithDefaults instantiates a new Route 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 NewRouteWithDefaults() *Route { - this := Route{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Route) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *Route) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *Route) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDestination returns the Destination field value -func (o *Route) GetDestination() RouteDestination { - if o == nil { - var ret RouteDestination - return ret - } - - return o.Destination -} - -// GetDestinationOk returns a tuple with the Destination field value -// and a boolean to check if the value has been set. -func (o *Route) GetDestinationOk() (*RouteDestination, bool) { - if o == nil { - return nil, false - } - return &o.Destination, true -} - -// SetDestination sets field value -func (o *Route) SetDestination(v RouteDestination) { - o.Destination = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Route) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Route) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Route) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *Route) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *Route) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *Route) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *Route) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetNexthop returns the Nexthop field value -func (o *Route) GetNexthop() RouteNexthop { - if o == nil { - var ret RouteNexthop - return ret - } - - return o.Nexthop -} - -// GetNexthopOk returns a tuple with the Nexthop field value -// and a boolean to check if the value has been set. -func (o *Route) GetNexthopOk() (*RouteNexthop, bool) { - if o == nil { - return nil, false - } - return &o.Nexthop, true -} - -// SetNexthop sets field value -func (o *Route) SetNexthop(v RouteNexthop) { - o.Nexthop = v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *Route) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *Route) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *Route) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -func (o Route) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Route) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - toSerialize["destination"] = o.Destination - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["nexthop"] = o.Nexthop - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Route) 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{ - "destination", - "nexthop", - } - - 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) - } - } - - varRoute := _Route{} - - err = json.Unmarshal(data, &varRoute) - - if err != nil { - return err - } - - *o = Route(varRoute) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "destination") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "nexthop") - delete(additionalProperties, "updatedAt") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRoute struct { - value *Route - isSet bool -} - -func (v NullableRoute) Get() *Route { - return v.value -} - -func (v *NullableRoute) Set(val *Route) { - v.value = val - v.isSet = true -} - -func (v NullableRoute) IsSet() bool { - return v.isSet -} - -func (v *NullableRoute) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRoute(val *Route) *NullableRoute { - return &NullableRoute{value: val, isSet: true} -} - -func (v NullableRoute) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRoute) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_route_destination.go b/services/iaas/v2alpha1api/model_route_destination.go deleted file mode 100644 index abafa1f189..0000000000 --- a/services/iaas/v2alpha1api/model_route_destination.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// RouteDestination - struct for RouteDestination -type RouteDestination struct { - DestinationCIDRv4 *DestinationCIDRv4 - DestinationCIDRv6 *DestinationCIDRv6 -} - -// DestinationCIDRv4AsRouteDestination is a convenience function that returns DestinationCIDRv4 wrapped in RouteDestination -func DestinationCIDRv4AsRouteDestination(v *DestinationCIDRv4) RouteDestination { - return RouteDestination{ - DestinationCIDRv4: v, - } -} - -// DestinationCIDRv6AsRouteDestination is a convenience function that returns DestinationCIDRv6 wrapped in RouteDestination -func DestinationCIDRv6AsRouteDestination(v *DestinationCIDRv6) RouteDestination { - return RouteDestination{ - DestinationCIDRv6: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RouteDestination) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'cidrv4' - if jsonDict["type"] == "cidrv4" { - // try to unmarshal JSON data into DestinationCIDRv4 - err = json.Unmarshal(data, &dst.DestinationCIDRv4) - if err == nil { - return nil // data stored in dst.DestinationCIDRv4, return on the first match - } else { - dst.DestinationCIDRv4 = nil - return fmt.Errorf("failed to unmarshal RouteDestination as DestinationCIDRv4: %s", err.Error()) - } - } - - // check if the discriminator value is 'cidrv6' - if jsonDict["type"] == "cidrv6" { - // try to unmarshal JSON data into DestinationCIDRv6 - err = json.Unmarshal(data, &dst.DestinationCIDRv6) - if err == nil { - return nil // data stored in dst.DestinationCIDRv6, return on the first match - } else { - dst.DestinationCIDRv6 = nil - return fmt.Errorf("failed to unmarshal RouteDestination as DestinationCIDRv6: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RouteDestination) MarshalJSON() ([]byte, error) { - if src.DestinationCIDRv4 != nil { - return json.Marshal(&src.DestinationCIDRv4) - } - - if src.DestinationCIDRv6 != nil { - return json.Marshal(&src.DestinationCIDRv6) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RouteDestination) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.DestinationCIDRv4 != nil { - return obj.DestinationCIDRv4 - } - - if obj.DestinationCIDRv6 != nil { - return obj.DestinationCIDRv6 - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj RouteDestination) GetActualInstanceValue() interface{} { - if obj.DestinationCIDRv4 != nil { - return *obj.DestinationCIDRv4 - } - - if obj.DestinationCIDRv6 != nil { - return *obj.DestinationCIDRv6 - } - - // all schemas are nil - return nil -} - -type NullableRouteDestination struct { - value *RouteDestination - isSet bool -} - -func (v NullableRouteDestination) Get() *RouteDestination { - return v.value -} - -func (v *NullableRouteDestination) Set(val *RouteDestination) { - v.value = val - v.isSet = true -} - -func (v NullableRouteDestination) IsSet() bool { - return v.isSet -} - -func (v *NullableRouteDestination) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRouteDestination(val *RouteDestination) *NullableRouteDestination { - return &NullableRouteDestination{value: val, isSet: true} -} - -func (v NullableRouteDestination) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRouteDestination) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_route_list_response.go b/services/iaas/v2alpha1api/model_route_list_response.go deleted file mode 100644 index ab769d51ab..0000000000 --- a/services/iaas/v2alpha1api/model_route_list_response.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the RouteListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RouteListResponse{} - -// RouteListResponse Route list response. -type RouteListResponse struct { - // A list of routes. - Items []Route `json:"items"` - AdditionalProperties map[string]interface{} -} - -type _RouteListResponse RouteListResponse - -// NewRouteListResponse instantiates a new RouteListResponse 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 NewRouteListResponse(items []Route) *RouteListResponse { - this := RouteListResponse{} - this.Items = items - return &this -} - -// NewRouteListResponseWithDefaults instantiates a new RouteListResponse 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 NewRouteListResponseWithDefaults() *RouteListResponse { - this := RouteListResponse{} - return &this -} - -// GetItems returns the Items field value -func (o *RouteListResponse) GetItems() []Route { - if o == nil { - var ret []Route - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *RouteListResponse) GetItemsOk() ([]Route, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *RouteListResponse) SetItems(v []Route) { - o.Items = v -} - -func (o RouteListResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RouteListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *RouteListResponse) 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{ - "items", - } - - 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) - } - } - - varRouteListResponse := _RouteListResponse{} - - err = json.Unmarshal(data, &varRouteListResponse) - - if err != nil { - return err - } - - *o = RouteListResponse(varRouteListResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "items") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRouteListResponse struct { - value *RouteListResponse - isSet bool -} - -func (v NullableRouteListResponse) Get() *RouteListResponse { - return v.value -} - -func (v *NullableRouteListResponse) Set(val *RouteListResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRouteListResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRouteListResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRouteListResponse(val *RouteListResponse) *NullableRouteListResponse { - return &NullableRouteListResponse{value: val, isSet: true} -} - -func (v NullableRouteListResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRouteListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_route_nexthop.go b/services/iaas/v2alpha1api/model_route_nexthop.go deleted file mode 100644 index 5dd8f67988..0000000000 --- a/services/iaas/v2alpha1api/model_route_nexthop.go +++ /dev/null @@ -1,218 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// RouteNexthop - struct for RouteNexthop -type RouteNexthop struct { - NexthopBlackhole *NexthopBlackhole - NexthopIPv4 *NexthopIPv4 - NexthopIPv6 *NexthopIPv6 - NexthopInternet *NexthopInternet -} - -// NexthopBlackholeAsRouteNexthop is a convenience function that returns NexthopBlackhole wrapped in RouteNexthop -func NexthopBlackholeAsRouteNexthop(v *NexthopBlackhole) RouteNexthop { - return RouteNexthop{ - NexthopBlackhole: v, - } -} - -// NexthopIPv4AsRouteNexthop is a convenience function that returns NexthopIPv4 wrapped in RouteNexthop -func NexthopIPv4AsRouteNexthop(v *NexthopIPv4) RouteNexthop { - return RouteNexthop{ - NexthopIPv4: v, - } -} - -// NexthopIPv6AsRouteNexthop is a convenience function that returns NexthopIPv6 wrapped in RouteNexthop -func NexthopIPv6AsRouteNexthop(v *NexthopIPv6) RouteNexthop { - return RouteNexthop{ - NexthopIPv6: v, - } -} - -// NexthopInternetAsRouteNexthop is a convenience function that returns NexthopInternet wrapped in RouteNexthop -func NexthopInternetAsRouteNexthop(v *NexthopInternet) RouteNexthop { - return RouteNexthop{ - NexthopInternet: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RouteNexthop) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'blackhole' - if jsonDict["type"] == "blackhole" { - // try to unmarshal JSON data into NexthopBlackhole - err = json.Unmarshal(data, &dst.NexthopBlackhole) - if err == nil { - return nil // data stored in dst.NexthopBlackhole, return on the first match - } else { - dst.NexthopBlackhole = nil - return fmt.Errorf("failed to unmarshal RouteNexthop as NexthopBlackhole: %s", err.Error()) - } - } - - // check if the discriminator value is 'internet' - if jsonDict["type"] == "internet" { - // try to unmarshal JSON data into NexthopInternet - err = json.Unmarshal(data, &dst.NexthopInternet) - if err == nil { - return nil // data stored in dst.NexthopInternet, return on the first match - } else { - dst.NexthopInternet = nil - return fmt.Errorf("failed to unmarshal RouteNexthop as NexthopInternet: %s", err.Error()) - } - } - - // check if the discriminator value is 'ipv4' - if jsonDict["type"] == "ipv4" { - // try to unmarshal JSON data into NexthopIPv4 - err = json.Unmarshal(data, &dst.NexthopIPv4) - if err == nil { - return nil // data stored in dst.NexthopIPv4, return on the first match - } else { - dst.NexthopIPv4 = nil - return fmt.Errorf("failed to unmarshal RouteNexthop as NexthopIPv4: %s", err.Error()) - } - } - - // check if the discriminator value is 'ipv6' - if jsonDict["type"] == "ipv6" { - // try to unmarshal JSON data into NexthopIPv6 - err = json.Unmarshal(data, &dst.NexthopIPv6) - if err == nil { - return nil // data stored in dst.NexthopIPv6, return on the first match - } else { - dst.NexthopIPv6 = nil - return fmt.Errorf("failed to unmarshal RouteNexthop as NexthopIPv6: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RouteNexthop) MarshalJSON() ([]byte, error) { - if src.NexthopBlackhole != nil { - return json.Marshal(&src.NexthopBlackhole) - } - - if src.NexthopIPv4 != nil { - return json.Marshal(&src.NexthopIPv4) - } - - if src.NexthopIPv6 != nil { - return json.Marshal(&src.NexthopIPv6) - } - - if src.NexthopInternet != nil { - return json.Marshal(&src.NexthopInternet) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RouteNexthop) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.NexthopBlackhole != nil { - return obj.NexthopBlackhole - } - - if obj.NexthopIPv4 != nil { - return obj.NexthopIPv4 - } - - if obj.NexthopIPv6 != nil { - return obj.NexthopIPv6 - } - - if obj.NexthopInternet != nil { - return obj.NexthopInternet - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj RouteNexthop) GetActualInstanceValue() interface{} { - if obj.NexthopBlackhole != nil { - return *obj.NexthopBlackhole - } - - if obj.NexthopIPv4 != nil { - return *obj.NexthopIPv4 - } - - if obj.NexthopIPv6 != nil { - return *obj.NexthopIPv6 - } - - if obj.NexthopInternet != nil { - return *obj.NexthopInternet - } - - // all schemas are nil - return nil -} - -type NullableRouteNexthop struct { - value *RouteNexthop - isSet bool -} - -func (v NullableRouteNexthop) Get() *RouteNexthop { - return v.value -} - -func (v *NullableRouteNexthop) Set(val *RouteNexthop) { - v.value = val - v.isSet = true -} - -func (v NullableRouteNexthop) IsSet() bool { - return v.isSet -} - -func (v *NullableRouteNexthop) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRouteNexthop(val *RouteNexthop) *NullableRouteNexthop { - return &NullableRouteNexthop{value: val, isSet: true} -} - -func (v NullableRouteNexthop) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRouteNexthop) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_routing_table.go b/services/iaas/v2alpha1api/model_routing_table.go deleted file mode 100644 index 1afc6af343..0000000000 --- a/services/iaas/v2alpha1api/model_routing_table.go +++ /dev/null @@ -1,481 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the RoutingTable type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RoutingTable{} - -// RoutingTable An object representing a routing table. Filterable Fields: `dynamicRoutes`, `systemRoutes`. -type RoutingTable struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - // This is the default routing table. It can't be deleted and is used if the user does not specify it otherwise. - Default *bool `json:"default,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - // A config setting for a routing table which allows propagation of dynamic routes to this routing table. - DynamicRoutes *bool `json:"dynamicRoutes,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,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]+)*$"` - // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes *bool `json:"systemRoutes,omitempty"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _RoutingTable RoutingTable - -// NewRoutingTable instantiates a new RoutingTable 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 NewRoutingTable(name string) *RoutingTable { - this := RoutingTable{} - var dynamicRoutes bool = true - this.DynamicRoutes = &dynamicRoutes - this.Name = name - var systemRoutes bool = true - this.SystemRoutes = &systemRoutes - return &this -} - -// NewRoutingTableWithDefaults instantiates a new RoutingTable 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 NewRoutingTableWithDefaults() *RoutingTable { - this := RoutingTable{} - var dynamicRoutes bool = true - this.DynamicRoutes = &dynamicRoutes - var systemRoutes bool = true - this.SystemRoutes = &systemRoutes - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *RoutingTable) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RoutingTable) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *RoutingTable) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *RoutingTable) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDefault returns the Default field value if set, zero value otherwise. -func (o *RoutingTable) GetDefault() bool { - if o == nil || IsNil(o.Default) { - var ret bool - return ret - } - return *o.Default -} - -// GetDefaultOk returns a tuple with the Default field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RoutingTable) GetDefaultOk() (*bool, bool) { - if o == nil || IsNil(o.Default) { - return nil, false - } - return o.Default, true -} - -// HasDefault returns a boolean if a field has been set. -func (o *RoutingTable) HasDefault() bool { - if o != nil && !IsNil(o.Default) { - return true - } - - return false -} - -// SetDefault gets a reference to the given bool and assigns it to the Default field. -func (o *RoutingTable) SetDefault(v bool) { - o.Default = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *RoutingTable) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RoutingTable) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *RoutingTable) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *RoutingTable) SetDescription(v string) { - o.Description = &v -} - -// GetDynamicRoutes returns the DynamicRoutes field value if set, zero value otherwise. -func (o *RoutingTable) GetDynamicRoutes() bool { - if o == nil || IsNil(o.DynamicRoutes) { - var ret bool - return ret - } - return *o.DynamicRoutes -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RoutingTable) GetDynamicRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.DynamicRoutes) { - return nil, false - } - return o.DynamicRoutes, true -} - -// HasDynamicRoutes returns a boolean if a field has been set. -func (o *RoutingTable) HasDynamicRoutes() bool { - if o != nil && !IsNil(o.DynamicRoutes) { - return true - } - - return false -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -func (o *RoutingTable) SetDynamicRoutes(v bool) { - o.DynamicRoutes = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RoutingTable) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RoutingTable) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RoutingTable) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RoutingTable) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *RoutingTable) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *RoutingTable) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *RoutingTable) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *RoutingTable) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *RoutingTable) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *RoutingTable) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *RoutingTable) SetName(v string) { - o.Name = v -} - -// GetSystemRoutes returns the SystemRoutes field value if set, zero value otherwise. -func (o *RoutingTable) GetSystemRoutes() bool { - if o == nil || IsNil(o.SystemRoutes) { - var ret bool - return ret - } - return *o.SystemRoutes -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RoutingTable) GetSystemRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.SystemRoutes) { - return nil, false - } - return o.SystemRoutes, true -} - -// HasSystemRoutes returns a boolean if a field has been set. -func (o *RoutingTable) HasSystemRoutes() bool { - if o != nil && !IsNil(o.SystemRoutes) { - return true - } - - return false -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -func (o *RoutingTable) SetSystemRoutes(v bool) { - o.SystemRoutes = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *RoutingTable) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RoutingTable) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *RoutingTable) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *RoutingTable) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -func (o RoutingTable) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RoutingTable) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - if !IsNil(o.Default) { - toSerialize["default"] = o.Default - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.DynamicRoutes) { - toSerialize["dynamicRoutes"] = o.DynamicRoutes - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - if !IsNil(o.SystemRoutes) { - toSerialize["systemRoutes"] = o.SystemRoutes - } - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *RoutingTable) 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{ - "name", - } - - 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) - } - } - - varRoutingTable := _RoutingTable{} - - err = json.Unmarshal(data, &varRoutingTable) - - if err != nil { - return err - } - - *o = RoutingTable(varRoutingTable) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "default") - delete(additionalProperties, "description") - delete(additionalProperties, "dynamicRoutes") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "systemRoutes") - delete(additionalProperties, "updatedAt") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRoutingTable struct { - value *RoutingTable - isSet bool -} - -func (v NullableRoutingTable) Get() *RoutingTable { - return v.value -} - -func (v *NullableRoutingTable) Set(val *RoutingTable) { - v.value = val - v.isSet = true -} - -func (v NullableRoutingTable) IsSet() bool { - return v.isSet -} - -func (v *NullableRoutingTable) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRoutingTable(val *RoutingTable) *NullableRoutingTable { - return &NullableRoutingTable{value: val, isSet: true} -} - -func (v NullableRoutingTable) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRoutingTable) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_routing_table_list_response.go b/services/iaas/v2alpha1api/model_routing_table_list_response.go deleted file mode 100644 index 6609dfbb2a..0000000000 --- a/services/iaas/v2alpha1api/model_routing_table_list_response.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the RoutingTableListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RoutingTableListResponse{} - -// RoutingTableListResponse Routing table response. -type RoutingTableListResponse struct { - // A list of routing tables. - Items []RoutingTable `json:"items"` - AdditionalProperties map[string]interface{} -} - -type _RoutingTableListResponse RoutingTableListResponse - -// NewRoutingTableListResponse instantiates a new RoutingTableListResponse 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 NewRoutingTableListResponse(items []RoutingTable) *RoutingTableListResponse { - this := RoutingTableListResponse{} - this.Items = items - return &this -} - -// NewRoutingTableListResponseWithDefaults instantiates a new RoutingTableListResponse 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 NewRoutingTableListResponseWithDefaults() *RoutingTableListResponse { - this := RoutingTableListResponse{} - return &this -} - -// GetItems returns the Items field value -func (o *RoutingTableListResponse) GetItems() []RoutingTable { - if o == nil { - var ret []RoutingTable - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *RoutingTableListResponse) GetItemsOk() ([]RoutingTable, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *RoutingTableListResponse) SetItems(v []RoutingTable) { - o.Items = v -} - -func (o RoutingTableListResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RoutingTableListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *RoutingTableListResponse) 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{ - "items", - } - - 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) - } - } - - varRoutingTableListResponse := _RoutingTableListResponse{} - - err = json.Unmarshal(data, &varRoutingTableListResponse) - - if err != nil { - return err - } - - *o = RoutingTableListResponse(varRoutingTableListResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "items") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRoutingTableListResponse struct { - value *RoutingTableListResponse - isSet bool -} - -func (v NullableRoutingTableListResponse) Get() *RoutingTableListResponse { - return v.value -} - -func (v *NullableRoutingTableListResponse) Set(val *RoutingTableListResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRoutingTableListResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRoutingTableListResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRoutingTableListResponse(val *RoutingTableListResponse) *NullableRoutingTableListResponse { - return &NullableRoutingTableListResponse{value: val, isSet: true} -} - -func (v NullableRoutingTableListResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRoutingTableListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_update_network_ipv4_body.go b/services/iaas/v2alpha1api/model_update_network_ipv4_body.go deleted file mode 100644 index d0b2989776..0000000000 --- a/services/iaas/v2alpha1api/model_update_network_ipv4_body.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the UpdateNetworkIPv4Body type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateNetworkIPv4Body{} - -// UpdateNetworkIPv4Body The config object for a IPv4 network update. -type UpdateNetworkIPv4Body struct { - // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateNetworkIPv4Body UpdateNetworkIPv4Body - -// NewUpdateNetworkIPv4Body instantiates a new UpdateNetworkIPv4Body 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 NewUpdateNetworkIPv4Body() *UpdateNetworkIPv4Body { - this := UpdateNetworkIPv4Body{} - return &this -} - -// NewUpdateNetworkIPv4BodyWithDefaults instantiates a new UpdateNetworkIPv4Body 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 NewUpdateNetworkIPv4BodyWithDefaults() *UpdateNetworkIPv4Body { - this := UpdateNetworkIPv4Body{} - return &this -} - -// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UpdateNetworkIPv4Body) GetGateway() string { - if o == nil || IsNil(o.Gateway.Get()) { - var ret string - return ret - } - return *o.Gateway.Get() -} - -// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UpdateNetworkIPv4Body) GetGatewayOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Gateway.Get(), o.Gateway.IsSet() -} - -// HasGateway returns a boolean if a field has been set. -func (o *UpdateNetworkIPv4Body) HasGateway() bool { - if o != nil && o.Gateway.IsSet() { - return true - } - - return false -} - -// SetGateway gets a reference to the given NullableString and assigns it to the Gateway field. -func (o *UpdateNetworkIPv4Body) SetGateway(v string) { - o.Gateway.Set(&v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -func (o *UpdateNetworkIPv4Body) SetGatewayNil() { - o.Gateway.Set(nil) -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -func (o *UpdateNetworkIPv4Body) UnsetGateway() { - o.Gateway.Unset() -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *UpdateNetworkIPv4Body) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateNetworkIPv4Body) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *UpdateNetworkIPv4Body) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *UpdateNetworkIPv4Body) SetNameservers(v []string) { - o.Nameservers = v -} - -func (o UpdateNetworkIPv4Body) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateNetworkIPv4Body) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Gateway.IsSet() { - toSerialize["gateway"] = o.Gateway.Get() - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateNetworkIPv4Body) UnmarshalJSON(data []byte) (err error) { - varUpdateNetworkIPv4Body := _UpdateNetworkIPv4Body{} - - err = json.Unmarshal(data, &varUpdateNetworkIPv4Body) - - if err != nil { - return err - } - - *o = UpdateNetworkIPv4Body(varUpdateNetworkIPv4Body) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "gateway") - delete(additionalProperties, "nameservers") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateNetworkIPv4Body struct { - value *UpdateNetworkIPv4Body - isSet bool -} - -func (v NullableUpdateNetworkIPv4Body) Get() *UpdateNetworkIPv4Body { - return v.value -} - -func (v *NullableUpdateNetworkIPv4Body) Set(val *UpdateNetworkIPv4Body) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateNetworkIPv4Body) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateNetworkIPv4Body) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateNetworkIPv4Body(val *UpdateNetworkIPv4Body) *NullableUpdateNetworkIPv4Body { - return &NullableUpdateNetworkIPv4Body{value: val, isSet: true} -} - -func (v NullableUpdateNetworkIPv4Body) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateNetworkIPv4Body) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_update_network_ipv6_body.go b/services/iaas/v2alpha1api/model_update_network_ipv6_body.go deleted file mode 100644 index f48ad86852..0000000000 --- a/services/iaas/v2alpha1api/model_update_network_ipv6_body.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the UpdateNetworkIPv6Body type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateNetworkIPv6Body{} - -// UpdateNetworkIPv6Body The config object for a IPv6 network update. -type UpdateNetworkIPv6Body struct { - // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers []string `json:"nameservers,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateNetworkIPv6Body UpdateNetworkIPv6Body - -// NewUpdateNetworkIPv6Body instantiates a new UpdateNetworkIPv6Body 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 NewUpdateNetworkIPv6Body() *UpdateNetworkIPv6Body { - this := UpdateNetworkIPv6Body{} - return &this -} - -// NewUpdateNetworkIPv6BodyWithDefaults instantiates a new UpdateNetworkIPv6Body 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 NewUpdateNetworkIPv6BodyWithDefaults() *UpdateNetworkIPv6Body { - this := UpdateNetworkIPv6Body{} - return &this -} - -// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UpdateNetworkIPv6Body) GetGateway() string { - if o == nil || IsNil(o.Gateway.Get()) { - var ret string - return ret - } - return *o.Gateway.Get() -} - -// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UpdateNetworkIPv6Body) GetGatewayOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Gateway.Get(), o.Gateway.IsSet() -} - -// HasGateway returns a boolean if a field has been set. -func (o *UpdateNetworkIPv6Body) HasGateway() bool { - if o != nil && o.Gateway.IsSet() { - return true - } - - return false -} - -// SetGateway gets a reference to the given NullableString and assigns it to the Gateway field. -func (o *UpdateNetworkIPv6Body) SetGateway(v string) { - o.Gateway.Set(&v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -func (o *UpdateNetworkIPv6Body) SetGatewayNil() { - o.Gateway.Set(nil) -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -func (o *UpdateNetworkIPv6Body) UnsetGateway() { - o.Gateway.Unset() -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *UpdateNetworkIPv6Body) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateNetworkIPv6Body) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *UpdateNetworkIPv6Body) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *UpdateNetworkIPv6Body) SetNameservers(v []string) { - o.Nameservers = v -} - -func (o UpdateNetworkIPv6Body) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateNetworkIPv6Body) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Gateway.IsSet() { - toSerialize["gateway"] = o.Gateway.Get() - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateNetworkIPv6Body) UnmarshalJSON(data []byte) (err error) { - varUpdateNetworkIPv6Body := _UpdateNetworkIPv6Body{} - - err = json.Unmarshal(data, &varUpdateNetworkIPv6Body) - - if err != nil { - return err - } - - *o = UpdateNetworkIPv6Body(varUpdateNetworkIPv6Body) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "gateway") - delete(additionalProperties, "nameservers") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateNetworkIPv6Body struct { - value *UpdateNetworkIPv6Body - isSet bool -} - -func (v NullableUpdateNetworkIPv6Body) Get() *UpdateNetworkIPv6Body { - return v.value -} - -func (v *NullableUpdateNetworkIPv6Body) Set(val *UpdateNetworkIPv6Body) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateNetworkIPv6Body) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateNetworkIPv6Body) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateNetworkIPv6Body(val *UpdateNetworkIPv6Body) *NullableUpdateNetworkIPv6Body { - return &NullableUpdateNetworkIPv6Body{value: val, isSet: true} -} - -func (v NullableUpdateNetworkIPv6Body) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateNetworkIPv6Body) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_update_route_of_routing_table_payload.go b/services/iaas/v2alpha1api/model_update_route_of_routing_table_payload.go deleted file mode 100644 index 4406f7f80f..0000000000 --- a/services/iaas/v2alpha1api/model_update_route_of_routing_table_payload.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the UpdateRouteOfRoutingTablePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateRouteOfRoutingTablePayload{} - -// UpdateRouteOfRoutingTablePayload Object that represents the request body for a route update. -type UpdateRouteOfRoutingTablePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateRouteOfRoutingTablePayload UpdateRouteOfRoutingTablePayload - -// NewUpdateRouteOfRoutingTablePayload instantiates a new UpdateRouteOfRoutingTablePayload 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 NewUpdateRouteOfRoutingTablePayload() *UpdateRouteOfRoutingTablePayload { - this := UpdateRouteOfRoutingTablePayload{} - return &this -} - -// NewUpdateRouteOfRoutingTablePayloadWithDefaults instantiates a new UpdateRouteOfRoutingTablePayload 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 NewUpdateRouteOfRoutingTablePayloadWithDefaults() *UpdateRouteOfRoutingTablePayload { - this := UpdateRouteOfRoutingTablePayload{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *UpdateRouteOfRoutingTablePayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *UpdateRouteOfRoutingTablePayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *UpdateRouteOfRoutingTablePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *UpdateRouteOfRoutingTablePayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -func (o UpdateRouteOfRoutingTablePayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateRouteOfRoutingTablePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateRouteOfRoutingTablePayload) UnmarshalJSON(data []byte) (err error) { - varUpdateRouteOfRoutingTablePayload := _UpdateRouteOfRoutingTablePayload{} - - err = json.Unmarshal(data, &varUpdateRouteOfRoutingTablePayload) - - if err != nil { - return err - } - - *o = UpdateRouteOfRoutingTablePayload(varUpdateRouteOfRoutingTablePayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "labels") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateRouteOfRoutingTablePayload struct { - value *UpdateRouteOfRoutingTablePayload - isSet bool -} - -func (v NullableUpdateRouteOfRoutingTablePayload) Get() *UpdateRouteOfRoutingTablePayload { - return v.value -} - -func (v *NullableUpdateRouteOfRoutingTablePayload) Set(val *UpdateRouteOfRoutingTablePayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateRouteOfRoutingTablePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateRouteOfRoutingTablePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateRouteOfRoutingTablePayload(val *UpdateRouteOfRoutingTablePayload) *NullableUpdateRouteOfRoutingTablePayload { - return &NullableUpdateRouteOfRoutingTablePayload{value: val, isSet: true} -} - -func (v NullableUpdateRouteOfRoutingTablePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateRouteOfRoutingTablePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_update_routing_table_of_area_payload.go b/services/iaas/v2alpha1api/model_update_routing_table_of_area_payload.go deleted file mode 100644 index 30c815262f..0000000000 --- a/services/iaas/v2alpha1api/model_update_routing_table_of_area_payload.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the UpdateRoutingTableOfAreaPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateRoutingTableOfAreaPayload{} - -// UpdateRoutingTableOfAreaPayload Object that represents the request body for a routing table update. -type UpdateRoutingTableOfAreaPayload struct { - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - // The update config setting for a routing table which allows propagation of dynamic routes to this routing table. - DynamicRoutes *bool `json:"dynamicRoutes,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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` - // The update config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes *bool `json:"systemRoutes,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateRoutingTableOfAreaPayload UpdateRoutingTableOfAreaPayload - -// NewUpdateRoutingTableOfAreaPayload instantiates a new UpdateRoutingTableOfAreaPayload 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 NewUpdateRoutingTableOfAreaPayload() *UpdateRoutingTableOfAreaPayload { - this := UpdateRoutingTableOfAreaPayload{} - return &this -} - -// NewUpdateRoutingTableOfAreaPayloadWithDefaults instantiates a new UpdateRoutingTableOfAreaPayload 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 NewUpdateRoutingTableOfAreaPayloadWithDefaults() *UpdateRoutingTableOfAreaPayload { - this := UpdateRoutingTableOfAreaPayload{} - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *UpdateRoutingTableOfAreaPayload) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateRoutingTableOfAreaPayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *UpdateRoutingTableOfAreaPayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *UpdateRoutingTableOfAreaPayload) SetDescription(v string) { - o.Description = &v -} - -// GetDynamicRoutes returns the DynamicRoutes field value if set, zero value otherwise. -func (o *UpdateRoutingTableOfAreaPayload) GetDynamicRoutes() bool { - if o == nil || IsNil(o.DynamicRoutes) { - var ret bool - return ret - } - return *o.DynamicRoutes -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateRoutingTableOfAreaPayload) GetDynamicRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.DynamicRoutes) { - return nil, false - } - return o.DynamicRoutes, true -} - -// HasDynamicRoutes returns a boolean if a field has been set. -func (o *UpdateRoutingTableOfAreaPayload) HasDynamicRoutes() bool { - if o != nil && !IsNil(o.DynamicRoutes) { - return true - } - - return false -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -func (o *UpdateRoutingTableOfAreaPayload) SetDynamicRoutes(v bool) { - o.DynamicRoutes = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *UpdateRoutingTableOfAreaPayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *UpdateRoutingTableOfAreaPayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *UpdateRoutingTableOfAreaPayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *UpdateRoutingTableOfAreaPayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateRoutingTableOfAreaPayload) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateRoutingTableOfAreaPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *UpdateRoutingTableOfAreaPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateRoutingTableOfAreaPayload) SetName(v string) { - o.Name = &v -} - -// GetSystemRoutes returns the SystemRoutes field value if set, zero value otherwise. -func (o *UpdateRoutingTableOfAreaPayload) GetSystemRoutes() bool { - if o == nil || IsNil(o.SystemRoutes) { - var ret bool - return ret - } - return *o.SystemRoutes -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateRoutingTableOfAreaPayload) GetSystemRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.SystemRoutes) { - return nil, false - } - return o.SystemRoutes, true -} - -// HasSystemRoutes returns a boolean if a field has been set. -func (o *UpdateRoutingTableOfAreaPayload) HasSystemRoutes() bool { - if o != nil && !IsNil(o.SystemRoutes) { - return true - } - - return false -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -func (o *UpdateRoutingTableOfAreaPayload) SetSystemRoutes(v bool) { - o.SystemRoutes = &v -} - -func (o UpdateRoutingTableOfAreaPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateRoutingTableOfAreaPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.DynamicRoutes) { - toSerialize["dynamicRoutes"] = o.DynamicRoutes - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.SystemRoutes) { - toSerialize["systemRoutes"] = o.SystemRoutes - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateRoutingTableOfAreaPayload) UnmarshalJSON(data []byte) (err error) { - varUpdateRoutingTableOfAreaPayload := _UpdateRoutingTableOfAreaPayload{} - - err = json.Unmarshal(data, &varUpdateRoutingTableOfAreaPayload) - - if err != nil { - return err - } - - *o = UpdateRoutingTableOfAreaPayload(varUpdateRoutingTableOfAreaPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "description") - delete(additionalProperties, "dynamicRoutes") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "systemRoutes") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateRoutingTableOfAreaPayload struct { - value *UpdateRoutingTableOfAreaPayload - isSet bool -} - -func (v NullableUpdateRoutingTableOfAreaPayload) Get() *UpdateRoutingTableOfAreaPayload { - return v.value -} - -func (v *NullableUpdateRoutingTableOfAreaPayload) Set(val *UpdateRoutingTableOfAreaPayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateRoutingTableOfAreaPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateRoutingTableOfAreaPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateRoutingTableOfAreaPayload(val *UpdateRoutingTableOfAreaPayload) *NullableUpdateRoutingTableOfAreaPayload { - return &NullableUpdateRoutingTableOfAreaPayload{value: val, isSet: true} -} - -func (v NullableUpdateRoutingTableOfAreaPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateRoutingTableOfAreaPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_update_vpc_network_range_payload.go b/services/iaas/v2alpha1api/model_update_vpc_network_range_payload.go deleted file mode 100644 index 2f7bb4264f..0000000000 --- a/services/iaas/v2alpha1api/model_update_vpc_network_range_payload.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// UpdateVPCNetworkRangePayload - Object that represents the request body for a VPC network range update. -type UpdateVPCNetworkRangePayload struct { - V1UpdateVPCNetworkRangeIPv4 *V1UpdateVPCNetworkRangeIPv4 -} - -// V1UpdateVPCNetworkRangeIPv4AsUpdateVPCNetworkRangePayload is a convenience function that returns V1UpdateVPCNetworkRangeIPv4 wrapped in UpdateVPCNetworkRangePayload -func V1UpdateVPCNetworkRangeIPv4AsUpdateVPCNetworkRangePayload(v *V1UpdateVPCNetworkRangeIPv4) UpdateVPCNetworkRangePayload { - return UpdateVPCNetworkRangePayload{ - V1UpdateVPCNetworkRangeIPv4: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *UpdateVPCNetworkRangePayload) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'ipv4' - if jsonDict["ipVersion"] == "ipv4" { - // try to unmarshal JSON data into V1UpdateVPCNetworkRangeIPv4 - err = json.Unmarshal(data, &dst.V1UpdateVPCNetworkRangeIPv4) - if err == nil { - return nil // data stored in dst.V1UpdateVPCNetworkRangeIPv4, return on the first match - } else { - dst.V1UpdateVPCNetworkRangeIPv4 = nil - return fmt.Errorf("failed to unmarshal UpdateVPCNetworkRangePayload as V1UpdateVPCNetworkRangeIPv4: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src UpdateVPCNetworkRangePayload) MarshalJSON() ([]byte, error) { - if src.V1UpdateVPCNetworkRangeIPv4 != nil { - return json.Marshal(&src.V1UpdateVPCNetworkRangeIPv4) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *UpdateVPCNetworkRangePayload) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.V1UpdateVPCNetworkRangeIPv4 != nil { - return obj.V1UpdateVPCNetworkRangeIPv4 - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj UpdateVPCNetworkRangePayload) GetActualInstanceValue() interface{} { - if obj.V1UpdateVPCNetworkRangeIPv4 != nil { - return *obj.V1UpdateVPCNetworkRangeIPv4 - } - - // all schemas are nil - return nil -} - -type NullableUpdateVPCNetworkRangePayload struct { - value *UpdateVPCNetworkRangePayload - isSet bool -} - -func (v NullableUpdateVPCNetworkRangePayload) Get() *UpdateVPCNetworkRangePayload { - return v.value -} - -func (v *NullableUpdateVPCNetworkRangePayload) Set(val *UpdateVPCNetworkRangePayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateVPCNetworkRangePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateVPCNetworkRangePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateVPCNetworkRangePayload(val *UpdateVPCNetworkRangePayload) *NullableUpdateVPCNetworkRangePayload { - return &NullableUpdateVPCNetworkRangePayload{value: val, isSet: true} -} - -func (v NullableUpdateVPCNetworkRangePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateVPCNetworkRangePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_update_vpc_region_payload.go b/services/iaas/v2alpha1api/model_update_vpc_region_payload.go deleted file mode 100644 index 9ea2574241..0000000000 --- a/services/iaas/v2alpha1api/model_update_vpc_region_payload.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the UpdateVPCRegionPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateVPCRegionPayload{} - -// UpdateVPCRegionPayload The basic properties of a regional VPC. -type UpdateVPCRegionPayload struct { - Ipv4 *RegionalVPCIPv4 `json:"ipv4,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status *string `json:"status,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateVPCRegionPayload UpdateVPCRegionPayload - -// NewUpdateVPCRegionPayload instantiates a new UpdateVPCRegionPayload 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 NewUpdateVPCRegionPayload() *UpdateVPCRegionPayload { - this := UpdateVPCRegionPayload{} - return &this -} - -// NewUpdateVPCRegionPayloadWithDefaults instantiates a new UpdateVPCRegionPayload 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 NewUpdateVPCRegionPayloadWithDefaults() *UpdateVPCRegionPayload { - this := UpdateVPCRegionPayload{} - return &this -} - -// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. -func (o *UpdateVPCRegionPayload) GetIpv4() RegionalVPCIPv4 { - if o == nil || IsNil(o.Ipv4) { - var ret RegionalVPCIPv4 - return ret - } - return *o.Ipv4 -} - -// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCRegionPayload) GetIpv4Ok() (*RegionalVPCIPv4, bool) { - if o == nil || IsNil(o.Ipv4) { - return nil, false - } - return o.Ipv4, true -} - -// HasIpv4 returns a boolean if a field has been set. -func (o *UpdateVPCRegionPayload) HasIpv4() bool { - if o != nil && !IsNil(o.Ipv4) { - return true - } - - return false -} - -// SetIpv4 gets a reference to the given RegionalVPCIPv4 and assigns it to the Ipv4 field. -func (o *UpdateVPCRegionPayload) SetIpv4(v RegionalVPCIPv4) { - o.Ipv4 = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *UpdateVPCRegionPayload) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCRegionPayload) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *UpdateVPCRegionPayload) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *UpdateVPCRegionPayload) SetStatus(v string) { - o.Status = &v -} - -func (o UpdateVPCRegionPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateVPCRegionPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Ipv4) { - toSerialize["ipv4"] = o.Ipv4 - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateVPCRegionPayload) UnmarshalJSON(data []byte) (err error) { - varUpdateVPCRegionPayload := _UpdateVPCRegionPayload{} - - err = json.Unmarshal(data, &varUpdateVPCRegionPayload) - - if err != nil { - return err - } - - *o = UpdateVPCRegionPayload(varUpdateVPCRegionPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "ipv4") - delete(additionalProperties, "status") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateVPCRegionPayload struct { - value *UpdateVPCRegionPayload - isSet bool -} - -func (v NullableUpdateVPCRegionPayload) Get() *UpdateVPCRegionPayload { - return v.value -} - -func (v *NullableUpdateVPCRegionPayload) Set(val *UpdateVPCRegionPayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateVPCRegionPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateVPCRegionPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateVPCRegionPayload(val *UpdateVPCRegionPayload) *NullableUpdateVPCRegionPayload { - return &NullableUpdateVPCRegionPayload{value: val, isSet: true} -} - -func (v NullableUpdateVPCRegionPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateVPCRegionPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_update_vpc_routing_table_payload.go b/services/iaas/v2alpha1api/model_update_vpc_routing_table_payload.go deleted file mode 100644 index 40cdbce22a..0000000000 --- a/services/iaas/v2alpha1api/model_update_vpc_routing_table_payload.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the UpdateVPCRoutingTablePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateVPCRoutingTablePayload{} - -// UpdateVPCRoutingTablePayload Object that represents the request body for a routing table update. -type UpdateVPCRoutingTablePayload struct { - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - // The update config setting for a routing table which allows propagation of dynamic routes to this routing table. - DynamicRoutes *bool `json:"dynamicRoutes,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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` - // The update config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes *bool `json:"systemRoutes,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateVPCRoutingTablePayload UpdateVPCRoutingTablePayload - -// NewUpdateVPCRoutingTablePayload instantiates a new UpdateVPCRoutingTablePayload 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 NewUpdateVPCRoutingTablePayload() *UpdateVPCRoutingTablePayload { - this := UpdateVPCRoutingTablePayload{} - return &this -} - -// NewUpdateVPCRoutingTablePayloadWithDefaults instantiates a new UpdateVPCRoutingTablePayload 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 NewUpdateVPCRoutingTablePayloadWithDefaults() *UpdateVPCRoutingTablePayload { - this := UpdateVPCRoutingTablePayload{} - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *UpdateVPCRoutingTablePayload) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCRoutingTablePayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *UpdateVPCRoutingTablePayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *UpdateVPCRoutingTablePayload) SetDescription(v string) { - o.Description = &v -} - -// GetDynamicRoutes returns the DynamicRoutes field value if set, zero value otherwise. -func (o *UpdateVPCRoutingTablePayload) GetDynamicRoutes() bool { - if o == nil || IsNil(o.DynamicRoutes) { - var ret bool - return ret - } - return *o.DynamicRoutes -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCRoutingTablePayload) GetDynamicRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.DynamicRoutes) { - return nil, false - } - return o.DynamicRoutes, true -} - -// HasDynamicRoutes returns a boolean if a field has been set. -func (o *UpdateVPCRoutingTablePayload) HasDynamicRoutes() bool { - if o != nil && !IsNil(o.DynamicRoutes) { - return true - } - - return false -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -func (o *UpdateVPCRoutingTablePayload) SetDynamicRoutes(v bool) { - o.DynamicRoutes = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *UpdateVPCRoutingTablePayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *UpdateVPCRoutingTablePayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *UpdateVPCRoutingTablePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *UpdateVPCRoutingTablePayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateVPCRoutingTablePayload) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCRoutingTablePayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *UpdateVPCRoutingTablePayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateVPCRoutingTablePayload) SetName(v string) { - o.Name = &v -} - -// GetSystemRoutes returns the SystemRoutes field value if set, zero value otherwise. -func (o *UpdateVPCRoutingTablePayload) GetSystemRoutes() bool { - if o == nil || IsNil(o.SystemRoutes) { - var ret bool - return ret - } - return *o.SystemRoutes -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCRoutingTablePayload) GetSystemRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.SystemRoutes) { - return nil, false - } - return o.SystemRoutes, true -} - -// HasSystemRoutes returns a boolean if a field has been set. -func (o *UpdateVPCRoutingTablePayload) HasSystemRoutes() bool { - if o != nil && !IsNil(o.SystemRoutes) { - return true - } - - return false -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -func (o *UpdateVPCRoutingTablePayload) SetSystemRoutes(v bool) { - o.SystemRoutes = &v -} - -func (o UpdateVPCRoutingTablePayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateVPCRoutingTablePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.DynamicRoutes) { - toSerialize["dynamicRoutes"] = o.DynamicRoutes - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.SystemRoutes) { - toSerialize["systemRoutes"] = o.SystemRoutes - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateVPCRoutingTablePayload) UnmarshalJSON(data []byte) (err error) { - varUpdateVPCRoutingTablePayload := _UpdateVPCRoutingTablePayload{} - - err = json.Unmarshal(data, &varUpdateVPCRoutingTablePayload) - - if err != nil { - return err - } - - *o = UpdateVPCRoutingTablePayload(varUpdateVPCRoutingTablePayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "description") - delete(additionalProperties, "dynamicRoutes") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "systemRoutes") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateVPCRoutingTablePayload struct { - value *UpdateVPCRoutingTablePayload - isSet bool -} - -func (v NullableUpdateVPCRoutingTablePayload) Get() *UpdateVPCRoutingTablePayload { - return v.value -} - -func (v *NullableUpdateVPCRoutingTablePayload) Set(val *UpdateVPCRoutingTablePayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateVPCRoutingTablePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateVPCRoutingTablePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateVPCRoutingTablePayload(val *UpdateVPCRoutingTablePayload) *NullableUpdateVPCRoutingTablePayload { - return &NullableUpdateVPCRoutingTablePayload{value: val, isSet: true} -} - -func (v NullableUpdateVPCRoutingTablePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateVPCRoutingTablePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_update_vpc_static_route_payload.go b/services/iaas/v2alpha1api/model_update_vpc_static_route_payload.go deleted file mode 100644 index 14751c70df..0000000000 --- a/services/iaas/v2alpha1api/model_update_vpc_static_route_payload.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" -) - -// checks if the UpdateVPCStaticRoutePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateVPCStaticRoutePayload{} - -// UpdateVPCStaticRoutePayload Object that represents the request body for a route update. -type UpdateVPCStaticRoutePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateVPCStaticRoutePayload UpdateVPCStaticRoutePayload - -// NewUpdateVPCStaticRoutePayload instantiates a new UpdateVPCStaticRoutePayload 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 NewUpdateVPCStaticRoutePayload() *UpdateVPCStaticRoutePayload { - this := UpdateVPCStaticRoutePayload{} - return &this -} - -// NewUpdateVPCStaticRoutePayloadWithDefaults instantiates a new UpdateVPCStaticRoutePayload 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 NewUpdateVPCStaticRoutePayloadWithDefaults() *UpdateVPCStaticRoutePayload { - this := UpdateVPCStaticRoutePayload{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *UpdateVPCStaticRoutePayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *UpdateVPCStaticRoutePayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *UpdateVPCStaticRoutePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *UpdateVPCStaticRoutePayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -func (o UpdateVPCStaticRoutePayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateVPCStaticRoutePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateVPCStaticRoutePayload) UnmarshalJSON(data []byte) (err error) { - varUpdateVPCStaticRoutePayload := _UpdateVPCStaticRoutePayload{} - - err = json.Unmarshal(data, &varUpdateVPCStaticRoutePayload) - - if err != nil { - return err - } - - *o = UpdateVPCStaticRoutePayload(varUpdateVPCStaticRoutePayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "labels") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateVPCStaticRoutePayload struct { - value *UpdateVPCStaticRoutePayload - isSet bool -} - -func (v NullableUpdateVPCStaticRoutePayload) Get() *UpdateVPCStaticRoutePayload { - return v.value -} - -func (v *NullableUpdateVPCStaticRoutePayload) Set(val *UpdateVPCStaticRoutePayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateVPCStaticRoutePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateVPCStaticRoutePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateVPCStaticRoutePayload(val *UpdateVPCStaticRoutePayload) *NullableUpdateVPCStaticRoutePayload { - return &NullableUpdateVPCStaticRoutePayload{value: val, isSet: true} -} - -func (v NullableUpdateVPCStaticRoutePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateVPCStaticRoutePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_v1_update_vpc_network_range_ipv4.go b/services/iaas/v2alpha1api/model_v1_update_vpc_network_range_ipv4.go deleted file mode 100644 index bac963e7c2..0000000000 --- a/services/iaas/v2alpha1api/model_v1_update_vpc_network_range_ipv4.go +++ /dev/null @@ -1,395 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the V1UpdateVPCNetworkRangeIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &V1UpdateVPCNetworkRangeIPv4{} - -// V1UpdateVPCNetworkRangeIPv4 Contains the IPv4 properties of a VPC network range update. -type V1UpdateVPCNetworkRangeIPv4 struct { - // The default prefix length for network ranges in the VPC. - DefaultPrefixLen *int64 `json:"defaultPrefixLen,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - IpVersion V1UpdateVPCNetworkRangeIPv4IpVersion `json:"ipVersion"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The maximal prefix length for network ranges in the VPC. - MaxPrefixLen *int64 `json:"maxPrefixLen,omitempty"` - // The minimal prefix length for network ranges in the VPC. - MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _V1UpdateVPCNetworkRangeIPv4 V1UpdateVPCNetworkRangeIPv4 - -// NewV1UpdateVPCNetworkRangeIPv4 instantiates a new V1UpdateVPCNetworkRangeIPv4 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 NewV1UpdateVPCNetworkRangeIPv4(ipVersion V1UpdateVPCNetworkRangeIPv4IpVersion) *V1UpdateVPCNetworkRangeIPv4 { - this := V1UpdateVPCNetworkRangeIPv4{} - this.IpVersion = ipVersion - return &this -} - -// NewV1UpdateVPCNetworkRangeIPv4WithDefaults instantiates a new V1UpdateVPCNetworkRangeIPv4 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 NewV1UpdateVPCNetworkRangeIPv4WithDefaults() *V1UpdateVPCNetworkRangeIPv4 { - this := V1UpdateVPCNetworkRangeIPv4{} - return &this -} - -// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. -func (o *V1UpdateVPCNetworkRangeIPv4) GetDefaultPrefixLen() int64 { - if o == nil || IsNil(o.DefaultPrefixLen) { - var ret int64 - return ret - } - return *o.DefaultPrefixLen -} - -// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) GetDefaultPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.DefaultPrefixLen) { - return nil, false - } - return o.DefaultPrefixLen, true -} - -// HasDefaultPrefixLen returns a boolean if a field has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) HasDefaultPrefixLen() bool { - if o != nil && !IsNil(o.DefaultPrefixLen) { - return true - } - - return false -} - -// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. -func (o *V1UpdateVPCNetworkRangeIPv4) SetDefaultPrefixLen(v int64) { - o.DefaultPrefixLen = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *V1UpdateVPCNetworkRangeIPv4) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *V1UpdateVPCNetworkRangeIPv4) SetDescription(v string) { - o.Description = &v -} - -// GetIpVersion returns the IpVersion field value -func (o *V1UpdateVPCNetworkRangeIPv4) GetIpVersion() V1UpdateVPCNetworkRangeIPv4IpVersion { - if o == nil { - var ret V1UpdateVPCNetworkRangeIPv4IpVersion - return ret - } - - return o.IpVersion -} - -// GetIpVersionOk returns a tuple with the IpVersion field value -// and a boolean to check if the value has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) GetIpVersionOk() (*V1UpdateVPCNetworkRangeIPv4IpVersion, bool) { - if o == nil { - return nil, false - } - return &o.IpVersion, true -} - -// SetIpVersion sets field value -func (o *V1UpdateVPCNetworkRangeIPv4) SetIpVersion(v V1UpdateVPCNetworkRangeIPv4IpVersion) { - o.IpVersion = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *V1UpdateVPCNetworkRangeIPv4) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *V1UpdateVPCNetworkRangeIPv4) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *V1UpdateVPCNetworkRangeIPv4) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. -func (o *V1UpdateVPCNetworkRangeIPv4) GetMaxPrefixLen() int64 { - if o == nil || IsNil(o.MaxPrefixLen) { - var ret int64 - return ret - } - return *o.MaxPrefixLen -} - -// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) GetMaxPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MaxPrefixLen) { - return nil, false - } - return o.MaxPrefixLen, true -} - -// HasMaxPrefixLen returns a boolean if a field has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) HasMaxPrefixLen() bool { - if o != nil && !IsNil(o.MaxPrefixLen) { - return true - } - - return false -} - -// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. -func (o *V1UpdateVPCNetworkRangeIPv4) SetMaxPrefixLen(v int64) { - o.MaxPrefixLen = &v -} - -// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. -func (o *V1UpdateVPCNetworkRangeIPv4) GetMinPrefixLen() int64 { - if o == nil || IsNil(o.MinPrefixLen) { - var ret int64 - return ret - } - return *o.MinPrefixLen -} - -// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) GetMinPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MinPrefixLen) { - return nil, false - } - return o.MinPrefixLen, true -} - -// HasMinPrefixLen returns a boolean if a field has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) HasMinPrefixLen() bool { - if o != nil && !IsNil(o.MinPrefixLen) { - return true - } - - return false -} - -// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. -func (o *V1UpdateVPCNetworkRangeIPv4) SetMinPrefixLen(v int64) { - o.MinPrefixLen = &v -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *V1UpdateVPCNetworkRangeIPv4) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *V1UpdateVPCNetworkRangeIPv4) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *V1UpdateVPCNetworkRangeIPv4) SetNameservers(v []string) { - o.Nameservers = v -} - -func (o V1UpdateVPCNetworkRangeIPv4) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o V1UpdateVPCNetworkRangeIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DefaultPrefixLen) { - toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - toSerialize["ipVersion"] = o.IpVersion - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.MaxPrefixLen) { - toSerialize["maxPrefixLen"] = o.MaxPrefixLen - } - if !IsNil(o.MinPrefixLen) { - toSerialize["minPrefixLen"] = o.MinPrefixLen - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *V1UpdateVPCNetworkRangeIPv4) 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{ - "ipVersion", - } - - 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) - } - } - - varV1UpdateVPCNetworkRangeIPv4 := _V1UpdateVPCNetworkRangeIPv4{} - - err = json.Unmarshal(data, &varV1UpdateVPCNetworkRangeIPv4) - - if err != nil { - return err - } - - *o = V1UpdateVPCNetworkRangeIPv4(varV1UpdateVPCNetworkRangeIPv4) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "defaultPrefixLen") - delete(additionalProperties, "description") - delete(additionalProperties, "ipVersion") - delete(additionalProperties, "labels") - delete(additionalProperties, "maxPrefixLen") - delete(additionalProperties, "minPrefixLen") - delete(additionalProperties, "nameservers") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableV1UpdateVPCNetworkRangeIPv4 struct { - value *V1UpdateVPCNetworkRangeIPv4 - isSet bool -} - -func (v NullableV1UpdateVPCNetworkRangeIPv4) Get() *V1UpdateVPCNetworkRangeIPv4 { - return v.value -} - -func (v *NullableV1UpdateVPCNetworkRangeIPv4) Set(val *V1UpdateVPCNetworkRangeIPv4) { - v.value = val - v.isSet = true -} - -func (v NullableV1UpdateVPCNetworkRangeIPv4) IsSet() bool { - return v.isSet -} - -func (v *NullableV1UpdateVPCNetworkRangeIPv4) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableV1UpdateVPCNetworkRangeIPv4(val *V1UpdateVPCNetworkRangeIPv4) *NullableV1UpdateVPCNetworkRangeIPv4 { - return &NullableV1UpdateVPCNetworkRangeIPv4{value: val, isSet: true} -} - -func (v NullableV1UpdateVPCNetworkRangeIPv4) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableV1UpdateVPCNetworkRangeIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_v1_update_vpc_network_range_ipv4_ip_version.go b/services/iaas/v2alpha1api/model_v1_update_vpc_network_range_ipv4_ip_version.go deleted file mode 100644 index e9f47d37c1..0000000000 --- a/services/iaas/v2alpha1api/model_v1_update_vpc_network_range_ipv4_ip_version.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// V1UpdateVPCNetworkRangeIPv4IpVersion The IP version of the network range being updated. -type V1UpdateVPCNetworkRangeIPv4IpVersion string - -// List of v1UpdateVPCNetworkRangeIPv4_ipVersion -const ( - V1UPDATEVPCNETWORKRANGEIPV4IPVERSION_IPV4 V1UpdateVPCNetworkRangeIPv4IpVersion = "ipv4" - V1UPDATEVPCNETWORKRANGEIPV4IPVERSION_UNKNOWN_DEFAULT_OPEN_API V1UpdateVPCNetworkRangeIPv4IpVersion = "unknown_default_open_api" -) - -// All allowed values of V1UpdateVPCNetworkRangeIPv4IpVersion enum -var AllowedV1UpdateVPCNetworkRangeIPv4IpVersionEnumValues = []V1UpdateVPCNetworkRangeIPv4IpVersion{ - "ipv4", - "unknown_default_open_api", -} - -func (v *V1UpdateVPCNetworkRangeIPv4IpVersion) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := V1UpdateVPCNetworkRangeIPv4IpVersion(value) - for _, existing := range AllowedV1UpdateVPCNetworkRangeIPv4IpVersionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = V1UPDATEVPCNETWORKRANGEIPV4IPVERSION_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewV1UpdateVPCNetworkRangeIPv4IpVersionFromValue returns a pointer to a valid V1UpdateVPCNetworkRangeIPv4IpVersion -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewV1UpdateVPCNetworkRangeIPv4IpVersionFromValue(v string) (*V1UpdateVPCNetworkRangeIPv4IpVersion, error) { - ev := V1UpdateVPCNetworkRangeIPv4IpVersion(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for V1UpdateVPCNetworkRangeIPv4IpVersion: valid values are %v", v, AllowedV1UpdateVPCNetworkRangeIPv4IpVersionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v V1UpdateVPCNetworkRangeIPv4IpVersion) IsValid() bool { - for _, existing := range AllowedV1UpdateVPCNetworkRangeIPv4IpVersionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to v1UpdateVPCNetworkRangeIPv4_ipVersion value -func (v V1UpdateVPCNetworkRangeIPv4IpVersion) Ptr() *V1UpdateVPCNetworkRangeIPv4IpVersion { - return &v -} - -type NullableV1UpdateVPCNetworkRangeIPv4IpVersion struct { - value *V1UpdateVPCNetworkRangeIPv4IpVersion - isSet bool -} - -func (v NullableV1UpdateVPCNetworkRangeIPv4IpVersion) Get() *V1UpdateVPCNetworkRangeIPv4IpVersion { - return v.value -} - -func (v *NullableV1UpdateVPCNetworkRangeIPv4IpVersion) Set(val *V1UpdateVPCNetworkRangeIPv4IpVersion) { - v.value = val - v.isSet = true -} - -func (v NullableV1UpdateVPCNetworkRangeIPv4IpVersion) IsSet() bool { - return v.isSet -} - -func (v *NullableV1UpdateVPCNetworkRangeIPv4IpVersion) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableV1UpdateVPCNetworkRangeIPv4IpVersion(val *V1UpdateVPCNetworkRangeIPv4IpVersion) *NullableV1UpdateVPCNetworkRangeIPv4IpVersion { - return &NullableV1UpdateVPCNetworkRangeIPv4IpVersion{value: val, isSet: true} -} - -func (v NullableV1UpdateVPCNetworkRangeIPv4IpVersion) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableV1UpdateVPCNetworkRangeIPv4IpVersion) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc.go b/services/iaas/v2alpha1api/model_vpc.go deleted file mode 100644 index 9163d47d8c..0000000000 --- a/services/iaas/v2alpha1api/model_vpc.go +++ /dev/null @@ -1,349 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the VPC type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VPC{} - -// VPC Object that represents a VPC. Filterable Fields: `name`. -type VPC struct { - // Date-time when resource was created. - CreatedAt time.Time `json:"createdAt"` - // Description Object. Allows string up to 255 Characters. - Description string `json:"description"` - // Universally Unique Identifier (UUID). - Id string `json:"id" 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels"` - // 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]+)*$"` - // Universally Unique Identifier (UUID). - ProjectId string `json:"projectId" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` - // Date-time when resource was last updated. - UpdatedAt time.Time `json:"updatedAt"` - AdditionalProperties map[string]interface{} -} - -type _VPC VPC - -// NewVPC instantiates a new VPC 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 NewVPC(createdAt time.Time, description string, id string, labels map[string]interface{}, name string, projectId string, updatedAt time.Time) *VPC { - this := VPC{} - this.CreatedAt = createdAt - this.Description = description - this.Id = id - this.Labels = labels - this.Name = name - this.ProjectId = projectId - this.UpdatedAt = updatedAt - return &this -} - -// NewVPCWithDefaults instantiates a new VPC 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 NewVPCWithDefaults() *VPC { - this := VPC{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *VPC) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *VPC) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *VPC) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetDescription returns the Description field value -func (o *VPC) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *VPC) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *VPC) SetDescription(v string) { - o.Description = v -} - -// GetId returns the Id field value -func (o *VPC) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *VPC) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *VPC) SetId(v string) { - o.Id = v -} - -// GetLabels returns the Labels field value -func (o *VPC) GetLabels() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value -// and a boolean to check if the value has been set. -func (o *VPC) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// SetLabels sets field value -func (o *VPC) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *VPC) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *VPC) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *VPC) SetName(v string) { - o.Name = v -} - -// GetProjectId returns the ProjectId field value -func (o *VPC) GetProjectId() string { - if o == nil { - var ret string - return ret - } - - return o.ProjectId -} - -// GetProjectIdOk returns a tuple with the ProjectId field value -// and a boolean to check if the value has been set. -func (o *VPC) GetProjectIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ProjectId, true -} - -// SetProjectId sets field value -func (o *VPC) SetProjectId(v string) { - o.ProjectId = v -} - -// GetUpdatedAt returns the UpdatedAt field value -func (o *VPC) GetUpdatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value -// and a boolean to check if the value has been set. -func (o *VPC) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.UpdatedAt, true -} - -// SetUpdatedAt sets field value -func (o *VPC) SetUpdatedAt(v time.Time) { - o.UpdatedAt = v -} - -func (o VPC) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VPC) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["createdAt"] = o.CreatedAt - toSerialize["description"] = o.Description - toSerialize["id"] = o.Id - toSerialize["labels"] = o.Labels - toSerialize["name"] = o.Name - toSerialize["projectId"] = o.ProjectId - toSerialize["updatedAt"] = o.UpdatedAt - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *VPC) 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{ - "createdAt", - "description", - "id", - "labels", - "name", - "projectId", - "updatedAt", - } - - 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) - } - } - - varVPC := _VPC{} - - err = json.Unmarshal(data, &varVPC) - - if err != nil { - return err - } - - *o = VPC(varVPC) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "description") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "projectId") - delete(additionalProperties, "updatedAt") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableVPC struct { - value *VPC - isSet bool -} - -func (v NullableVPC) Get() *VPC { - return v.value -} - -func (v *NullableVPC) Set(val *VPC) { - v.value = val - v.isSet = true -} - -func (v NullableVPC) IsSet() bool { - return v.isSet -} - -func (v *NullableVPC) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPC(val *VPC) *NullableVPC { - return &NullableVPC{value: val, isSet: true} -} - -func (v NullableVPC) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPC) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_base_network_range.go b/services/iaas/v2alpha1api/model_vpc_base_network_range.go deleted file mode 100644 index b0a22e61ad..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_base_network_range.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "time" -) - -// checks if the VPCBaseNetworkRange type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VPCBaseNetworkRange{} - -// VPCBaseNetworkRange Contains the common properties of a VPC network range. -type VPCBaseNetworkRange struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status *string `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _VPCBaseNetworkRange VPCBaseNetworkRange - -// NewVPCBaseNetworkRange instantiates a new VPCBaseNetworkRange 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 NewVPCBaseNetworkRange() *VPCBaseNetworkRange { - this := VPCBaseNetworkRange{} - return &this -} - -// NewVPCBaseNetworkRangeWithDefaults instantiates a new VPCBaseNetworkRange 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 NewVPCBaseNetworkRangeWithDefaults() *VPCBaseNetworkRange { - this := VPCBaseNetworkRange{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *VPCBaseNetworkRange) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCBaseNetworkRange) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *VPCBaseNetworkRange) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *VPCBaseNetworkRange) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *VPCBaseNetworkRange) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCBaseNetworkRange) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *VPCBaseNetworkRange) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *VPCBaseNetworkRange) SetDescription(v string) { - o.Description = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *VPCBaseNetworkRange) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCBaseNetworkRange) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *VPCBaseNetworkRange) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *VPCBaseNetworkRange) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *VPCBaseNetworkRange) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *VPCBaseNetworkRange) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *VPCBaseNetworkRange) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *VPCBaseNetworkRange) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *VPCBaseNetworkRange) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCBaseNetworkRange) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *VPCBaseNetworkRange) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *VPCBaseNetworkRange) SetStatus(v string) { - o.Status = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *VPCBaseNetworkRange) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCBaseNetworkRange) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *VPCBaseNetworkRange) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *VPCBaseNetworkRange) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -func (o VPCBaseNetworkRange) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VPCBaseNetworkRange) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *VPCBaseNetworkRange) UnmarshalJSON(data []byte) (err error) { - varVPCBaseNetworkRange := _VPCBaseNetworkRange{} - - err = json.Unmarshal(data, &varVPCBaseNetworkRange) - - if err != nil { - return err - } - - *o = VPCBaseNetworkRange(varVPCBaseNetworkRange) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "description") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "status") - delete(additionalProperties, "updatedAt") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableVPCBaseNetworkRange struct { - value *VPCBaseNetworkRange - isSet bool -} - -func (v NullableVPCBaseNetworkRange) Get() *VPCBaseNetworkRange { - return v.value -} - -func (v *NullableVPCBaseNetworkRange) Set(val *VPCBaseNetworkRange) { - v.value = val - v.isSet = true -} - -func (v NullableVPCBaseNetworkRange) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCBaseNetworkRange) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCBaseNetworkRange(val *VPCBaseNetworkRange) *NullableVPCBaseNetworkRange { - return &NullableVPCBaseNetworkRange{value: val, isSet: true} -} - -func (v NullableVPCBaseNetworkRange) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCBaseNetworkRange) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_list.go b/services/iaas/v2alpha1api/model_vpc_list.go deleted file mode 100644 index 83687cb9fa..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_list.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the VPCList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VPCList{} - -// VPCList VPC list response. -type VPCList struct { - // A list of VPCs. - Items []VPC `json:"items"` - AdditionalProperties map[string]interface{} -} - -type _VPCList VPCList - -// NewVPCList instantiates a new VPCList 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 NewVPCList(items []VPC) *VPCList { - this := VPCList{} - this.Items = items - return &this -} - -// NewVPCListWithDefaults instantiates a new VPCList 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 NewVPCListWithDefaults() *VPCList { - this := VPCList{} - return &this -} - -// GetItems returns the Items field value -func (o *VPCList) GetItems() []VPC { - if o == nil { - var ret []VPC - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *VPCList) GetItemsOk() ([]VPC, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *VPCList) SetItems(v []VPC) { - o.Items = v -} - -func (o VPCList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VPCList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *VPCList) 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{ - "items", - } - - 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) - } - } - - varVPCList := _VPCList{} - - err = json.Unmarshal(data, &varVPCList) - - if err != nil { - return err - } - - *o = VPCList(varVPCList) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "items") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableVPCList struct { - value *VPCList - isSet bool -} - -func (v NullableVPCList) Get() *VPCList { - return v.value -} - -func (v *NullableVPCList) Set(val *VPCList) { - v.value = val - v.isSet = true -} - -func (v NullableVPCList) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCList(val *VPCList) *NullableVPCList { - return &NullableVPCList{value: val, isSet: true} -} - -func (v NullableVPCList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_network_range.go b/services/iaas/v2alpha1api/model_vpc_network_range.go deleted file mode 100644 index 2410ee26c5..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_network_range.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// VPCNetworkRange - A VPC network range. -type VPCNetworkRange struct { - VPCNetworkRangeIPv4 *VPCNetworkRangeIPv4 - VPCNetworkRangeIPv6 *VPCNetworkRangeIPv6 -} - -// VPCNetworkRangeIPv4AsVPCNetworkRange is a convenience function that returns VPCNetworkRangeIPv4 wrapped in VPCNetworkRange -func VPCNetworkRangeIPv4AsVPCNetworkRange(v *VPCNetworkRangeIPv4) VPCNetworkRange { - return VPCNetworkRange{ - VPCNetworkRangeIPv4: v, - } -} - -// VPCNetworkRangeIPv6AsVPCNetworkRange is a convenience function that returns VPCNetworkRangeIPv6 wrapped in VPCNetworkRange -func VPCNetworkRangeIPv6AsVPCNetworkRange(v *VPCNetworkRangeIPv6) VPCNetworkRange { - return VPCNetworkRange{ - VPCNetworkRangeIPv6: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *VPCNetworkRange) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'ipv4' - if jsonDict["ipVersion"] == "ipv4" { - // try to unmarshal JSON data into VPCNetworkRangeIPv4 - err = json.Unmarshal(data, &dst.VPCNetworkRangeIPv4) - if err == nil { - return nil // data stored in dst.VPCNetworkRangeIPv4, return on the first match - } else { - dst.VPCNetworkRangeIPv4 = nil - return fmt.Errorf("failed to unmarshal VPCNetworkRange as VPCNetworkRangeIPv4: %s", err.Error()) - } - } - - // check if the discriminator value is 'ipv6' - if jsonDict["ipVersion"] == "ipv6" { - // try to unmarshal JSON data into VPCNetworkRangeIPv6 - err = json.Unmarshal(data, &dst.VPCNetworkRangeIPv6) - if err == nil { - return nil // data stored in dst.VPCNetworkRangeIPv6, return on the first match - } else { - dst.VPCNetworkRangeIPv6 = nil - return fmt.Errorf("failed to unmarshal VPCNetworkRange as VPCNetworkRangeIPv6: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src VPCNetworkRange) MarshalJSON() ([]byte, error) { - if src.VPCNetworkRangeIPv4 != nil { - return json.Marshal(&src.VPCNetworkRangeIPv4) - } - - if src.VPCNetworkRangeIPv6 != nil { - return json.Marshal(&src.VPCNetworkRangeIPv6) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *VPCNetworkRange) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.VPCNetworkRangeIPv4 != nil { - return obj.VPCNetworkRangeIPv4 - } - - if obj.VPCNetworkRangeIPv6 != nil { - return obj.VPCNetworkRangeIPv6 - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj VPCNetworkRange) GetActualInstanceValue() interface{} { - if obj.VPCNetworkRangeIPv4 != nil { - return *obj.VPCNetworkRangeIPv4 - } - - if obj.VPCNetworkRangeIPv6 != nil { - return *obj.VPCNetworkRangeIPv6 - } - - // all schemas are nil - return nil -} - -type NullableVPCNetworkRange struct { - value *VPCNetworkRange - isSet bool -} - -func (v NullableVPCNetworkRange) Get() *VPCNetworkRange { - return v.value -} - -func (v *NullableVPCNetworkRange) Set(val *VPCNetworkRange) { - v.value = val - v.isSet = true -} - -func (v NullableVPCNetworkRange) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCNetworkRange) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCNetworkRange(val *VPCNetworkRange) *NullableVPCNetworkRange { - return &NullableVPCNetworkRange{value: val, isSet: true} -} - -func (v NullableVPCNetworkRange) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCNetworkRange) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_network_range_ipv4.go b/services/iaas/v2alpha1api/model_vpc_network_range_ipv4.go deleted file mode 100644 index f82d3ea721..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_network_range_ipv4.go +++ /dev/null @@ -1,590 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the VPCNetworkRangeIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VPCNetworkRangeIPv4{} - -// VPCNetworkRangeIPv4 Contains the IPv4 properties of a VPC network range. -type VPCNetworkRangeIPv4 struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status *string `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - // The default prefix length for network ranges in the VPC. - DefaultPrefixLen *int64 `json:"defaultPrefixLen,omitempty"` - IpVersion VPCNetworkRangeIPv4AllOfIpVersion `json:"ipVersion"` - // The maximal prefix length for network ranges in the VPC. - MaxPrefixLen *int64 `json:"maxPrefixLen,omitempty"` - // The minimal prefix length for network ranges in the VPC. - MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` - AdditionalProperties map[string]interface{} -} - -type _VPCNetworkRangeIPv4 VPCNetworkRangeIPv4 - -// NewVPCNetworkRangeIPv4 instantiates a new VPCNetworkRangeIPv4 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 NewVPCNetworkRangeIPv4(ipVersion VPCNetworkRangeIPv4AllOfIpVersion, prefix string) *VPCNetworkRangeIPv4 { - this := VPCNetworkRangeIPv4{} - var defaultPrefixLen int64 = 25 - this.DefaultPrefixLen = &defaultPrefixLen - this.IpVersion = ipVersion - var maxPrefixLen int64 = 29 - this.MaxPrefixLen = &maxPrefixLen - var minPrefixLen int64 = 24 - this.MinPrefixLen = &minPrefixLen - this.Prefix = prefix - return &this -} - -// NewVPCNetworkRangeIPv4WithDefaults instantiates a new VPCNetworkRangeIPv4 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 NewVPCNetworkRangeIPv4WithDefaults() *VPCNetworkRangeIPv4 { - this := VPCNetworkRangeIPv4{} - var defaultPrefixLen int64 = 25 - this.DefaultPrefixLen = &defaultPrefixLen - var maxPrefixLen int64 = 29 - this.MaxPrefixLen = &maxPrefixLen - var minPrefixLen int64 = 24 - this.MinPrefixLen = &minPrefixLen - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *VPCNetworkRangeIPv4) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *VPCNetworkRangeIPv4) SetDescription(v string) { - o.Description = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *VPCNetworkRangeIPv4) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *VPCNetworkRangeIPv4) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *VPCNetworkRangeIPv4) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *VPCNetworkRangeIPv4) SetStatus(v string) { - o.Status = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *VPCNetworkRangeIPv4) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetDefaultPrefixLen() int64 { - if o == nil || IsNil(o.DefaultPrefixLen) { - var ret int64 - return ret - } - return *o.DefaultPrefixLen -} - -// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetDefaultPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.DefaultPrefixLen) { - return nil, false - } - return o.DefaultPrefixLen, true -} - -// HasDefaultPrefixLen returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasDefaultPrefixLen() bool { - if o != nil && !IsNil(o.DefaultPrefixLen) { - return true - } - - return false -} - -// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. -func (o *VPCNetworkRangeIPv4) SetDefaultPrefixLen(v int64) { - o.DefaultPrefixLen = &v -} - -// GetIpVersion returns the IpVersion field value -func (o *VPCNetworkRangeIPv4) GetIpVersion() VPCNetworkRangeIPv4AllOfIpVersion { - if o == nil { - var ret VPCNetworkRangeIPv4AllOfIpVersion - return ret - } - - return o.IpVersion -} - -// GetIpVersionOk returns a tuple with the IpVersion field value -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetIpVersionOk() (*VPCNetworkRangeIPv4AllOfIpVersion, bool) { - if o == nil { - return nil, false - } - return &o.IpVersion, true -} - -// SetIpVersion sets field value -func (o *VPCNetworkRangeIPv4) SetIpVersion(v VPCNetworkRangeIPv4AllOfIpVersion) { - o.IpVersion = v -} - -// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetMaxPrefixLen() int64 { - if o == nil || IsNil(o.MaxPrefixLen) { - var ret int64 - return ret - } - return *o.MaxPrefixLen -} - -// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetMaxPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MaxPrefixLen) { - return nil, false - } - return o.MaxPrefixLen, true -} - -// HasMaxPrefixLen returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasMaxPrefixLen() bool { - if o != nil && !IsNil(o.MaxPrefixLen) { - return true - } - - return false -} - -// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. -func (o *VPCNetworkRangeIPv4) SetMaxPrefixLen(v int64) { - o.MaxPrefixLen = &v -} - -// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetMinPrefixLen() int64 { - if o == nil || IsNil(o.MinPrefixLen) { - var ret int64 - return ret - } - return *o.MinPrefixLen -} - -// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetMinPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MinPrefixLen) { - return nil, false - } - return o.MinPrefixLen, true -} - -// HasMinPrefixLen returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasMinPrefixLen() bool { - if o != nil && !IsNil(o.MinPrefixLen) { - return true - } - - return false -} - -// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. -func (o *VPCNetworkRangeIPv4) SetMinPrefixLen(v int64) { - o.MinPrefixLen = &v -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv4) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv4) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *VPCNetworkRangeIPv4) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefix returns the Prefix field value -func (o *VPCNetworkRangeIPv4) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv4) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *VPCNetworkRangeIPv4) SetPrefix(v string) { - o.Prefix = v -} - -func (o VPCNetworkRangeIPv4) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VPCNetworkRangeIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - if !IsNil(o.DefaultPrefixLen) { - toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen - } - toSerialize["ipVersion"] = o.IpVersion - if !IsNil(o.MaxPrefixLen) { - toSerialize["maxPrefixLen"] = o.MaxPrefixLen - } - if !IsNil(o.MinPrefixLen) { - toSerialize["minPrefixLen"] = o.MinPrefixLen - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefix"] = o.Prefix - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *VPCNetworkRangeIPv4) 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{ - "ipVersion", - "prefix", - } - - 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) - } - } - - varVPCNetworkRangeIPv4 := _VPCNetworkRangeIPv4{} - - err = json.Unmarshal(data, &varVPCNetworkRangeIPv4) - - if err != nil { - return err - } - - *o = VPCNetworkRangeIPv4(varVPCNetworkRangeIPv4) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "description") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "status") - delete(additionalProperties, "updatedAt") - delete(additionalProperties, "defaultPrefixLen") - delete(additionalProperties, "ipVersion") - delete(additionalProperties, "maxPrefixLen") - delete(additionalProperties, "minPrefixLen") - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefix") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableVPCNetworkRangeIPv4 struct { - value *VPCNetworkRangeIPv4 - isSet bool -} - -func (v NullableVPCNetworkRangeIPv4) Get() *VPCNetworkRangeIPv4 { - return v.value -} - -func (v *NullableVPCNetworkRangeIPv4) Set(val *VPCNetworkRangeIPv4) { - v.value = val - v.isSet = true -} - -func (v NullableVPCNetworkRangeIPv4) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCNetworkRangeIPv4) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCNetworkRangeIPv4(val *VPCNetworkRangeIPv4) *NullableVPCNetworkRangeIPv4 { - return &NullableVPCNetworkRangeIPv4{value: val, isSet: true} -} - -func (v NullableVPCNetworkRangeIPv4) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCNetworkRangeIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_network_range_ipv4_all_of_ip_version.go b/services/iaas/v2alpha1api/model_vpc_network_range_ipv4_all_of_ip_version.go deleted file mode 100644 index b7c37850b6..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_network_range_ipv4_all_of_ip_version.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// VPCNetworkRangeIPv4AllOfIpVersion the model 'VPCNetworkRangeIPv4AllOfIpVersion' -type VPCNetworkRangeIPv4AllOfIpVersion string - -// List of VPCNetworkRangeIPv4_allOf_ipVersion -const ( - VPCNETWORKRANGEIPV4ALLOFIPVERSION_IPV4 VPCNetworkRangeIPv4AllOfIpVersion = "ipv4" - VPCNETWORKRANGEIPV4ALLOFIPVERSION_UNKNOWN_DEFAULT_OPEN_API VPCNetworkRangeIPv4AllOfIpVersion = "unknown_default_open_api" -) - -// All allowed values of VPCNetworkRangeIPv4AllOfIpVersion enum -var AllowedVPCNetworkRangeIPv4AllOfIpVersionEnumValues = []VPCNetworkRangeIPv4AllOfIpVersion{ - "ipv4", - "unknown_default_open_api", -} - -func (v *VPCNetworkRangeIPv4AllOfIpVersion) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := VPCNetworkRangeIPv4AllOfIpVersion(value) - for _, existing := range AllowedVPCNetworkRangeIPv4AllOfIpVersionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = VPCNETWORKRANGEIPV4ALLOFIPVERSION_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewVPCNetworkRangeIPv4AllOfIpVersionFromValue returns a pointer to a valid VPCNetworkRangeIPv4AllOfIpVersion -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewVPCNetworkRangeIPv4AllOfIpVersionFromValue(v string) (*VPCNetworkRangeIPv4AllOfIpVersion, error) { - ev := VPCNetworkRangeIPv4AllOfIpVersion(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for VPCNetworkRangeIPv4AllOfIpVersion: valid values are %v", v, AllowedVPCNetworkRangeIPv4AllOfIpVersionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v VPCNetworkRangeIPv4AllOfIpVersion) IsValid() bool { - for _, existing := range AllowedVPCNetworkRangeIPv4AllOfIpVersionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to VPCNetworkRangeIPv4_allOf_ipVersion value -func (v VPCNetworkRangeIPv4AllOfIpVersion) Ptr() *VPCNetworkRangeIPv4AllOfIpVersion { - return &v -} - -type NullableVPCNetworkRangeIPv4AllOfIpVersion struct { - value *VPCNetworkRangeIPv4AllOfIpVersion - isSet bool -} - -func (v NullableVPCNetworkRangeIPv4AllOfIpVersion) Get() *VPCNetworkRangeIPv4AllOfIpVersion { - return v.value -} - -func (v *NullableVPCNetworkRangeIPv4AllOfIpVersion) Set(val *VPCNetworkRangeIPv4AllOfIpVersion) { - v.value = val - v.isSet = true -} - -func (v NullableVPCNetworkRangeIPv4AllOfIpVersion) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCNetworkRangeIPv4AllOfIpVersion) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCNetworkRangeIPv4AllOfIpVersion(val *VPCNetworkRangeIPv4AllOfIpVersion) *NullableVPCNetworkRangeIPv4AllOfIpVersion { - return &NullableVPCNetworkRangeIPv4AllOfIpVersion{value: val, isSet: true} -} - -func (v NullableVPCNetworkRangeIPv4AllOfIpVersion) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCNetworkRangeIPv4AllOfIpVersion) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_network_range_ipv6.go b/services/iaas/v2alpha1api/model_vpc_network_range_ipv6.go deleted file mode 100644 index 70a95c9f56..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_network_range_ipv6.go +++ /dev/null @@ -1,578 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the VPCNetworkRangeIPv6 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VPCNetworkRangeIPv6{} - -// VPCNetworkRangeIPv6 Contains the IPv6 properties of a VPC network range. -type VPCNetworkRangeIPv6 struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status *string `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - // The ipv6 prefix lengths for subnets or network ranges in the VPC. - DefaultPrefixLen *int64 `json:"defaultPrefixLen,omitempty"` - IpVersion VPCNetworkRangeIPv6AllOfIpVersion `json:"ipVersion"` - // The ipv6 prefix lengths for subnets or network ranges in the VPC. - MaxPrefixLen *int64 `json:"maxPrefixLen,omitempty"` - // The ipv6 prefix lengths for subnets or network ranges in the VPC. - MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers []string `json:"nameservers,omitempty"` - // Classless Inter-Domain Routing (CIDR) for IPv6. - Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` - AdditionalProperties map[string]interface{} -} - -type _VPCNetworkRangeIPv6 VPCNetworkRangeIPv6 - -// NewVPCNetworkRangeIPv6 instantiates a new VPCNetworkRangeIPv6 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 NewVPCNetworkRangeIPv6(ipVersion VPCNetworkRangeIPv6AllOfIpVersion, prefix string) *VPCNetworkRangeIPv6 { - this := VPCNetworkRangeIPv6{} - this.IpVersion = ipVersion - this.Prefix = prefix - return &this -} - -// NewVPCNetworkRangeIPv6WithDefaults instantiates a new VPCNetworkRangeIPv6 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 NewVPCNetworkRangeIPv6WithDefaults() *VPCNetworkRangeIPv6 { - this := VPCNetworkRangeIPv6{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *VPCNetworkRangeIPv6) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *VPCNetworkRangeIPv6) SetDescription(v string) { - o.Description = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *VPCNetworkRangeIPv6) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *VPCNetworkRangeIPv6) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *VPCNetworkRangeIPv6) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *VPCNetworkRangeIPv6) SetStatus(v string) { - o.Status = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *VPCNetworkRangeIPv6) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetDefaultPrefixLen() int64 { - if o == nil || IsNil(o.DefaultPrefixLen) { - var ret int64 - return ret - } - return *o.DefaultPrefixLen -} - -// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetDefaultPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.DefaultPrefixLen) { - return nil, false - } - return o.DefaultPrefixLen, true -} - -// HasDefaultPrefixLen returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasDefaultPrefixLen() bool { - if o != nil && !IsNil(o.DefaultPrefixLen) { - return true - } - - return false -} - -// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. -func (o *VPCNetworkRangeIPv6) SetDefaultPrefixLen(v int64) { - o.DefaultPrefixLen = &v -} - -// GetIpVersion returns the IpVersion field value -func (o *VPCNetworkRangeIPv6) GetIpVersion() VPCNetworkRangeIPv6AllOfIpVersion { - if o == nil { - var ret VPCNetworkRangeIPv6AllOfIpVersion - return ret - } - - return o.IpVersion -} - -// GetIpVersionOk returns a tuple with the IpVersion field value -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetIpVersionOk() (*VPCNetworkRangeIPv6AllOfIpVersion, bool) { - if o == nil { - return nil, false - } - return &o.IpVersion, true -} - -// SetIpVersion sets field value -func (o *VPCNetworkRangeIPv6) SetIpVersion(v VPCNetworkRangeIPv6AllOfIpVersion) { - o.IpVersion = v -} - -// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetMaxPrefixLen() int64 { - if o == nil || IsNil(o.MaxPrefixLen) { - var ret int64 - return ret - } - return *o.MaxPrefixLen -} - -// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetMaxPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MaxPrefixLen) { - return nil, false - } - return o.MaxPrefixLen, true -} - -// HasMaxPrefixLen returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasMaxPrefixLen() bool { - if o != nil && !IsNil(o.MaxPrefixLen) { - return true - } - - return false -} - -// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. -func (o *VPCNetworkRangeIPv6) SetMaxPrefixLen(v int64) { - o.MaxPrefixLen = &v -} - -// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetMinPrefixLen() int64 { - if o == nil || IsNil(o.MinPrefixLen) { - var ret int64 - return ret - } - return *o.MinPrefixLen -} - -// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetMinPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MinPrefixLen) { - return nil, false - } - return o.MinPrefixLen, true -} - -// HasMinPrefixLen returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasMinPrefixLen() bool { - if o != nil && !IsNil(o.MinPrefixLen) { - return true - } - - return false -} - -// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. -func (o *VPCNetworkRangeIPv6) SetMinPrefixLen(v int64) { - o.MinPrefixLen = &v -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *VPCNetworkRangeIPv6) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret - } - return o.Nameservers -} - -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true -} - -// HasNameservers returns a boolean if a field has been set. -func (o *VPCNetworkRangeIPv6) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true - } - - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *VPCNetworkRangeIPv6) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefix returns the Prefix field value -func (o *VPCNetworkRangeIPv6) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeIPv6) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *VPCNetworkRangeIPv6) SetPrefix(v string) { - o.Prefix = v -} - -func (o VPCNetworkRangeIPv6) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VPCNetworkRangeIPv6) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - if !IsNil(o.DefaultPrefixLen) { - toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen - } - toSerialize["ipVersion"] = o.IpVersion - if !IsNil(o.MaxPrefixLen) { - toSerialize["maxPrefixLen"] = o.MaxPrefixLen - } - if !IsNil(o.MinPrefixLen) { - toSerialize["minPrefixLen"] = o.MinPrefixLen - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefix"] = o.Prefix - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *VPCNetworkRangeIPv6) 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{ - "ipVersion", - "prefix", - } - - 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) - } - } - - varVPCNetworkRangeIPv6 := _VPCNetworkRangeIPv6{} - - err = json.Unmarshal(data, &varVPCNetworkRangeIPv6) - - if err != nil { - return err - } - - *o = VPCNetworkRangeIPv6(varVPCNetworkRangeIPv6) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "description") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "status") - delete(additionalProperties, "updatedAt") - delete(additionalProperties, "defaultPrefixLen") - delete(additionalProperties, "ipVersion") - delete(additionalProperties, "maxPrefixLen") - delete(additionalProperties, "minPrefixLen") - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefix") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableVPCNetworkRangeIPv6 struct { - value *VPCNetworkRangeIPv6 - isSet bool -} - -func (v NullableVPCNetworkRangeIPv6) Get() *VPCNetworkRangeIPv6 { - return v.value -} - -func (v *NullableVPCNetworkRangeIPv6) Set(val *VPCNetworkRangeIPv6) { - v.value = val - v.isSet = true -} - -func (v NullableVPCNetworkRangeIPv6) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCNetworkRangeIPv6) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCNetworkRangeIPv6(val *VPCNetworkRangeIPv6) *NullableVPCNetworkRangeIPv6 { - return &NullableVPCNetworkRangeIPv6{value: val, isSet: true} -} - -func (v NullableVPCNetworkRangeIPv6) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCNetworkRangeIPv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_network_range_ipv6_all_of_ip_version.go b/services/iaas/v2alpha1api/model_vpc_network_range_ipv6_all_of_ip_version.go deleted file mode 100644 index 1caa93351a..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_network_range_ipv6_all_of_ip_version.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// VPCNetworkRangeIPv6AllOfIpVersion the model 'VPCNetworkRangeIPv6AllOfIpVersion' -type VPCNetworkRangeIPv6AllOfIpVersion string - -// List of VPCNetworkRangeIPv6_allOf_ipVersion -const ( - VPCNETWORKRANGEIPV6ALLOFIPVERSION_IPV6 VPCNetworkRangeIPv6AllOfIpVersion = "ipv6" - VPCNETWORKRANGEIPV6ALLOFIPVERSION_UNKNOWN_DEFAULT_OPEN_API VPCNetworkRangeIPv6AllOfIpVersion = "unknown_default_open_api" -) - -// All allowed values of VPCNetworkRangeIPv6AllOfIpVersion enum -var AllowedVPCNetworkRangeIPv6AllOfIpVersionEnumValues = []VPCNetworkRangeIPv6AllOfIpVersion{ - "ipv6", - "unknown_default_open_api", -} - -func (v *VPCNetworkRangeIPv6AllOfIpVersion) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := VPCNetworkRangeIPv6AllOfIpVersion(value) - for _, existing := range AllowedVPCNetworkRangeIPv6AllOfIpVersionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = VPCNETWORKRANGEIPV6ALLOFIPVERSION_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewVPCNetworkRangeIPv6AllOfIpVersionFromValue returns a pointer to a valid VPCNetworkRangeIPv6AllOfIpVersion -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewVPCNetworkRangeIPv6AllOfIpVersionFromValue(v string) (*VPCNetworkRangeIPv6AllOfIpVersion, error) { - ev := VPCNetworkRangeIPv6AllOfIpVersion(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for VPCNetworkRangeIPv6AllOfIpVersion: valid values are %v", v, AllowedVPCNetworkRangeIPv6AllOfIpVersionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v VPCNetworkRangeIPv6AllOfIpVersion) IsValid() bool { - for _, existing := range AllowedVPCNetworkRangeIPv6AllOfIpVersionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to VPCNetworkRangeIPv6_allOf_ipVersion value -func (v VPCNetworkRangeIPv6AllOfIpVersion) Ptr() *VPCNetworkRangeIPv6AllOfIpVersion { - return &v -} - -type NullableVPCNetworkRangeIPv6AllOfIpVersion struct { - value *VPCNetworkRangeIPv6AllOfIpVersion - isSet bool -} - -func (v NullableVPCNetworkRangeIPv6AllOfIpVersion) Get() *VPCNetworkRangeIPv6AllOfIpVersion { - return v.value -} - -func (v *NullableVPCNetworkRangeIPv6AllOfIpVersion) Set(val *VPCNetworkRangeIPv6AllOfIpVersion) { - v.value = val - v.isSet = true -} - -func (v NullableVPCNetworkRangeIPv6AllOfIpVersion) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCNetworkRangeIPv6AllOfIpVersion) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCNetworkRangeIPv6AllOfIpVersion(val *VPCNetworkRangeIPv6AllOfIpVersion) *NullableVPCNetworkRangeIPv6AllOfIpVersion { - return &NullableVPCNetworkRangeIPv6AllOfIpVersion{value: val, isSet: true} -} - -func (v NullableVPCNetworkRangeIPv6AllOfIpVersion) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCNetworkRangeIPv6AllOfIpVersion) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_network_range_list.go b/services/iaas/v2alpha1api/model_vpc_network_range_list.go deleted file mode 100644 index 2a12229b50..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_network_range_list.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the VPCNetworkRangeList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VPCNetworkRangeList{} - -// VPCNetworkRangeList VPC Network Range list response. -type VPCNetworkRangeList struct { - // A list of VPC network ranges. - Items []VPCNetworkRange `json:"items"` - AdditionalProperties map[string]interface{} -} - -type _VPCNetworkRangeList VPCNetworkRangeList - -// NewVPCNetworkRangeList instantiates a new VPCNetworkRangeList 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 NewVPCNetworkRangeList(items []VPCNetworkRange) *VPCNetworkRangeList { - this := VPCNetworkRangeList{} - this.Items = items - return &this -} - -// NewVPCNetworkRangeListWithDefaults instantiates a new VPCNetworkRangeList 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 NewVPCNetworkRangeListWithDefaults() *VPCNetworkRangeList { - this := VPCNetworkRangeList{} - return &this -} - -// GetItems returns the Items field value -func (o *VPCNetworkRangeList) GetItems() []VPCNetworkRange { - if o == nil { - var ret []VPCNetworkRange - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *VPCNetworkRangeList) GetItemsOk() ([]VPCNetworkRange, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *VPCNetworkRangeList) SetItems(v []VPCNetworkRange) { - o.Items = v -} - -func (o VPCNetworkRangeList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VPCNetworkRangeList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *VPCNetworkRangeList) 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{ - "items", - } - - 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) - } - } - - varVPCNetworkRangeList := _VPCNetworkRangeList{} - - err = json.Unmarshal(data, &varVPCNetworkRangeList) - - if err != nil { - return err - } - - *o = VPCNetworkRangeList(varVPCNetworkRangeList) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "items") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableVPCNetworkRangeList struct { - value *VPCNetworkRangeList - isSet bool -} - -func (v NullableVPCNetworkRangeList) Get() *VPCNetworkRangeList { - return v.value -} - -func (v *NullableVPCNetworkRangeList) Set(val *VPCNetworkRangeList) { - v.value = val - v.isSet = true -} - -func (v NullableVPCNetworkRangeList) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCNetworkRangeList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCNetworkRangeList(val *VPCNetworkRangeList) *NullableVPCNetworkRangeList { - return &NullableVPCNetworkRangeList{value: val, isSet: true} -} - -func (v NullableVPCNetworkRangeList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCNetworkRangeList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_routing_table.go b/services/iaas/v2alpha1api/model_vpc_routing_table.go deleted file mode 100644 index 99d33c3362..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_routing_table.go +++ /dev/null @@ -1,443 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the VPCRoutingTable type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VPCRoutingTable{} - -// VPCRoutingTable An object representing a VPC routing table. Filterable Fields: `createdAt`, `dynamicRoutes`, `name`, `systemRoutes`, `updatedAt`. -type VPCRoutingTable struct { - // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - // A config setting for a routing table which allows propagation of dynamic routes to this routing table. - DynamicRoutes *bool `json:"dynamicRoutes,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,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]+)*$"` - // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes *bool `json:"systemRoutes,omitempty"` - // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _VPCRoutingTable VPCRoutingTable - -// NewVPCRoutingTable instantiates a new VPCRoutingTable 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 NewVPCRoutingTable(name string) *VPCRoutingTable { - this := VPCRoutingTable{} - var dynamicRoutes bool = true - this.DynamicRoutes = &dynamicRoutes - this.Name = name - var systemRoutes bool = true - this.SystemRoutes = &systemRoutes - return &this -} - -// NewVPCRoutingTableWithDefaults instantiates a new VPCRoutingTable 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 NewVPCRoutingTableWithDefaults() *VPCRoutingTable { - this := VPCRoutingTable{} - var dynamicRoutes bool = true - this.DynamicRoutes = &dynamicRoutes - var systemRoutes bool = true - this.SystemRoutes = &systemRoutes - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *VPCRoutingTable) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCRoutingTable) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *VPCRoutingTable) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *VPCRoutingTable) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *VPCRoutingTable) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCRoutingTable) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *VPCRoutingTable) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *VPCRoutingTable) SetDescription(v string) { - o.Description = &v -} - -// GetDynamicRoutes returns the DynamicRoutes field value if set, zero value otherwise. -func (o *VPCRoutingTable) GetDynamicRoutes() bool { - if o == nil || IsNil(o.DynamicRoutes) { - var ret bool - return ret - } - return *o.DynamicRoutes -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCRoutingTable) GetDynamicRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.DynamicRoutes) { - return nil, false - } - return o.DynamicRoutes, true -} - -// HasDynamicRoutes returns a boolean if a field has been set. -func (o *VPCRoutingTable) HasDynamicRoutes() bool { - if o != nil && !IsNil(o.DynamicRoutes) { - return true - } - - return false -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -func (o *VPCRoutingTable) SetDynamicRoutes(v bool) { - o.DynamicRoutes = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *VPCRoutingTable) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCRoutingTable) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *VPCRoutingTable) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *VPCRoutingTable) SetId(v string) { - o.Id = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *VPCRoutingTable) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - 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 *VPCRoutingTable) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *VPCRoutingTable) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *VPCRoutingTable) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *VPCRoutingTable) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *VPCRoutingTable) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *VPCRoutingTable) SetName(v string) { - o.Name = v -} - -// GetSystemRoutes returns the SystemRoutes field value if set, zero value otherwise. -func (o *VPCRoutingTable) GetSystemRoutes() bool { - if o == nil || IsNil(o.SystemRoutes) { - var ret bool - return ret - } - return *o.SystemRoutes -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCRoutingTable) GetSystemRoutesOk() (*bool, bool) { - if o == nil || IsNil(o.SystemRoutes) { - return nil, false - } - return o.SystemRoutes, true -} - -// HasSystemRoutes returns a boolean if a field has been set. -func (o *VPCRoutingTable) HasSystemRoutes() bool { - if o != nil && !IsNil(o.SystemRoutes) { - return true - } - - return false -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -func (o *VPCRoutingTable) SetSystemRoutes(v bool) { - o.SystemRoutes = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *VPCRoutingTable) GetUpdatedAt() time.Time { - if o == nil || IsNil(o.UpdatedAt) { - var ret time.Time - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VPCRoutingTable) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *VPCRoutingTable) HasUpdatedAt() bool { - if o != nil && !IsNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. -func (o *VPCRoutingTable) SetUpdatedAt(v time.Time) { - o.UpdatedAt = &v -} - -func (o VPCRoutingTable) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VPCRoutingTable) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["createdAt"] = o.CreatedAt - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.DynamicRoutes) { - toSerialize["dynamicRoutes"] = o.DynamicRoutes - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - if !IsNil(o.SystemRoutes) { - toSerialize["systemRoutes"] = o.SystemRoutes - } - if !IsNil(o.UpdatedAt) { - toSerialize["updatedAt"] = o.UpdatedAt - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *VPCRoutingTable) 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{ - "name", - } - - 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) - } - } - - varVPCRoutingTable := _VPCRoutingTable{} - - err = json.Unmarshal(data, &varVPCRoutingTable) - - if err != nil { - return err - } - - *o = VPCRoutingTable(varVPCRoutingTable) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "createdAt") - delete(additionalProperties, "description") - delete(additionalProperties, "dynamicRoutes") - delete(additionalProperties, "id") - delete(additionalProperties, "labels") - delete(additionalProperties, "name") - delete(additionalProperties, "systemRoutes") - delete(additionalProperties, "updatedAt") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableVPCRoutingTable struct { - value *VPCRoutingTable - isSet bool -} - -func (v NullableVPCRoutingTable) Get() *VPCRoutingTable { - return v.value -} - -func (v *NullableVPCRoutingTable) Set(val *VPCRoutingTable) { - v.value = val - v.isSet = true -} - -func (v NullableVPCRoutingTable) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCRoutingTable) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCRoutingTable(val *VPCRoutingTable) *NullableVPCRoutingTable { - return &NullableVPCRoutingTable{value: val, isSet: true} -} - -func (v NullableVPCRoutingTable) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCRoutingTable) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/model_vpc_routing_table_list.go b/services/iaas/v2alpha1api/model_vpc_routing_table_list.go deleted file mode 100644 index 19cda156c0..0000000000 --- a/services/iaas/v2alpha1api/model_vpc_routing_table_list.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the VPCRoutingTableList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VPCRoutingTableList{} - -// VPCRoutingTableList VPC Routing table response. -type VPCRoutingTableList struct { - // A list of VPC routing tables. - Items []VPCRoutingTable `json:"items"` - AdditionalProperties map[string]interface{} -} - -type _VPCRoutingTableList VPCRoutingTableList - -// NewVPCRoutingTableList instantiates a new VPCRoutingTableList 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 NewVPCRoutingTableList(items []VPCRoutingTable) *VPCRoutingTableList { - this := VPCRoutingTableList{} - this.Items = items - return &this -} - -// NewVPCRoutingTableListWithDefaults instantiates a new VPCRoutingTableList 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 NewVPCRoutingTableListWithDefaults() *VPCRoutingTableList { - this := VPCRoutingTableList{} - return &this -} - -// GetItems returns the Items field value -func (o *VPCRoutingTableList) GetItems() []VPCRoutingTable { - if o == nil { - var ret []VPCRoutingTable - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *VPCRoutingTableList) GetItemsOk() ([]VPCRoutingTable, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *VPCRoutingTableList) SetItems(v []VPCRoutingTable) { - o.Items = v -} - -func (o VPCRoutingTableList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VPCRoutingTableList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *VPCRoutingTableList) 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{ - "items", - } - - 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) - } - } - - varVPCRoutingTableList := _VPCRoutingTableList{} - - err = json.Unmarshal(data, &varVPCRoutingTableList) - - if err != nil { - return err - } - - *o = VPCRoutingTableList(varVPCRoutingTableList) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "items") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableVPCRoutingTableList struct { - value *VPCRoutingTableList - isSet bool -} - -func (v NullableVPCRoutingTableList) Get() *VPCRoutingTableList { - return v.value -} - -func (v *NullableVPCRoutingTableList) Set(val *VPCRoutingTableList) { - v.value = val - v.isSet = true -} - -func (v NullableVPCRoutingTableList) IsSet() bool { - return v.isSet -} - -func (v *NullableVPCRoutingTableList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVPCRoutingTableList(val *VPCRoutingTableList) *NullableVPCRoutingTableList { - return &NullableVPCRoutingTableList{value: val, isSet: true} -} - -func (v NullableVPCRoutingTableList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVPCRoutingTableList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2alpha1api/response.go b/services/iaas/v2alpha1api/response.go deleted file mode 100644 index 457491fdd7..0000000000 --- a/services/iaas/v2alpha1api/response.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/services/iaas/v2alpha1api/utils.go b/services/iaas/v2alpha1api/utils.go deleted file mode 100644 index 9be25988eb..0000000000 --- a/services/iaas/v2alpha1api/utils.go +++ /dev/null @@ -1,362 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2alpha1api - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} diff --git a/services/iaas/v2alpha1api/wait/wait.go b/services/iaas/v2alpha1api/wait/wait.go deleted file mode 100644 index 82dc70599a..0000000000 --- a/services/iaas/v2alpha1api/wait/wait.go +++ /dev/null @@ -1,123 +0,0 @@ -package wait - -import ( - "context" - "errors" - "net/http" - "time" - - "github.com/stackitcloud/stackit-sdk-go/core/wait" - iaas "github.com/stackitcloud/stackit-sdk-go/services/iaas/v2alpha1api" -) - -const ( - CreateSuccess = "CREATED" - UpdateSuccess = "UPDATED" - FailedStatus = "FAILED" -) - -// CreateVPCRegionWaitHandler will wait for network area region creation -func CreateVPCRegionWaitHandler(ctx context.Context, a iaas.DefaultAPI, projectId, vpcId, region string) *wait.AsyncActionHandler[iaas.RegionalVPC] { - waitConfig := wait.WaiterHelper[iaas.RegionalVPC, string]{ - FetchInstance: a.GetVPCRegion(ctx, projectId, vpcId, region).Execute, - GetState: getStateVPCRegion, - ActiveState: []string{CreateSuccess}, - ErrorState: []string{FailedStatus}, - } - - handler := wait.New(waitConfig.Wait()) - handler.SetSleepBeforeWait(2 * time.Second) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// DeleteVPCRegionWaitHandler will wait for network area region deletion -func DeleteVPCRegionWaitHandler(ctx context.Context, a iaas.DefaultAPI, projectId, vpcId, region string) *wait.AsyncActionHandler[iaas.RegionalVPC] { - waitConfig := wait.WaiterHelper[iaas.RegionalVPC, string]{ - FetchInstance: a.GetVPCRegion(ctx, projectId, vpcId, region).Execute, - GetState: getStateVPCRegion, - ActiveState: []string{}, - ErrorState: []string{FailedStatus}, - - // The IaaS API response with a 400 if the regional network area configuration doesn't exist because of some compatible - // issues to v1. When v1 is deprecated, they probably will respond with 404 - DeleteHttpErrorStatusCodes: []int{http.StatusBadRequest, http.StatusNotFound}, - } - - handler := wait.New(waitConfig.Wait()) - handler.SetSleepBeforeWait(2 * time.Second) - handler.SetTimeout(30 * time.Minute) - return handler -} - -func createOrUpdateVPCNetworkRangeWaitHandler(ctx context.Context, a iaas.DefaultAPI, projectId, vpcId, region, networkRangeId string) *wait.AsyncActionHandler[iaas.VPCNetworkRange] { - waitConfig := wait.WaiterHelper[iaas.VPCNetworkRange, string]{ - FetchInstance: a.GetVPCNetworkRange(ctx, projectId, vpcId, region, networkRangeId).Execute, - GetState: getStateVPCNetworkRange, - // Usually "CREATED" should be enough as active state. The IaaS API uses "CREATED" always as active state, even after an update. - // To prevent potential issues in the future, we set "UPDATED" also as active state. - ActiveState: []string{CreateSuccess, UpdateSuccess}, - ErrorState: []string{FailedStatus}, - } - - handler := wait.New(waitConfig.Wait()) - handler.SetSleepBeforeWait(5 * time.Second) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// CreateVPCNetworkRangeWaitHandler will wait for VPC Network range creation -func CreateVPCNetworkRangeWaitHandler(ctx context.Context, a iaas.DefaultAPI, projectId, vpcId, region, networkRangeId string) *wait.AsyncActionHandler[iaas.VPCNetworkRange] { - return createOrUpdateVPCNetworkRangeWaitHandler(ctx, a, projectId, vpcId, region, networkRangeId) -} - -// UpdateVPCNetworkRangeWaitHandler will wait for VPC Network range update -func UpdateVPCNetworkRangeWaitHandler(ctx context.Context, a iaas.DefaultAPI, projectId, vpcId, region, networkRangeId string) *wait.AsyncActionHandler[iaas.VPCNetworkRange] { - return createOrUpdateVPCNetworkRangeWaitHandler(ctx, a, projectId, vpcId, region, networkRangeId) -} - -// DeleteVPCNetworkRangeWaitHandler will wait for VPC Network range deletion -func DeleteVPCNetworkRangeWaitHandler(ctx context.Context, a iaas.DefaultAPI, projectId, vpcId, region, networkRangeId string) *wait.AsyncActionHandler[iaas.VPCNetworkRange] { - waitConfig := wait.WaiterHelper[iaas.VPCNetworkRange, string]{ - FetchInstance: a.GetVPCNetworkRange(ctx, projectId, vpcId, region, networkRangeId).Execute, - GetState: getStateVPCNetworkRange, - ErrorState: []string{FailedStatus}, - DeleteHttpErrorStatusCodes: nil, // Use defaults - } - - handler := wait.New(waitConfig.Wait()) - handler.SetSleepBeforeWait(5 * time.Second) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// getStateVPCRegion returns the state of an iaas.RegionalVPC -func getStateVPCRegion(i *iaas.RegionalVPC) (string, error) { - if i == nil { - return "", errors.New("empty response") - } - if i.Status == nil { - return "", errors.New("status is missing in response") - } - return *i.Status, nil -} - -// getStateVPCNetworkRange returns the state of an iaas.VPCNetworkRange -func getStateVPCNetworkRange(i *iaas.VPCNetworkRange) (string, error) { - if i == nil { - return "", errors.New("empty response") - } - if i.VPCNetworkRangeIPv4 != nil { - if i.VPCNetworkRangeIPv4.Status == nil { - return "", errors.New("ipv4 status is missing in response") - } - return *i.VPCNetworkRangeIPv4.Status, nil - } - if i.VPCNetworkRangeIPv6 != nil { - if i.VPCNetworkRangeIPv6.Status == nil { - return "", errors.New("ipv6 status is missing in response") - } - return *i.VPCNetworkRangeIPv6.Status, nil - } - return "", errors.New("unknown status in response") -} diff --git a/services/iaas/v2alpha1api/wait/wait_test.go b/services/iaas/v2alpha1api/wait/wait_test.go deleted file mode 100644 index b2898fa343..0000000000 --- a/services/iaas/v2alpha1api/wait/wait_test.go +++ /dev/null @@ -1,328 +0,0 @@ -package wait - -import ( - "context" - "fmt" - "testing" - "testing/synctest" - "time" - - "github.com/google/go-cmp/cmp" - - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" - "github.com/stackitcloud/stackit-sdk-go/core/utils" - "github.com/stackitcloud/stackit-sdk-go/core/wait" - iaas "github.com/stackitcloud/stackit-sdk-go/services/iaas/v2alpha1api" -) - -type iaasMockSettings struct { - getVPCRegionFails bool - getVPCNetworkRangeFails bool - isDeleted bool - resourceState string -} - -func newIaaSAPIMock(settings *iaasMockSettings) iaas.DefaultAPI { - return &iaas.DefaultAPIServiceMock{ - GetVPCRegionExecuteMock: utils.Ptr(func(_ iaas.ApiGetVPCRegionRequest) (*iaas.RegionalVPC, error) { - if settings.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if settings.getVPCRegionFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.RegionalVPC{ - Status: &settings.resourceState, - }, nil - }), - GetVPCNetworkRangeExecuteMock: utils.Ptr(func(_ iaas.ApiGetVPCNetworkRangeRequest) (*iaas.VPCNetworkRange, error) { - if settings.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if settings.getVPCNetworkRangeFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.VPCNetworkRange{ - VPCNetworkRangeIPv4: &iaas.VPCNetworkRangeIPv4{ - Status: &settings.resourceState, - }, - }, nil - }), - } -} - -func TestCreateNetworkAreaRegionWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "create_succeeded", - getFails: false, - resourceState: CreateSuccess, - wantErr: false, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER STATE", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := newIaaSAPIMock(&iaasMockSettings{ - getVPCRegionFails: tt.getFails, - resourceState: tt.resourceState, - }) - - var wantRes *iaas.RegionalVPC - if tt.wantResp { - wantRes = &iaas.RegionalVPC{ - Status: utils.Ptr(tt.resourceState), - } - } - - handler := CreateVPCRegionWaitHandler(context.Background(), apiClient, "pid", "aid", "region") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).SetSleepBeforeWait(1 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !tt.wantErr && !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestDeleteNetworkAreaRegionWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - isDeleted bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "delete_succeeded", - getFails: false, - isDeleted: true, - wantErr: false, - wantResp: false, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER STATE", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := newIaaSAPIMock(&iaasMockSettings{ - getVPCRegionFails: tt.getFails, - isDeleted: tt.isDeleted, - resourceState: tt.resourceState, - }) - - var wantRes *iaas.RegionalVPC - if tt.wantResp { - wantRes = &iaas.RegionalVPC{ - Status: utils.Ptr(tt.resourceState), - } - } - - handler := DeleteVPCRegionWaitHandler(context.Background(), apiClient, "pid", "region", "nid") - - gotRes, err := handler.SetSleepBeforeWait(0).SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !tt.wantErr && !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestCreateOrUpdateVPCNetworkRangeWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "update_succeeded", - getFails: false, - resourceState: UpdateSuccess, - wantErr: false, - wantResp: true, - }, - { - desc: "create_succeeded", - getFails: false, - resourceState: CreateSuccess, - wantErr: false, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER STATE", - wantErr: true, - wantResp: true, - }, - } - - handlers := map[string]func(context.Context, iaas.DefaultAPI, string, string, string, string) *wait.AsyncActionHandler[iaas.VPCNetworkRange]{ - "common logic": createOrUpdateVPCNetworkRangeWaitHandler, - "create": CreateVPCNetworkRangeWaitHandler, - "update": UpdateVPCNetworkRangeWaitHandler, - } - - for handlerDesc, handlerFn := range handlers { - for _, tt := range tests { - t.Run(fmt.Sprintf("%s - %s", handlerDesc, tt.desc), func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := newIaaSAPIMock(&iaasMockSettings{ - getVPCNetworkRangeFails: tt.getFails, - resourceState: tt.resourceState, - }) - - var wantRes *iaas.VPCNetworkRange - if tt.wantResp { - wantRes = &iaas.VPCNetworkRange{ - VPCNetworkRangeIPv4: &iaas.VPCNetworkRangeIPv4{ - Status: utils.Ptr(tt.resourceState), - }, - } - } - - handler := handlerFn(context.Background(), apiClient, "pid", "vpcId", "region", "nid") - - gotRes, err := handler.WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !tt.wantErr && !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } - } -} - -func TestDeleteVPCNetworkRangeWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - isDeleted bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "delete_succeeded", - getFails: false, - isDeleted: true, - wantErr: false, - wantResp: false, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER STATE", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := newIaaSAPIMock(&iaasMockSettings{ - getVPCNetworkRangeFails: tt.getFails, - isDeleted: tt.isDeleted, - resourceState: tt.resourceState, - }) - - var wantRes *iaas.VPCNetworkRange - if tt.wantResp { - wantRes = &iaas.VPCNetworkRange{ - VPCNetworkRangeIPv4: &iaas.VPCNetworkRangeIPv4{ - Status: utils.Ptr(tt.resourceState), - }, - } - } - - handler := DeleteVPCNetworkRangeWaitHandler(context.Background(), apiClient, "pid", "vpcId", "region", "nid") - - gotRes, err := handler.WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !tt.wantErr && !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} diff --git a/services/iaas/v2api/model_add_routing_table_to_area_payload.go b/services/iaas/v2api/model_add_routing_table_to_area_payload.go index 767bc2c2fe..5f0191f839 100644 --- a/services/iaas/v2api/model_add_routing_table_to_area_payload.go +++ b/services/iaas/v2api/model_add_routing_table_to_area_payload.go @@ -32,7 +32,7 @@ type AddRoutingTableToAreaPayload struct { DynamicRoutes *bool `json:"dynamicRoutes,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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_backup.go b/services/iaas/v2api/model_backup.go index 14fb26f985..5db4ca6006 100644 --- a/services/iaas/v2api/model_backup.go +++ b/services/iaas/v2api/model_backup.go @@ -31,7 +31,7 @@ type Backup struct { 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_create_backup_payload.go b/services/iaas/v2api/model_create_backup_payload.go index 2129493629..10be1e2d59 100644 --- a/services/iaas/v2api/model_create_backup_payload.go +++ b/services/iaas/v2api/model_create_backup_payload.go @@ -23,7 +23,7 @@ var _ MappedNullable = &CreateBackupPayload{} type CreateBackupPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_create_image_payload.go b/services/iaas/v2api/model_create_image_payload.go index 8cba972b8d..708fcaa369 100644 --- a/services/iaas/v2api/model_create_image_payload.go +++ b/services/iaas/v2api/model_create_image_payload.go @@ -33,7 +33,7 @@ type CreateImagePayload struct { 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}$"` // Indicates Image Import Progress in percent. ImportProgress *int64 `json:"importProgress,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v2api/model_create_isolated_network_payload.go b/services/iaas/v2api/model_create_isolated_network_payload.go index 79d4f6d4d0..df72b86d6b 100644 --- a/services/iaas/v2api/model_create_isolated_network_payload.go +++ b/services/iaas/v2api/model_create_isolated_network_payload.go @@ -24,7 +24,7 @@ type CreateIsolatedNetworkPayload struct { // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` Ipv4 *CreateNetworkIPv4 `json:"ipv4,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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_create_key_pair_payload.go b/services/iaas/v2api/model_create_key_pair_payload.go index ac233ba84c..5c0762b8f3 100644 --- a/services/iaas/v2api/model_create_key_pair_payload.go +++ b/services/iaas/v2api/model_create_key_pair_payload.go @@ -26,7 +26,7 @@ type CreateKeyPairPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint *string `json:"fingerprint,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){15}([0-9A-Fa-f]{2})$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` diff --git a/services/iaas/v2api/model_create_network_area_payload.go b/services/iaas/v2api/model_create_network_area_payload.go index a61538035e..65de4bf769 100644 --- a/services/iaas/v2api/model_create_network_area_payload.go +++ b/services/iaas/v2api/model_create_network_area_payload.go @@ -21,7 +21,7 @@ var _ MappedNullable = &CreateNetworkAreaPayload{} // CreateNetworkAreaPayload Object that represents the network area create request. type CreateNetworkAreaPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_create_network_payload.go b/services/iaas/v2api/model_create_network_payload.go index 5e4a3b8a3c..08100442d3 100644 --- a/services/iaas/v2api/model_create_network_payload.go +++ b/services/iaas/v2api/model_create_network_payload.go @@ -21,11 +21,13 @@ var _ MappedNullable = &CreateNetworkPayload{} // CreateNetworkPayload Object that represents the request body for a network create. type CreateNetworkPayload struct { + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` Ipv4 *CreateNetworkIPv4 `json:"ipv4,omitempty"` Ipv6 *CreateNetworkIPv6 `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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]+)*$"` @@ -62,6 +64,38 @@ func NewCreateNetworkPayloadWithDefaults() *CreateNetworkPayload { return &this } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateNetworkPayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateNetworkPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateNetworkPayload) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *CreateNetworkPayload) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -320,6 +354,9 @@ func (o CreateNetworkPayload) MarshalJSON() ([]byte, error) { func (o CreateNetworkPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -385,6 +422,7 @@ func (o *CreateNetworkPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "ipv4") delete(additionalProperties, "ipv6") diff --git a/services/iaas/v2api/model_create_nic_payload.go b/services/iaas/v2api/model_create_nic_payload.go index e6b0834a41..ce1e556685 100644 --- a/services/iaas/v2api/model_create_nic_payload.go +++ b/services/iaas/v2api/model_create_nic_payload.go @@ -13,6 +13,7 @@ package v2api import ( "encoding/json" + "time" ) // checks if the CreateNicPayload type satisfies the MappedNullable interface at compile time @@ -22,6 +23,8 @@ var _ MappedNullable = &CreateNicPayload{} type CreateNicPayload struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` // Universally Unique Identifier (UUID). @@ -32,7 +35,7 @@ type CreateNicPayload struct { Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` @@ -47,7 +50,9 @@ type CreateNicPayload struct { // Possible values: `ACTIVE`, `DOWN`. Status *string `json:"status,omitempty"` // Possible values: `server`, `metadata`, `gateway`, `none`. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -106,6 +111,38 @@ func (o *CreateNicPayload) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreateNicPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNicPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreateNicPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreateNicPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *CreateNicPayload) GetDescription() string { if o == nil || IsNil(o.Description) { @@ -522,6 +559,38 @@ func (o *CreateNicPayload) SetType(v string) { o.Type = &v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreateNicPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNicPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreateNicPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreateNicPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o CreateNicPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -535,6 +604,9 @@ func (o CreateNicPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Description) { toSerialize["description"] = o.Description } @@ -574,6 +646,9 @@ func (o CreateNicPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -597,6 +672,7 @@ func (o *CreateNicPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "description") delete(additionalProperties, "device") delete(additionalProperties, "id") @@ -610,6 +686,7 @@ func (o *CreateNicPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "securityGroups") delete(additionalProperties, "status") delete(additionalProperties, "type") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_create_public_ip_payload.go b/services/iaas/v2api/model_create_public_ip_payload.go index 770ff924ad..48d62e43a9 100644 --- a/services/iaas/v2api/model_create_public_ip_payload.go +++ b/services/iaas/v2api/model_create_public_ip_payload.go @@ -13,6 +13,7 @@ package v2api import ( "encoding/json" + "time" ) // checks if the CreatePublicIPPayload type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &CreatePublicIPPayload{} // CreatePublicIPPayload Object that represents a public IP. type CreatePublicIPPayload struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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}$"` // String that represents an IPv4 address. Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewCreatePublicIPPayloadWithDefaults() *CreatePublicIPPayload { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreatePublicIPPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePublicIPPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreatePublicIPPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *CreatePublicIPPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *CreatePublicIPPayload) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreatePublicIPPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePublicIPPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreatePublicIPPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o CreatePublicIPPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o CreatePublicIPPayload) MarshalJSON() ([]byte, error) { func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *CreatePublicIPPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_create_security_group_payload.go b/services/iaas/v2api/model_create_security_group_payload.go index db6317194d..eff514ef2a 100644 --- a/services/iaas/v2api/model_create_security_group_payload.go +++ b/services/iaas/v2api/model_create_security_group_payload.go @@ -28,7 +28,7 @@ type CreateSecurityGroupPayload struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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_create_server_payload.go b/services/iaas/v2api/model_create_server_payload.go index 8b0e12b351..8e208ce487 100644 --- a/services/iaas/v2api/model_create_server_payload.go +++ b/services/iaas/v2api/model_create_server_payload.go @@ -40,7 +40,7 @@ type CreateServerPayload struct { ImageId *string `json:"imageId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The SSH keypair used during the server creation. KeypairName *string `json:"keypairName,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` diff --git a/services/iaas/v2api/model_create_snapshot_payload.go b/services/iaas/v2api/model_create_snapshot_payload.go index 142601f29f..d4357609e3 100644 --- a/services/iaas/v2api/model_create_snapshot_payload.go +++ b/services/iaas/v2api/model_create_snapshot_payload.go @@ -30,7 +30,7 @@ type CreateSnapshotPayload struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_create_volume_payload.go b/services/iaas/v2api/model_create_volume_payload.go index 52ddf21f63..113a7be87d 100644 --- a/services/iaas/v2api/model_create_volume_payload.go +++ b/services/iaas/v2api/model_create_volume_payload.go @@ -36,7 +36,7 @@ type CreateVolumePayload struct { // 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}$"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_destination_cidrv4.go b/services/iaas/v2api/model_destination_cidrv4.go index 32f9ac9c25..c29f2a3fb8 100644 --- a/services/iaas/v2api/model_destination_cidrv4.go +++ b/services/iaas/v2api/model_destination_cidrv4.go @@ -21,7 +21,7 @@ var _ MappedNullable = &DestinationCIDRv4{} // DestinationCIDRv4 IPv4 Classless Inter-Domain Routing (CIDR) Object. type DestinationCIDRv4 struct { - Type string `json:"type"` + Type DestinationCIDRv4Type `json:"type"` // An CIDRv4 string. Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` AdditionalProperties map[string]interface{} @@ -33,7 +33,7 @@ type _DestinationCIDRv4 DestinationCIDRv4 // 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 NewDestinationCIDRv4(types string, value string) *DestinationCIDRv4 { +func NewDestinationCIDRv4(types DestinationCIDRv4Type, value string) *DestinationCIDRv4 { this := DestinationCIDRv4{} this.Type = types this.Value = value @@ -49,9 +49,9 @@ func NewDestinationCIDRv4WithDefaults() *DestinationCIDRv4 { } // GetType returns the Type field value -func (o *DestinationCIDRv4) GetType() string { +func (o *DestinationCIDRv4) GetType() DestinationCIDRv4Type { if o == nil { - var ret string + var ret DestinationCIDRv4Type return ret } @@ -60,7 +60,7 @@ func (o *DestinationCIDRv4) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *DestinationCIDRv4) GetTypeOk() (*string, bool) { +func (o *DestinationCIDRv4) GetTypeOk() (*DestinationCIDRv4Type, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *DestinationCIDRv4) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *DestinationCIDRv4) SetType(v string) { +func (o *DestinationCIDRv4) SetType(v DestinationCIDRv4Type) { o.Type = v } diff --git a/services/iaas/v2api/model_destination_cidrv4_type.go b/services/iaas/v2api/model_destination_cidrv4_type.go new file mode 100644 index 0000000000..fb53ba6a6f --- /dev/null +++ b/services/iaas/v2api/model_destination_cidrv4_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" +) + +// DestinationCIDRv4Type the model 'DestinationCIDRv4Type' +type DestinationCIDRv4Type string + +// List of DestinationCIDRv4_type +const ( + DESTINATIONCIDRV4TYPE_CIDRV4 DestinationCIDRv4Type = "cidrv4" + DESTINATIONCIDRV4TYPE_UNKNOWN_DEFAULT_OPEN_API DestinationCIDRv4Type = "unknown_default_open_api" +) + +// All allowed values of DestinationCIDRv4Type enum +var AllowedDestinationCIDRv4TypeEnumValues = []DestinationCIDRv4Type{ + "cidrv4", + "unknown_default_open_api", +} + +func (v *DestinationCIDRv4Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DestinationCIDRv4Type(value) + for _, existing := range AllowedDestinationCIDRv4TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = DESTINATIONCIDRV4TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewDestinationCIDRv4TypeFromValue returns a pointer to a valid DestinationCIDRv4Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDestinationCIDRv4TypeFromValue(v string) (*DestinationCIDRv4Type, error) { + ev := DestinationCIDRv4Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DestinationCIDRv4Type: valid values are %v", v, AllowedDestinationCIDRv4TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DestinationCIDRv4Type) IsValid() bool { + for _, existing := range AllowedDestinationCIDRv4TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DestinationCIDRv4_type value +func (v DestinationCIDRv4Type) Ptr() *DestinationCIDRv4Type { + return &v +} + +type NullableDestinationCIDRv4Type struct { + value *DestinationCIDRv4Type + isSet bool +} + +func (v NullableDestinationCIDRv4Type) Get() *DestinationCIDRv4Type { + return v.value +} + +func (v *NullableDestinationCIDRv4Type) Set(val *DestinationCIDRv4Type) { + v.value = val + v.isSet = true +} + +func (v NullableDestinationCIDRv4Type) IsSet() bool { + return v.isSet +} + +func (v *NullableDestinationCIDRv4Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDestinationCIDRv4Type(val *DestinationCIDRv4Type) *NullableDestinationCIDRv4Type { + return &NullableDestinationCIDRv4Type{value: val, isSet: true} +} + +func (v NullableDestinationCIDRv4Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDestinationCIDRv4Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2api/model_destination_cidrv6.go b/services/iaas/v2api/model_destination_cidrv6.go index c7addf72ae..190476f2f4 100644 --- a/services/iaas/v2api/model_destination_cidrv6.go +++ b/services/iaas/v2api/model_destination_cidrv6.go @@ -21,7 +21,7 @@ var _ MappedNullable = &DestinationCIDRv6{} // DestinationCIDRv6 IPv6 Classless Inter-Domain Routing (CIDR) Object. type DestinationCIDRv6 struct { - Type string `json:"type"` + Type DestinationCIDRv6Type `json:"type"` // An CIDRv6 string. Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} @@ -33,7 +33,7 @@ type _DestinationCIDRv6 DestinationCIDRv6 // 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 NewDestinationCIDRv6(types string, value string) *DestinationCIDRv6 { +func NewDestinationCIDRv6(types DestinationCIDRv6Type, value string) *DestinationCIDRv6 { this := DestinationCIDRv6{} this.Type = types this.Value = value @@ -49,9 +49,9 @@ func NewDestinationCIDRv6WithDefaults() *DestinationCIDRv6 { } // GetType returns the Type field value -func (o *DestinationCIDRv6) GetType() string { +func (o *DestinationCIDRv6) GetType() DestinationCIDRv6Type { if o == nil { - var ret string + var ret DestinationCIDRv6Type return ret } @@ -60,7 +60,7 @@ func (o *DestinationCIDRv6) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *DestinationCIDRv6) GetTypeOk() (*string, bool) { +func (o *DestinationCIDRv6) GetTypeOk() (*DestinationCIDRv6Type, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *DestinationCIDRv6) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *DestinationCIDRv6) SetType(v string) { +func (o *DestinationCIDRv6) SetType(v DestinationCIDRv6Type) { o.Type = v } diff --git a/services/iaas/v2api/model_destination_cidrv6_type.go b/services/iaas/v2api/model_destination_cidrv6_type.go new file mode 100644 index 0000000000..9c415cd3ba --- /dev/null +++ b/services/iaas/v2api/model_destination_cidrv6_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" +) + +// DestinationCIDRv6Type the model 'DestinationCIDRv6Type' +type DestinationCIDRv6Type string + +// List of DestinationCIDRv6_type +const ( + DESTINATIONCIDRV6TYPE_CIDRV6 DestinationCIDRv6Type = "cidrv6" + DESTINATIONCIDRV6TYPE_UNKNOWN_DEFAULT_OPEN_API DestinationCIDRv6Type = "unknown_default_open_api" +) + +// All allowed values of DestinationCIDRv6Type enum +var AllowedDestinationCIDRv6TypeEnumValues = []DestinationCIDRv6Type{ + "cidrv6", + "unknown_default_open_api", +} + +func (v *DestinationCIDRv6Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DestinationCIDRv6Type(value) + for _, existing := range AllowedDestinationCIDRv6TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = DESTINATIONCIDRV6TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewDestinationCIDRv6TypeFromValue returns a pointer to a valid DestinationCIDRv6Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDestinationCIDRv6TypeFromValue(v string) (*DestinationCIDRv6Type, error) { + ev := DestinationCIDRv6Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DestinationCIDRv6Type: valid values are %v", v, AllowedDestinationCIDRv6TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DestinationCIDRv6Type) IsValid() bool { + for _, existing := range AllowedDestinationCIDRv6TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DestinationCIDRv6_type value +func (v DestinationCIDRv6Type) Ptr() *DestinationCIDRv6Type { + return &v +} + +type NullableDestinationCIDRv6Type struct { + value *DestinationCIDRv6Type + isSet bool +} + +func (v NullableDestinationCIDRv6Type) Get() *DestinationCIDRv6Type { + return v.value +} + +func (v *NullableDestinationCIDRv6Type) Set(val *DestinationCIDRv6Type) { + v.value = val + v.isSet = true +} + +func (v NullableDestinationCIDRv6Type) IsSet() bool { + return v.isSet +} + +func (v *NullableDestinationCIDRv6Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDestinationCIDRv6Type(val *DestinationCIDRv6Type) *NullableDestinationCIDRv6Type { + return &NullableDestinationCIDRv6Type{value: val, isSet: true} +} + +func (v NullableDestinationCIDRv6Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDestinationCIDRv6Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2api/model_image.go b/services/iaas/v2api/model_image.go index 477d03308b..fdf969ab5f 100644 --- a/services/iaas/v2api/model_image.go +++ b/services/iaas/v2api/model_image.go @@ -33,7 +33,7 @@ type Image struct { 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}$"` // Indicates Image Import Progress in percent. ImportProgress *int64 `json:"importProgress,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v2api/model_image_from_volume_payload.go b/services/iaas/v2api/model_image_from_volume_payload.go index 37a050e190..aa262ae834 100644 --- a/services/iaas/v2api/model_image_from_volume_payload.go +++ b/services/iaas/v2api/model_image_from_volume_payload.go @@ -23,6 +23,8 @@ 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. + 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]+)*$"` // When true the created image is prevented from being deleted. @@ -39,6 +41,8 @@ type _ImageFromVolumePayload ImageFromVolumePayload func NewImageFromVolumePayload(diskFormat string, name string) *ImageFromVolumePayload { this := ImageFromVolumePayload{} this.DiskFormat = diskFormat + var force bool = false + this.Force = &force this.Name = name var protected bool = false this.Protected = &protected @@ -50,6 +54,8 @@ func NewImageFromVolumePayload(diskFormat string, name string) *ImageFromVolumeP // but it doesn't guarantee that properties required by API are set func NewImageFromVolumePayloadWithDefaults() *ImageFromVolumePayload { this := ImageFromVolumePayload{} + var force bool = false + this.Force = &force var protected bool = false this.Protected = &protected return &this @@ -79,6 +85,38 @@ func (o *ImageFromVolumePayload) SetDiskFormat(v string) { o.DiskFormat = v } +// GetForce returns the Force field value if set, zero value otherwise. +func (o *ImageFromVolumePayload) GetForce() bool { + if o == nil || IsNil(o.Force) { + var ret bool + return ret + } + return *o.Force +} + +// GetForceOk returns a tuple with the Force field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageFromVolumePayload) GetForceOk() (*bool, bool) { + if o == nil || IsNil(o.Force) { + return nil, false + } + return o.Force, true +} + +// HasForce returns a boolean if a field has been set. +func (o *ImageFromVolumePayload) HasForce() bool { + if o != nil && !IsNil(o.Force) { + return true + } + + return false +} + +// SetForce gets a reference to the given bool and assigns it to the Force field. +func (o *ImageFromVolumePayload) SetForce(v bool) { + o.Force = &v +} + // GetName returns the Name field value func (o *ImageFromVolumePayload) GetName() string { if o == nil { @@ -146,6 +184,9 @@ func (o ImageFromVolumePayload) MarshalJSON() ([]byte, error) { func (o ImageFromVolumePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["diskFormat"] = o.DiskFormat + if !IsNil(o.Force) { + toSerialize["force"] = o.Force + } toSerialize["name"] = o.Name if !IsNil(o.Protected) { toSerialize["protected"] = o.Protected @@ -195,6 +236,7 @@ func (o *ImageFromVolumePayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "diskFormat") + delete(additionalProperties, "force") delete(additionalProperties, "name") delete(additionalProperties, "protected") o.AdditionalProperties = additionalProperties diff --git a/services/iaas/v2api/model_keypair.go b/services/iaas/v2api/model_keypair.go index 9ffa9462f8..3a844c09ac 100644 --- a/services/iaas/v2api/model_keypair.go +++ b/services/iaas/v2api/model_keypair.go @@ -26,7 +26,7 @@ type Keypair struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint *string `json:"fingerprint,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){15}([0-9A-Fa-f]{2})$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` diff --git a/services/iaas/v2api/model_network.go b/services/iaas/v2api/model_network.go index 18d77d0a2f..77b2b26d2b 100644 --- a/services/iaas/v2api/model_network.go +++ b/services/iaas/v2api/model_network.go @@ -24,13 +24,15 @@ var _ MappedNullable = &Network{} type Network struct { // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` // Universally Unique Identifier (UUID). Id string `json:"id" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` Ipv4 *NetworkIPv4 `json:"ipv4,omitempty"` Ipv6 *NetworkIPv6 `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` // Shows if the network is routed and therefore accessible from other networks. @@ -100,6 +102,38 @@ func (o *Network) SetCreatedAt(v time.Time) { o.CreatedAt = &v } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Network) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Network) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Network) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *Network) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -441,6 +475,9 @@ func (o Network) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -514,6 +551,7 @@ func (o *Network) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "createdAt") + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "id") delete(additionalProperties, "ipv4") diff --git a/services/iaas/v2api/model_network_area.go b/services/iaas/v2api/model_network_area.go index 7cf16d6f3b..5ff1ff1cb9 100644 --- a/services/iaas/v2api/model_network_area.go +++ b/services/iaas/v2api/model_network_area.go @@ -26,7 +26,7 @@ type NetworkArea struct { CreatedAt *time.Time `json:"createdAt,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` // The amount of projects currently referencing a specific area. diff --git a/services/iaas/v2api/model_nexthop_blackhole.go b/services/iaas/v2api/model_nexthop_blackhole.go index fde0e7571c..64238ea3ba 100644 --- a/services/iaas/v2api/model_nexthop_blackhole.go +++ b/services/iaas/v2api/model_nexthop_blackhole.go @@ -21,7 +21,7 @@ var _ MappedNullable = &NexthopBlackhole{} // NexthopBlackhole Object that represents a blackhole route. type NexthopBlackhole struct { - Type string `json:"type"` + Type NexthopBlackholeType `json:"type"` AdditionalProperties map[string]interface{} } @@ -31,7 +31,7 @@ type _NexthopBlackhole NexthopBlackhole // 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 NewNexthopBlackhole(types string) *NexthopBlackhole { +func NewNexthopBlackhole(types NexthopBlackholeType) *NexthopBlackhole { this := NexthopBlackhole{} this.Type = types return &this @@ -46,9 +46,9 @@ func NewNexthopBlackholeWithDefaults() *NexthopBlackhole { } // GetType returns the Type field value -func (o *NexthopBlackhole) GetType() string { +func (o *NexthopBlackhole) GetType() NexthopBlackholeType { if o == nil { - var ret string + var ret NexthopBlackholeType return ret } @@ -57,7 +57,7 @@ func (o *NexthopBlackhole) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *NexthopBlackhole) GetTypeOk() (*string, bool) { +func (o *NexthopBlackhole) GetTypeOk() (*NexthopBlackholeType, bool) { if o == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *NexthopBlackhole) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *NexthopBlackhole) SetType(v string) { +func (o *NexthopBlackhole) SetType(v NexthopBlackholeType) { o.Type = v } diff --git a/services/iaas/v2api/model_nexthop_blackhole_type.go b/services/iaas/v2api/model_nexthop_blackhole_type.go new file mode 100644 index 0000000000..4a25a47895 --- /dev/null +++ b/services/iaas/v2api/model_nexthop_blackhole_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" +) + +// NexthopBlackholeType the model 'NexthopBlackholeType' +type NexthopBlackholeType string + +// List of NexthopBlackhole_type +const ( + NEXTHOPBLACKHOLETYPE_BLACKHOLE NexthopBlackholeType = "blackhole" + NEXTHOPBLACKHOLETYPE_UNKNOWN_DEFAULT_OPEN_API NexthopBlackholeType = "unknown_default_open_api" +) + +// All allowed values of NexthopBlackholeType enum +var AllowedNexthopBlackholeTypeEnumValues = []NexthopBlackholeType{ + "blackhole", + "unknown_default_open_api", +} + +func (v *NexthopBlackholeType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NexthopBlackholeType(value) + for _, existing := range AllowedNexthopBlackholeTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = NEXTHOPBLACKHOLETYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewNexthopBlackholeTypeFromValue returns a pointer to a valid NexthopBlackholeType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNexthopBlackholeTypeFromValue(v string) (*NexthopBlackholeType, error) { + ev := NexthopBlackholeType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopBlackholeType: valid values are %v", v, AllowedNexthopBlackholeTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NexthopBlackholeType) IsValid() bool { + for _, existing := range AllowedNexthopBlackholeTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to NexthopBlackhole_type value +func (v NexthopBlackholeType) Ptr() *NexthopBlackholeType { + return &v +} + +type NullableNexthopBlackholeType struct { + value *NexthopBlackholeType + isSet bool +} + +func (v NullableNexthopBlackholeType) Get() *NexthopBlackholeType { + return v.value +} + +func (v *NullableNexthopBlackholeType) Set(val *NexthopBlackholeType) { + v.value = val + v.isSet = true +} + +func (v NullableNexthopBlackholeType) IsSet() bool { + return v.isSet +} + +func (v *NullableNexthopBlackholeType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNexthopBlackholeType(val *NexthopBlackholeType) *NullableNexthopBlackholeType { + return &NullableNexthopBlackholeType{value: val, isSet: true} +} + +func (v NullableNexthopBlackholeType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNexthopBlackholeType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2api/model_nexthop_internet.go b/services/iaas/v2api/model_nexthop_internet.go index c2aa3f8801..52dd940230 100644 --- a/services/iaas/v2api/model_nexthop_internet.go +++ b/services/iaas/v2api/model_nexthop_internet.go @@ -21,7 +21,7 @@ var _ MappedNullable = &NexthopInternet{} // NexthopInternet Object that represents a route to the internet. type NexthopInternet struct { - Type string `json:"type"` + Type NexthopInternetType `json:"type"` AdditionalProperties map[string]interface{} } @@ -31,7 +31,7 @@ type _NexthopInternet NexthopInternet // 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 NewNexthopInternet(types string) *NexthopInternet { +func NewNexthopInternet(types NexthopInternetType) *NexthopInternet { this := NexthopInternet{} this.Type = types return &this @@ -46,9 +46,9 @@ func NewNexthopInternetWithDefaults() *NexthopInternet { } // GetType returns the Type field value -func (o *NexthopInternet) GetType() string { +func (o *NexthopInternet) GetType() NexthopInternetType { if o == nil { - var ret string + var ret NexthopInternetType return ret } @@ -57,7 +57,7 @@ func (o *NexthopInternet) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *NexthopInternet) GetTypeOk() (*string, bool) { +func (o *NexthopInternet) GetTypeOk() (*NexthopInternetType, bool) { if o == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *NexthopInternet) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *NexthopInternet) SetType(v string) { +func (o *NexthopInternet) SetType(v NexthopInternetType) { o.Type = v } diff --git a/services/iaas/v2api/model_nexthop_internet_type.go b/services/iaas/v2api/model_nexthop_internet_type.go new file mode 100644 index 0000000000..fb58a610e5 --- /dev/null +++ b/services/iaas/v2api/model_nexthop_internet_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" +) + +// NexthopInternetType the model 'NexthopInternetType' +type NexthopInternetType string + +// List of NexthopInternet_type +const ( + NEXTHOPINTERNETTYPE_INTERNET NexthopInternetType = "internet" + NEXTHOPINTERNETTYPE_UNKNOWN_DEFAULT_OPEN_API NexthopInternetType = "unknown_default_open_api" +) + +// All allowed values of NexthopInternetType enum +var AllowedNexthopInternetTypeEnumValues = []NexthopInternetType{ + "internet", + "unknown_default_open_api", +} + +func (v *NexthopInternetType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NexthopInternetType(value) + for _, existing := range AllowedNexthopInternetTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = NEXTHOPINTERNETTYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewNexthopInternetTypeFromValue returns a pointer to a valid NexthopInternetType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNexthopInternetTypeFromValue(v string) (*NexthopInternetType, error) { + ev := NexthopInternetType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopInternetType: valid values are %v", v, AllowedNexthopInternetTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NexthopInternetType) IsValid() bool { + for _, existing := range AllowedNexthopInternetTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to NexthopInternet_type value +func (v NexthopInternetType) Ptr() *NexthopInternetType { + return &v +} + +type NullableNexthopInternetType struct { + value *NexthopInternetType + isSet bool +} + +func (v NullableNexthopInternetType) Get() *NexthopInternetType { + return v.value +} + +func (v *NullableNexthopInternetType) Set(val *NexthopInternetType) { + v.value = val + v.isSet = true +} + +func (v NullableNexthopInternetType) IsSet() bool { + return v.isSet +} + +func (v *NullableNexthopInternetType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNexthopInternetType(val *NexthopInternetType) *NullableNexthopInternetType { + return &NullableNexthopInternetType{value: val, isSet: true} +} + +func (v NullableNexthopInternetType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNexthopInternetType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2api/model_nexthop_ipv4.go b/services/iaas/v2api/model_nexthop_ipv4.go index dc849302f9..9b5fa07378 100644 --- a/services/iaas/v2api/model_nexthop_ipv4.go +++ b/services/iaas/v2api/model_nexthop_ipv4.go @@ -21,7 +21,7 @@ var _ MappedNullable = &NexthopIPv4{} // NexthopIPv4 Object that represents an IPv4 address. type NexthopIPv4 struct { - Type string `json:"type"` + Type NexthopIPv4Type `json:"type"` // An IPv4 address. Value string `json:"value" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` AdditionalProperties map[string]interface{} @@ -33,7 +33,7 @@ type _NexthopIPv4 NexthopIPv4 // 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 NewNexthopIPv4(types string, value string) *NexthopIPv4 { +func NewNexthopIPv4(types NexthopIPv4Type, value string) *NexthopIPv4 { this := NexthopIPv4{} this.Type = types this.Value = value @@ -49,9 +49,9 @@ func NewNexthopIPv4WithDefaults() *NexthopIPv4 { } // GetType returns the Type field value -func (o *NexthopIPv4) GetType() string { +func (o *NexthopIPv4) GetType() NexthopIPv4Type { if o == nil { - var ret string + var ret NexthopIPv4Type return ret } @@ -60,7 +60,7 @@ func (o *NexthopIPv4) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *NexthopIPv4) GetTypeOk() (*string, bool) { +func (o *NexthopIPv4) GetTypeOk() (*NexthopIPv4Type, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *NexthopIPv4) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *NexthopIPv4) SetType(v string) { +func (o *NexthopIPv4) SetType(v NexthopIPv4Type) { o.Type = v } diff --git a/services/iaas/v2api/model_nexthop_ipv4_type.go b/services/iaas/v2api/model_nexthop_ipv4_type.go new file mode 100644 index 0000000000..381f0ef9a4 --- /dev/null +++ b/services/iaas/v2api/model_nexthop_ipv4_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" +) + +// NexthopIPv4Type the model 'NexthopIPv4Type' +type NexthopIPv4Type string + +// List of NexthopIPv4_type +const ( + NEXTHOPIPV4TYPE_IPV4 NexthopIPv4Type = "ipv4" + NEXTHOPIPV4TYPE_UNKNOWN_DEFAULT_OPEN_API NexthopIPv4Type = "unknown_default_open_api" +) + +// All allowed values of NexthopIPv4Type enum +var AllowedNexthopIPv4TypeEnumValues = []NexthopIPv4Type{ + "ipv4", + "unknown_default_open_api", +} + +func (v *NexthopIPv4Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NexthopIPv4Type(value) + for _, existing := range AllowedNexthopIPv4TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = NEXTHOPIPV4TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewNexthopIPv4TypeFromValue returns a pointer to a valid NexthopIPv4Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNexthopIPv4TypeFromValue(v string) (*NexthopIPv4Type, error) { + ev := NexthopIPv4Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopIPv4Type: valid values are %v", v, AllowedNexthopIPv4TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NexthopIPv4Type) IsValid() bool { + for _, existing := range AllowedNexthopIPv4TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to NexthopIPv4_type value +func (v NexthopIPv4Type) Ptr() *NexthopIPv4Type { + return &v +} + +type NullableNexthopIPv4Type struct { + value *NexthopIPv4Type + isSet bool +} + +func (v NullableNexthopIPv4Type) Get() *NexthopIPv4Type { + return v.value +} + +func (v *NullableNexthopIPv4Type) Set(val *NexthopIPv4Type) { + v.value = val + v.isSet = true +} + +func (v NullableNexthopIPv4Type) IsSet() bool { + return v.isSet +} + +func (v *NullableNexthopIPv4Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNexthopIPv4Type(val *NexthopIPv4Type) *NullableNexthopIPv4Type { + return &NullableNexthopIPv4Type{value: val, isSet: true} +} + +func (v NullableNexthopIPv4Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNexthopIPv4Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2api/model_nexthop_ipv6.go b/services/iaas/v2api/model_nexthop_ipv6.go index e19ad5444b..4ad58deef2 100644 --- a/services/iaas/v2api/model_nexthop_ipv6.go +++ b/services/iaas/v2api/model_nexthop_ipv6.go @@ -21,7 +21,7 @@ var _ MappedNullable = &NexthopIPv6{} // NexthopIPv6 Object that represents an IPv6 address. type NexthopIPv6 struct { - Type string `json:"type"` + Type NexthopIPv6Type `json:"type"` // An IPv6 address. Value string `json:"value" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` AdditionalProperties map[string]interface{} @@ -33,7 +33,7 @@ type _NexthopIPv6 NexthopIPv6 // 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 NewNexthopIPv6(types string, value string) *NexthopIPv6 { +func NewNexthopIPv6(types NexthopIPv6Type, value string) *NexthopIPv6 { this := NexthopIPv6{} this.Type = types this.Value = value @@ -49,9 +49,9 @@ func NewNexthopIPv6WithDefaults() *NexthopIPv6 { } // GetType returns the Type field value -func (o *NexthopIPv6) GetType() string { +func (o *NexthopIPv6) GetType() NexthopIPv6Type { if o == nil { - var ret string + var ret NexthopIPv6Type return ret } @@ -60,7 +60,7 @@ func (o *NexthopIPv6) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *NexthopIPv6) GetTypeOk() (*string, bool) { +func (o *NexthopIPv6) GetTypeOk() (*NexthopIPv6Type, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *NexthopIPv6) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *NexthopIPv6) SetType(v string) { +func (o *NexthopIPv6) SetType(v NexthopIPv6Type) { o.Type = v } diff --git a/services/iaas/v2api/model_nexthop_ipv6_type.go b/services/iaas/v2api/model_nexthop_ipv6_type.go new file mode 100644 index 0000000000..6e7c48a14b --- /dev/null +++ b/services/iaas/v2api/model_nexthop_ipv6_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" +) + +// NexthopIPv6Type the model 'NexthopIPv6Type' +type NexthopIPv6Type string + +// List of NexthopIPv6_type +const ( + NEXTHOPIPV6TYPE_IPV6 NexthopIPv6Type = "ipv6" + NEXTHOPIPV6TYPE_UNKNOWN_DEFAULT_OPEN_API NexthopIPv6Type = "unknown_default_open_api" +) + +// All allowed values of NexthopIPv6Type enum +var AllowedNexthopIPv6TypeEnumValues = []NexthopIPv6Type{ + "ipv6", + "unknown_default_open_api", +} + +func (v *NexthopIPv6Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NexthopIPv6Type(value) + for _, existing := range AllowedNexthopIPv6TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = NEXTHOPIPV6TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewNexthopIPv6TypeFromValue returns a pointer to a valid NexthopIPv6Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNexthopIPv6TypeFromValue(v string) (*NexthopIPv6Type, error) { + ev := NexthopIPv6Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopIPv6Type: valid values are %v", v, AllowedNexthopIPv6TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NexthopIPv6Type) IsValid() bool { + for _, existing := range AllowedNexthopIPv6TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to NexthopIPv6_type value +func (v NexthopIPv6Type) Ptr() *NexthopIPv6Type { + return &v +} + +type NullableNexthopIPv6Type struct { + value *NexthopIPv6Type + isSet bool +} + +func (v NullableNexthopIPv6Type) Get() *NexthopIPv6Type { + return v.value +} + +func (v *NullableNexthopIPv6Type) Set(val *NexthopIPv6Type) { + v.value = val + v.isSet = true +} + +func (v NullableNexthopIPv6Type) IsSet() bool { + return v.isSet +} + +func (v *NullableNexthopIPv6Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNexthopIPv6Type(val *NexthopIPv6Type) *NullableNexthopIPv6Type { + return &NullableNexthopIPv6Type{value: val, isSet: true} +} + +func (v NullableNexthopIPv6Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNexthopIPv6Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2api/model_nic.go b/services/iaas/v2api/model_nic.go index a3223ee073..53dc122ece 100644 --- a/services/iaas/v2api/model_nic.go +++ b/services/iaas/v2api/model_nic.go @@ -13,6 +13,7 @@ package v2api import ( "encoding/json" + "time" ) // checks if the NIC type satisfies the MappedNullable interface at compile time @@ -22,6 +23,8 @@ var _ MappedNullable = &NIC{} type NIC struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` // Universally Unique Identifier (UUID). @@ -32,7 +35,7 @@ type NIC struct { Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` @@ -47,7 +50,9 @@ type NIC struct { // Possible values: `ACTIVE`, `DOWN`. Status *string `json:"status,omitempty"` // Possible values: `server`, `metadata`, `gateway`, `none`. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -106,6 +111,38 @@ func (o *NIC) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *NIC) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NIC) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *NIC) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *NIC) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *NIC) GetDescription() string { if o == nil || IsNil(o.Description) { @@ -522,6 +559,38 @@ func (o *NIC) SetType(v string) { o.Type = &v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *NIC) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NIC) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *NIC) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *NIC) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o NIC) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -535,6 +604,9 @@ func (o NIC) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Description) { toSerialize["description"] = o.Description } @@ -574,6 +646,9 @@ func (o NIC) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -597,6 +672,7 @@ func (o *NIC) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "description") delete(additionalProperties, "device") delete(additionalProperties, "id") @@ -610,6 +686,7 @@ func (o *NIC) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "securityGroups") delete(additionalProperties, "status") delete(additionalProperties, "type") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_partial_update_network_area_payload.go b/services/iaas/v2api/model_partial_update_network_area_payload.go index 7622cf9c42..68f083183e 100644 --- a/services/iaas/v2api/model_partial_update_network_area_payload.go +++ b/services/iaas/v2api/model_partial_update_network_area_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &PartialUpdateNetworkAreaPayload{} // PartialUpdateNetworkAreaPayload Object that represents the network area update request. type PartialUpdateNetworkAreaPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name *string `json:"name,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_partial_update_network_payload.go b/services/iaas/v2api/model_partial_update_network_payload.go index 9afce2bbbc..d62680cc43 100644 --- a/services/iaas/v2api/model_partial_update_network_payload.go +++ b/services/iaas/v2api/model_partial_update_network_payload.go @@ -20,11 +20,13 @@ var _ MappedNullable = &PartialUpdateNetworkPayload{} // PartialUpdateNetworkPayload Object that represents the request body for a network update. type PartialUpdateNetworkPayload struct { + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` Ipv4 *UpdateNetworkIPv4Body `json:"ipv4,omitempty"` Ipv6 *UpdateNetworkIPv6Body `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` @@ -54,6 +56,38 @@ func NewPartialUpdateNetworkPayloadWithDefaults() *PartialUpdateNetworkPayload { return &this } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PartialUpdateNetworkPayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateNetworkPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PartialUpdateNetworkPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PartialUpdateNetworkPayload) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *PartialUpdateNetworkPayload) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -288,6 +322,9 @@ func (o PartialUpdateNetworkPayload) MarshalJSON() ([]byte, error) { func (o PartialUpdateNetworkPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -331,6 +368,7 @@ func (o *PartialUpdateNetworkPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "ipv4") delete(additionalProperties, "ipv6") diff --git a/services/iaas/v2api/model_project.go b/services/iaas/v2api/model_project.go index 7af0742f07..5590a069eb 100644 --- a/services/iaas/v2api/model_project.go +++ b/services/iaas/v2api/model_project.go @@ -28,10 +28,14 @@ type Project struct { // Universally Unique Identifier (UUID). Id string `json:"id" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` InternetAccess *bool `json:"internetAccess,omitempty"` + // Possible values: `Schwarz`, `Public`, `SNA`, `VPC`. + ProjectType *string `json:"projectType,omitempty"` // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. Status string `json:"status"` // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // Universally Unique Identifier (UUID). + VpcId *string `json:"vpcId,omitempty" 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{} } @@ -169,6 +173,38 @@ func (o *Project) SetInternetAccess(v bool) { o.InternetAccess = &v } +// GetProjectType returns the ProjectType field value if set, zero value otherwise. +func (o *Project) GetProjectType() string { + if o == nil || IsNil(o.ProjectType) { + var ret string + return ret + } + return *o.ProjectType +} + +// GetProjectTypeOk returns a tuple with the ProjectType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetProjectTypeOk() (*string, bool) { + if o == nil || IsNil(o.ProjectType) { + return nil, false + } + return o.ProjectType, true +} + +// HasProjectType returns a boolean if a field has been set. +func (o *Project) HasProjectType() bool { + if o != nil && !IsNil(o.ProjectType) { + return true + } + + return false +} + +// SetProjectType gets a reference to the given string and assigns it to the ProjectType field. +func (o *Project) SetProjectType(v string) { + o.ProjectType = &v +} + // GetStatus returns the Status field value func (o *Project) GetStatus() string { if o == nil { @@ -225,6 +261,38 @@ func (o *Project) SetUpdatedAt(v time.Time) { o.UpdatedAt = &v } +// GetVpcId returns the VpcId field value if set, zero value otherwise. +func (o *Project) GetVpcId() string { + if o == nil || IsNil(o.VpcId) { + var ret string + return ret + } + return *o.VpcId +} + +// GetVpcIdOk returns a tuple with the VpcId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetVpcIdOk() (*string, bool) { + if o == nil || IsNil(o.VpcId) { + return nil, false + } + return o.VpcId, true +} + +// HasVpcId returns a boolean if a field has been set. +func (o *Project) HasVpcId() bool { + if o != nil && !IsNil(o.VpcId) { + return true + } + + return false +} + +// SetVpcId gets a reference to the given string and assigns it to the VpcId field. +func (o *Project) SetVpcId(v string) { + o.VpcId = &v +} + func (o Project) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -243,10 +311,16 @@ func (o Project) ToMap() (map[string]interface{}, error) { if !IsNil(o.InternetAccess) { toSerialize["internetAccess"] = o.InternetAccess } + if !IsNil(o.ProjectType) { + toSerialize["projectType"] = o.ProjectType + } toSerialize["status"] = o.Status if !IsNil(o.UpdatedAt) { toSerialize["updatedAt"] = o.UpdatedAt } + if !IsNil(o.VpcId) { + toSerialize["vpcId"] = o.VpcId + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -296,8 +370,10 @@ func (o *Project) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "internetAccess") + delete(additionalProperties, "projectType") delete(additionalProperties, "status") delete(additionalProperties, "updatedAt") + delete(additionalProperties, "vpcId") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_public_ip.go b/services/iaas/v2api/model_public_ip.go index c7ed4b5ef2..aa3f8d2bed 100644 --- a/services/iaas/v2api/model_public_ip.go +++ b/services/iaas/v2api/model_public_ip.go @@ -13,6 +13,7 @@ package v2api import ( "encoding/json" + "time" ) // checks if the PublicIp type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &PublicIp{} // PublicIp Object that represents a public IP. type PublicIp struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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}$"` // String that represents an IPv4 address. Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewPublicIpWithDefaults() *PublicIp { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PublicIp) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicIp) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PublicIp) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PublicIp) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *PublicIp) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *PublicIp) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PublicIp) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicIp) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PublicIp) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PublicIp) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o PublicIp) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o PublicIp) MarshalJSON() ([]byte, error) { func (o PublicIp) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o PublicIp) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *PublicIp) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_route.go b/services/iaas/v2api/model_route.go index a0a2a64309..a158ca3a20 100644 --- a/services/iaas/v2api/model_route.go +++ b/services/iaas/v2api/model_route.go @@ -27,7 +27,7 @@ type Route struct { Destination RouteDestination `json:"destination"` // 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Nexthop RouteNexthop `json:"nexthop"` // Date-time when resource was last updated. diff --git a/services/iaas/v2api/model_routing_table.go b/services/iaas/v2api/model_routing_table.go index e4006a546f..48aeb2d10b 100644 --- a/services/iaas/v2api/model_routing_table.go +++ b/services/iaas/v2api/model_routing_table.go @@ -32,7 +32,7 @@ type RoutingTable struct { DynamicRoutes *bool `json:"dynamicRoutes,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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_security_group.go b/services/iaas/v2api/model_security_group.go index 7354b0b40b..5010bb8b5c 100644 --- a/services/iaas/v2api/model_security_group.go +++ b/services/iaas/v2api/model_security_group.go @@ -28,7 +28,7 @@ type SecurityGroup struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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_server.go b/services/iaas/v2api/model_server.go index 5b17f6a004..221606b9ec 100644 --- a/services/iaas/v2api/model_server.go +++ b/services/iaas/v2api/model_server.go @@ -40,7 +40,7 @@ type Server struct { ImageId *string `json:"imageId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The SSH keypair used during the server creation. KeypairName *string `json:"keypairName,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` diff --git a/services/iaas/v2api/model_server_network.go b/services/iaas/v2api/model_server_network.go index cca8e40e66..c65f6614a8 100644 --- a/services/iaas/v2api/model_server_network.go +++ b/services/iaas/v2api/model_server_network.go @@ -14,6 +14,7 @@ package v2api import ( "encoding/json" "fmt" + "time" ) // checks if the ServerNetwork type satisfies the MappedNullable interface at compile time @@ -23,6 +24,8 @@ var _ MappedNullable = &ServerNetwork{} type ServerNetwork struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an IP address. Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. @@ -40,7 +43,9 @@ type ServerNetwork struct { // Object that represents an IP address. PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list of UUIDs. - SecurityGroups []string `json:"securityGroups,omitempty"` + SecurityGroups []string `json:"securityGroups,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -100,6 +105,38 @@ func (o *ServerNetwork) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ServerNetwork) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ServerNetwork) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ServerNetwork) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetIpv4 returns the Ipv4 field value if set, zero value otherwise. func (o *ServerNetwork) GetIpv4() string { if o == nil || IsNil(o.Ipv4) { @@ -348,6 +385,38 @@ func (o *ServerNetwork) SetSecurityGroups(v []string) { o.SecurityGroups = v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ServerNetwork) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ServerNetwork) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ServerNetwork) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o ServerNetwork) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -361,6 +430,9 @@ func (o ServerNetwork) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Ipv4) { toSerialize["ipv4"] = o.Ipv4 } @@ -378,6 +450,9 @@ func (o ServerNetwork) ToMap() (map[string]interface{}, error) { if !IsNil(o.SecurityGroups) { toSerialize["securityGroups"] = o.SecurityGroups } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -426,6 +501,7 @@ func (o *ServerNetwork) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "ipv4") delete(additionalProperties, "ipv6") delete(additionalProperties, "mac") @@ -435,6 +511,7 @@ func (o *ServerNetwork) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "nicSecurity") delete(additionalProperties, "publicIp") delete(additionalProperties, "securityGroups") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_snapshot.go b/services/iaas/v2api/model_snapshot.go index ddd57223ee..093c881161 100644 --- a/services/iaas/v2api/model_snapshot.go +++ b/services/iaas/v2api/model_snapshot.go @@ -30,7 +30,7 @@ type Snapshot struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_update_backup_payload.go b/services/iaas/v2api/model_update_backup_payload.go index a69c908b9b..d4fc5648dd 100644 --- a/services/iaas/v2api/model_update_backup_payload.go +++ b/services/iaas/v2api/model_update_backup_payload.go @@ -31,7 +31,7 @@ type UpdateBackupPayload struct { 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_update_image_payload.go b/services/iaas/v2api/model_update_image_payload.go index e0677681f8..344b52bcc3 100644 --- a/services/iaas/v2api/model_update_image_payload.go +++ b/services/iaas/v2api/model_update_image_payload.go @@ -24,7 +24,7 @@ type UpdateImagePayload struct { Config *ImageConfig `json:"config,omitempty"` // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. DiskFormat *string `json:"diskFormat,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v2api/model_update_key_pair_payload.go b/services/iaas/v2api/model_update_key_pair_payload.go index ae32508de6..22cdd343f4 100644 --- a/services/iaas/v2api/model_update_key_pair_payload.go +++ b/services/iaas/v2api/model_update_key_pair_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateKeyPairPayload{} // UpdateKeyPairPayload Object that represents an update request body of a public key of an SSH keypair. type UpdateKeyPairPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_update_network_area_route_payload.go b/services/iaas/v2api/model_update_network_area_route_payload.go index a2bf667339..8ddd1b6755 100644 --- a/services/iaas/v2api/model_update_network_area_route_payload.go +++ b/services/iaas/v2api/model_update_network_area_route_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateNetworkAreaRoutePayload{} // UpdateNetworkAreaRoutePayload Object that represents the request body for a route update. type UpdateNetworkAreaRoutePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_update_nic_payload.go b/services/iaas/v2api/model_update_nic_payload.go index 3fe2c2b182..4312db25f6 100644 --- a/services/iaas/v2api/model_update_nic_payload.go +++ b/services/iaas/v2api/model_update_nic_payload.go @@ -24,7 +24,7 @@ type UpdateNicPayload struct { AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_update_public_ip_payload.go b/services/iaas/v2api/model_update_public_ip_payload.go index f958b972b8..e681819003 100644 --- a/services/iaas/v2api/model_update_public_ip_payload.go +++ b/services/iaas/v2api/model_update_public_ip_payload.go @@ -13,6 +13,7 @@ package v2api import ( "encoding/json" + "time" ) // checks if the UpdatePublicIPPayload type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &UpdatePublicIPPayload{} // UpdatePublicIPPayload Object that represents a public IP. type UpdatePublicIPPayload struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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}$"` // String that represents an IPv4 address. Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewUpdatePublicIPPayloadWithDefaults() *UpdatePublicIPPayload { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *UpdatePublicIPPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePublicIPPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *UpdatePublicIPPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *UpdatePublicIPPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *UpdatePublicIPPayload) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *UpdatePublicIPPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePublicIPPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *UpdatePublicIPPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o UpdatePublicIPPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o UpdatePublicIPPayload) MarshalJSON() ([]byte, error) { func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *UpdatePublicIPPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_update_route_of_routing_table_payload.go b/services/iaas/v2api/model_update_route_of_routing_table_payload.go index 354c8de8a9..909ad6b4b5 100644 --- a/services/iaas/v2api/model_update_route_of_routing_table_payload.go +++ b/services/iaas/v2api/model_update_route_of_routing_table_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateRouteOfRoutingTablePayload{} // UpdateRouteOfRoutingTablePayload Object that represents the request body for a route update. type UpdateRouteOfRoutingTablePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_update_routing_table_of_area_payload.go b/services/iaas/v2api/model_update_routing_table_of_area_payload.go index e90608dd82..c4f267404a 100644 --- a/services/iaas/v2api/model_update_routing_table_of_area_payload.go +++ b/services/iaas/v2api/model_update_routing_table_of_area_payload.go @@ -24,7 +24,7 @@ type UpdateRoutingTableOfAreaPayload struct { Description *string `json:"description,omitempty"` // The update config setting for a routing table which allows propagation of dynamic routes to this routing table. DynamicRoutes *bool `json:"dynamicRoutes,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_update_security_group_payload.go b/services/iaas/v2api/model_update_security_group_payload.go index f67bb93c53..bfaeb7a04d 100644 --- a/services/iaas/v2api/model_update_security_group_payload.go +++ b/services/iaas/v2api/model_update_security_group_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &UpdateSecurityGroupPayload{} type UpdateSecurityGroupPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_update_server_payload.go b/services/iaas/v2api/model_update_server_payload.go index 213e54af47..011039252c 100644 --- a/services/iaas/v2api/model_update_server_payload.go +++ b/services/iaas/v2api/model_update_server_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateServerPayload{} // UpdateServerPayload Object that represents an update request body of a server. type UpdateServerPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` diff --git a/services/iaas/v2api/model_update_snapshot_payload.go b/services/iaas/v2api/model_update_snapshot_payload.go index aea613dafb..04e539f31b 100644 --- a/services/iaas/v2api/model_update_snapshot_payload.go +++ b/services/iaas/v2api/model_update_snapshot_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &UpdateSnapshotPayload{} type UpdateSnapshotPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_update_volume_payload.go b/services/iaas/v2api/model_update_volume_payload.go index dd1b48752e..f03836dece 100644 --- a/services/iaas/v2api/model_update_volume_payload.go +++ b/services/iaas/v2api/model_update_volume_payload.go @@ -25,7 +25,7 @@ type UpdateVolumePayload struct { // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_volume.go b/services/iaas/v2api/model_volume.go index f476f45224..3c2c759677 100644 --- a/services/iaas/v2api/model_volume.go +++ b/services/iaas/v2api/model_volume.go @@ -36,7 +36,7 @@ type Volume struct { // 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}$"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2api/model_volume_performance_class.go b/services/iaas/v2api/model_volume_performance_class.go index fa4c4c1c79..a47f24a59d 100644 --- a/services/iaas/v2api/model_volume_performance_class.go +++ b/services/iaas/v2api/model_volume_performance_class.go @@ -25,7 +25,7 @@ type VolumePerformanceClass struct { Description *string `json:"description,omitempty"` // Input/Output Operations per second. Iops *int64 `json:"iops,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v2beta1api/model_add_routing_table_to_area_payload.go b/services/iaas/v2beta1api/model_add_routing_table_to_area_payload.go index a85cb8cad9..6af66cf13b 100644 --- a/services/iaas/v2beta1api/model_add_routing_table_to_area_payload.go +++ b/services/iaas/v2beta1api/model_add_routing_table_to_area_payload.go @@ -32,7 +32,7 @@ type AddRoutingTableToAreaPayload struct { DynamicRoutes *bool `json:"dynamicRoutes,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v2beta1api/model_backup.go b/services/iaas/v2beta1api/model_backup.go index fa9c9f2006..0b5bea6378 100644 --- a/services/iaas/v2beta1api/model_backup.go +++ b/services/iaas/v2beta1api/model_backup.go @@ -31,7 +31,7 @@ type Backup struct { 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_create_backup_payload.go b/services/iaas/v2beta1api/model_create_backup_payload.go index 3324aac643..8b0b6735fb 100644 --- a/services/iaas/v2beta1api/model_create_backup_payload.go +++ b/services/iaas/v2beta1api/model_create_backup_payload.go @@ -23,7 +23,7 @@ var _ MappedNullable = &CreateBackupPayload{} type CreateBackupPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_create_image_payload.go b/services/iaas/v2beta1api/model_create_image_payload.go index 5b98667909..69d2a65c1c 100644 --- a/services/iaas/v2beta1api/model_create_image_payload.go +++ b/services/iaas/v2beta1api/model_create_image_payload.go @@ -33,7 +33,7 @@ type CreateImagePayload struct { 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}$"` // Indicates Image Import Progress in percent. ImportProgress *int64 `json:"importProgress,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v2beta1api/model_create_isolated_network_payload.go b/services/iaas/v2beta1api/model_create_isolated_network_payload.go index 9c5f8abd9c..e3d737373a 100644 --- a/services/iaas/v2beta1api/model_create_isolated_network_payload.go +++ b/services/iaas/v2beta1api/model_create_isolated_network_payload.go @@ -24,7 +24,7 @@ type CreateIsolatedNetworkPayload struct { // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` Ipv4 *CreateNetworkIPv4 `json:"ipv4,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v2beta1api/model_create_key_pair_payload.go b/services/iaas/v2beta1api/model_create_key_pair_payload.go index 441f5466d7..ce7b91e217 100644 --- a/services/iaas/v2beta1api/model_create_key_pair_payload.go +++ b/services/iaas/v2beta1api/model_create_key_pair_payload.go @@ -26,7 +26,7 @@ type CreateKeyPairPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint *string `json:"fingerprint,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){15}([0-9A-Fa-f]{2})$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` diff --git a/services/iaas/v2beta1api/model_create_network_area_payload.go b/services/iaas/v2beta1api/model_create_network_area_payload.go index 2e5840dd10..4cc3b3f010 100644 --- a/services/iaas/v2beta1api/model_create_network_area_payload.go +++ b/services/iaas/v2beta1api/model_create_network_area_payload.go @@ -21,7 +21,7 @@ var _ MappedNullable = &CreateNetworkAreaPayload{} // CreateNetworkAreaPayload Object that represents the network area create request. type CreateNetworkAreaPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_create_network_payload.go b/services/iaas/v2beta1api/model_create_network_payload.go index 14c7863105..109dc6566b 100644 --- a/services/iaas/v2beta1api/model_create_network_payload.go +++ b/services/iaas/v2beta1api/model_create_network_payload.go @@ -21,11 +21,13 @@ var _ MappedNullable = &CreateNetworkPayload{} // CreateNetworkPayload Object that represents the request body for a network create. type CreateNetworkPayload struct { + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` Ipv4 *CreateNetworkIPv4 `json:"ipv4,omitempty"` Ipv6 *CreateNetworkIPv6 `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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]+)*$"` @@ -62,6 +64,38 @@ func NewCreateNetworkPayloadWithDefaults() *CreateNetworkPayload { return &this } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateNetworkPayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateNetworkPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateNetworkPayload) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *CreateNetworkPayload) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -320,6 +354,9 @@ func (o CreateNetworkPayload) MarshalJSON() ([]byte, error) { func (o CreateNetworkPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -385,6 +422,7 @@ func (o *CreateNetworkPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "ipv4") delete(additionalProperties, "ipv6") diff --git a/services/iaas/v2beta1api/model_create_nic_payload.go b/services/iaas/v2beta1api/model_create_nic_payload.go index b4db30f18e..526427864c 100644 --- a/services/iaas/v2beta1api/model_create_nic_payload.go +++ b/services/iaas/v2beta1api/model_create_nic_payload.go @@ -13,6 +13,7 @@ package v2beta1api import ( "encoding/json" + "time" ) // checks if the CreateNicPayload type satisfies the MappedNullable interface at compile time @@ -22,6 +23,8 @@ var _ MappedNullable = &CreateNicPayload{} type CreateNicPayload struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` // Universally Unique Identifier (UUID). @@ -32,7 +35,7 @@ type CreateNicPayload struct { Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` @@ -47,7 +50,9 @@ type CreateNicPayload struct { // Possible values: `ACTIVE`, `DOWN`. Status *string `json:"status,omitempty"` // Possible values: `server`, `metadata`, `gateway`, `none`. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -106,6 +111,38 @@ func (o *CreateNicPayload) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreateNicPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNicPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreateNicPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreateNicPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *CreateNicPayload) GetDescription() string { if o == nil || IsNil(o.Description) { @@ -522,6 +559,38 @@ func (o *CreateNicPayload) SetType(v string) { o.Type = &v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreateNicPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNicPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreateNicPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreateNicPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o CreateNicPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -535,6 +604,9 @@ func (o CreateNicPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Description) { toSerialize["description"] = o.Description } @@ -574,6 +646,9 @@ func (o CreateNicPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -597,6 +672,7 @@ func (o *CreateNicPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "description") delete(additionalProperties, "device") delete(additionalProperties, "id") @@ -610,6 +686,7 @@ func (o *CreateNicPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "securityGroups") delete(additionalProperties, "status") delete(additionalProperties, "type") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_create_public_ip_payload.go b/services/iaas/v2beta1api/model_create_public_ip_payload.go index cf56270c78..e959a34a4a 100644 --- a/services/iaas/v2beta1api/model_create_public_ip_payload.go +++ b/services/iaas/v2beta1api/model_create_public_ip_payload.go @@ -13,6 +13,7 @@ package v2beta1api import ( "encoding/json" + "time" ) // checks if the CreatePublicIPPayload type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &CreatePublicIPPayload{} // CreatePublicIPPayload Object that represents a public IP. type CreatePublicIPPayload struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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}$"` // String that represents an IPv4 address. Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewCreatePublicIPPayloadWithDefaults() *CreatePublicIPPayload { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreatePublicIPPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePublicIPPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreatePublicIPPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *CreatePublicIPPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *CreatePublicIPPayload) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreatePublicIPPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePublicIPPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreatePublicIPPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o CreatePublicIPPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o CreatePublicIPPayload) MarshalJSON() ([]byte, error) { func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *CreatePublicIPPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_create_security_group_payload.go b/services/iaas/v2beta1api/model_create_security_group_payload.go index f98e58b470..0e4039a58e 100644 --- a/services/iaas/v2beta1api/model_create_security_group_payload.go +++ b/services/iaas/v2beta1api/model_create_security_group_payload.go @@ -28,7 +28,7 @@ type CreateSecurityGroupPayload struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v2beta1api/model_create_server_payload.go b/services/iaas/v2beta1api/model_create_server_payload.go index 9dbcb4a8f1..a9fd765dc5 100644 --- a/services/iaas/v2beta1api/model_create_server_payload.go +++ b/services/iaas/v2beta1api/model_create_server_payload.go @@ -40,7 +40,7 @@ type CreateServerPayload struct { ImageId *string `json:"imageId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The SSH keypair used during the server creation. KeypairName *string `json:"keypairName,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` diff --git a/services/iaas/v2beta1api/model_create_volume_payload.go b/services/iaas/v2beta1api/model_create_volume_payload.go index 835a0ec17e..8ad6e6185d 100644 --- a/services/iaas/v2beta1api/model_create_volume_payload.go +++ b/services/iaas/v2beta1api/model_create_volume_payload.go @@ -36,7 +36,7 @@ type CreateVolumePayload struct { // 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}$"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_destination_cidrv4.go b/services/iaas/v2beta1api/model_destination_cidrv4.go index d50e1dcecb..a9269c2242 100644 --- a/services/iaas/v2beta1api/model_destination_cidrv4.go +++ b/services/iaas/v2beta1api/model_destination_cidrv4.go @@ -21,7 +21,7 @@ var _ MappedNullable = &DestinationCIDRv4{} // DestinationCIDRv4 IPv4 Classless Inter-Domain Routing (CIDR) Object. type DestinationCIDRv4 struct { - Type string `json:"type"` + Type DestinationCIDRv4Type `json:"type"` // An CIDRv4 string. Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` AdditionalProperties map[string]interface{} @@ -33,7 +33,7 @@ type _DestinationCIDRv4 DestinationCIDRv4 // 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 NewDestinationCIDRv4(types string, value string) *DestinationCIDRv4 { +func NewDestinationCIDRv4(types DestinationCIDRv4Type, value string) *DestinationCIDRv4 { this := DestinationCIDRv4{} this.Type = types this.Value = value @@ -49,9 +49,9 @@ func NewDestinationCIDRv4WithDefaults() *DestinationCIDRv4 { } // GetType returns the Type field value -func (o *DestinationCIDRv4) GetType() string { +func (o *DestinationCIDRv4) GetType() DestinationCIDRv4Type { if o == nil { - var ret string + var ret DestinationCIDRv4Type return ret } @@ -60,7 +60,7 @@ func (o *DestinationCIDRv4) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *DestinationCIDRv4) GetTypeOk() (*string, bool) { +func (o *DestinationCIDRv4) GetTypeOk() (*DestinationCIDRv4Type, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *DestinationCIDRv4) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *DestinationCIDRv4) SetType(v string) { +func (o *DestinationCIDRv4) SetType(v DestinationCIDRv4Type) { o.Type = v } diff --git a/services/iaas/v2beta1api/model_destination_cidrv4_type.go b/services/iaas/v2beta1api/model_destination_cidrv4_type.go new file mode 100644 index 0000000000..9b4fb3fd01 --- /dev/null +++ b/services/iaas/v2beta1api/model_destination_cidrv4_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" +) + +// DestinationCIDRv4Type the model 'DestinationCIDRv4Type' +type DestinationCIDRv4Type string + +// List of DestinationCIDRv4_type +const ( + DESTINATIONCIDRV4TYPE_CIDRV4 DestinationCIDRv4Type = "cidrv4" + DESTINATIONCIDRV4TYPE_UNKNOWN_DEFAULT_OPEN_API DestinationCIDRv4Type = "unknown_default_open_api" +) + +// All allowed values of DestinationCIDRv4Type enum +var AllowedDestinationCIDRv4TypeEnumValues = []DestinationCIDRv4Type{ + "cidrv4", + "unknown_default_open_api", +} + +func (v *DestinationCIDRv4Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DestinationCIDRv4Type(value) + for _, existing := range AllowedDestinationCIDRv4TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = DESTINATIONCIDRV4TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewDestinationCIDRv4TypeFromValue returns a pointer to a valid DestinationCIDRv4Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDestinationCIDRv4TypeFromValue(v string) (*DestinationCIDRv4Type, error) { + ev := DestinationCIDRv4Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DestinationCIDRv4Type: valid values are %v", v, AllowedDestinationCIDRv4TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DestinationCIDRv4Type) IsValid() bool { + for _, existing := range AllowedDestinationCIDRv4TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DestinationCIDRv4_type value +func (v DestinationCIDRv4Type) Ptr() *DestinationCIDRv4Type { + return &v +} + +type NullableDestinationCIDRv4Type struct { + value *DestinationCIDRv4Type + isSet bool +} + +func (v NullableDestinationCIDRv4Type) Get() *DestinationCIDRv4Type { + return v.value +} + +func (v *NullableDestinationCIDRv4Type) Set(val *DestinationCIDRv4Type) { + v.value = val + v.isSet = true +} + +func (v NullableDestinationCIDRv4Type) IsSet() bool { + return v.isSet +} + +func (v *NullableDestinationCIDRv4Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDestinationCIDRv4Type(val *DestinationCIDRv4Type) *NullableDestinationCIDRv4Type { + return &NullableDestinationCIDRv4Type{value: val, isSet: true} +} + +func (v NullableDestinationCIDRv4Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDestinationCIDRv4Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2beta1api/model_destination_cidrv6.go b/services/iaas/v2beta1api/model_destination_cidrv6.go index 8ac6fed254..ba87a7d637 100644 --- a/services/iaas/v2beta1api/model_destination_cidrv6.go +++ b/services/iaas/v2beta1api/model_destination_cidrv6.go @@ -21,7 +21,7 @@ var _ MappedNullable = &DestinationCIDRv6{} // DestinationCIDRv6 IPv6 Classless Inter-Domain Routing (CIDR) Object. type DestinationCIDRv6 struct { - Type string `json:"type"` + Type DestinationCIDRv6Type `json:"type"` // An CIDRv6 string. Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} @@ -33,7 +33,7 @@ type _DestinationCIDRv6 DestinationCIDRv6 // 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 NewDestinationCIDRv6(types string, value string) *DestinationCIDRv6 { +func NewDestinationCIDRv6(types DestinationCIDRv6Type, value string) *DestinationCIDRv6 { this := DestinationCIDRv6{} this.Type = types this.Value = value @@ -49,9 +49,9 @@ func NewDestinationCIDRv6WithDefaults() *DestinationCIDRv6 { } // GetType returns the Type field value -func (o *DestinationCIDRv6) GetType() string { +func (o *DestinationCIDRv6) GetType() DestinationCIDRv6Type { if o == nil { - var ret string + var ret DestinationCIDRv6Type return ret } @@ -60,7 +60,7 @@ func (o *DestinationCIDRv6) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *DestinationCIDRv6) GetTypeOk() (*string, bool) { +func (o *DestinationCIDRv6) GetTypeOk() (*DestinationCIDRv6Type, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *DestinationCIDRv6) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *DestinationCIDRv6) SetType(v string) { +func (o *DestinationCIDRv6) SetType(v DestinationCIDRv6Type) { o.Type = v } diff --git a/services/iaas/v2beta1api/model_destination_cidrv6_type.go b/services/iaas/v2beta1api/model_destination_cidrv6_type.go new file mode 100644 index 0000000000..6bea7e3b23 --- /dev/null +++ b/services/iaas/v2beta1api/model_destination_cidrv6_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" +) + +// DestinationCIDRv6Type the model 'DestinationCIDRv6Type' +type DestinationCIDRv6Type string + +// List of DestinationCIDRv6_type +const ( + DESTINATIONCIDRV6TYPE_CIDRV6 DestinationCIDRv6Type = "cidrv6" + DESTINATIONCIDRV6TYPE_UNKNOWN_DEFAULT_OPEN_API DestinationCIDRv6Type = "unknown_default_open_api" +) + +// All allowed values of DestinationCIDRv6Type enum +var AllowedDestinationCIDRv6TypeEnumValues = []DestinationCIDRv6Type{ + "cidrv6", + "unknown_default_open_api", +} + +func (v *DestinationCIDRv6Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DestinationCIDRv6Type(value) + for _, existing := range AllowedDestinationCIDRv6TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = DESTINATIONCIDRV6TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewDestinationCIDRv6TypeFromValue returns a pointer to a valid DestinationCIDRv6Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDestinationCIDRv6TypeFromValue(v string) (*DestinationCIDRv6Type, error) { + ev := DestinationCIDRv6Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DestinationCIDRv6Type: valid values are %v", v, AllowedDestinationCIDRv6TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DestinationCIDRv6Type) IsValid() bool { + for _, existing := range AllowedDestinationCIDRv6TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DestinationCIDRv6_type value +func (v DestinationCIDRv6Type) Ptr() *DestinationCIDRv6Type { + return &v +} + +type NullableDestinationCIDRv6Type struct { + value *DestinationCIDRv6Type + isSet bool +} + +func (v NullableDestinationCIDRv6Type) Get() *DestinationCIDRv6Type { + return v.value +} + +func (v *NullableDestinationCIDRv6Type) Set(val *DestinationCIDRv6Type) { + v.value = val + v.isSet = true +} + +func (v NullableDestinationCIDRv6Type) IsSet() bool { + return v.isSet +} + +func (v *NullableDestinationCIDRv6Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDestinationCIDRv6Type(val *DestinationCIDRv6Type) *NullableDestinationCIDRv6Type { + return &NullableDestinationCIDRv6Type{value: val, isSet: true} +} + +func (v NullableDestinationCIDRv6Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDestinationCIDRv6Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2beta1api/model_image.go b/services/iaas/v2beta1api/model_image.go index b818b6f5f3..ceba51d9f4 100644 --- a/services/iaas/v2beta1api/model_image.go +++ b/services/iaas/v2beta1api/model_image.go @@ -33,7 +33,7 @@ type Image struct { 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}$"` // Indicates Image Import Progress in percent. ImportProgress *int64 `json:"importProgress,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v2beta1api/model_keypair.go b/services/iaas/v2beta1api/model_keypair.go index 1248d31110..776c0b26e0 100644 --- a/services/iaas/v2beta1api/model_keypair.go +++ b/services/iaas/v2beta1api/model_keypair.go @@ -26,7 +26,7 @@ type Keypair struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint *string `json:"fingerprint,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){15}([0-9A-Fa-f]{2})$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` diff --git a/services/iaas/v2beta1api/model_network.go b/services/iaas/v2beta1api/model_network.go index 58a428e3aa..1fe767562e 100644 --- a/services/iaas/v2beta1api/model_network.go +++ b/services/iaas/v2beta1api/model_network.go @@ -24,13 +24,15 @@ var _ MappedNullable = &Network{} type Network struct { // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` // Universally Unique Identifier (UUID). Id string `json:"id" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` Ipv4 *NetworkIPv4 `json:"ipv4,omitempty"` Ipv6 *NetworkIPv6 `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` // Shows if the network is routed and therefore accessible from other networks. @@ -100,6 +102,38 @@ func (o *Network) SetCreatedAt(v time.Time) { o.CreatedAt = &v } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Network) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Network) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Network) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *Network) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -441,6 +475,9 @@ func (o Network) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -514,6 +551,7 @@ func (o *Network) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "createdAt") + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "id") delete(additionalProperties, "ipv4") diff --git a/services/iaas/v2beta1api/model_network_area.go b/services/iaas/v2beta1api/model_network_area.go index 0c0bda3ba1..f94203a2a1 100644 --- a/services/iaas/v2beta1api/model_network_area.go +++ b/services/iaas/v2beta1api/model_network_area.go @@ -26,7 +26,7 @@ type NetworkArea struct { CreatedAt *time.Time `json:"createdAt,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` // The amount of projects currently referencing a specific area. diff --git a/services/iaas/v2beta1api/model_nexthop_blackhole.go b/services/iaas/v2beta1api/model_nexthop_blackhole.go index a1271d6f52..dc237aa5fa 100644 --- a/services/iaas/v2beta1api/model_nexthop_blackhole.go +++ b/services/iaas/v2beta1api/model_nexthop_blackhole.go @@ -21,7 +21,7 @@ var _ MappedNullable = &NexthopBlackhole{} // NexthopBlackhole Object that represents a blackhole route. type NexthopBlackhole struct { - Type string `json:"type"` + Type NexthopBlackholeType `json:"type"` AdditionalProperties map[string]interface{} } @@ -31,7 +31,7 @@ type _NexthopBlackhole NexthopBlackhole // 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 NewNexthopBlackhole(types string) *NexthopBlackhole { +func NewNexthopBlackhole(types NexthopBlackholeType) *NexthopBlackhole { this := NexthopBlackhole{} this.Type = types return &this @@ -46,9 +46,9 @@ func NewNexthopBlackholeWithDefaults() *NexthopBlackhole { } // GetType returns the Type field value -func (o *NexthopBlackhole) GetType() string { +func (o *NexthopBlackhole) GetType() NexthopBlackholeType { if o == nil { - var ret string + var ret NexthopBlackholeType return ret } @@ -57,7 +57,7 @@ func (o *NexthopBlackhole) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *NexthopBlackhole) GetTypeOk() (*string, bool) { +func (o *NexthopBlackhole) GetTypeOk() (*NexthopBlackholeType, bool) { if o == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *NexthopBlackhole) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *NexthopBlackhole) SetType(v string) { +func (o *NexthopBlackhole) SetType(v NexthopBlackholeType) { o.Type = v } diff --git a/services/iaas/v2beta1api/model_nexthop_blackhole_type.go b/services/iaas/v2beta1api/model_nexthop_blackhole_type.go new file mode 100644 index 0000000000..8ee50de681 --- /dev/null +++ b/services/iaas/v2beta1api/model_nexthop_blackhole_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" +) + +// NexthopBlackholeType the model 'NexthopBlackholeType' +type NexthopBlackholeType string + +// List of NexthopBlackhole_type +const ( + NEXTHOPBLACKHOLETYPE_BLACKHOLE NexthopBlackholeType = "blackhole" + NEXTHOPBLACKHOLETYPE_UNKNOWN_DEFAULT_OPEN_API NexthopBlackholeType = "unknown_default_open_api" +) + +// All allowed values of NexthopBlackholeType enum +var AllowedNexthopBlackholeTypeEnumValues = []NexthopBlackholeType{ + "blackhole", + "unknown_default_open_api", +} + +func (v *NexthopBlackholeType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NexthopBlackholeType(value) + for _, existing := range AllowedNexthopBlackholeTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = NEXTHOPBLACKHOLETYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewNexthopBlackholeTypeFromValue returns a pointer to a valid NexthopBlackholeType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNexthopBlackholeTypeFromValue(v string) (*NexthopBlackholeType, error) { + ev := NexthopBlackholeType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopBlackholeType: valid values are %v", v, AllowedNexthopBlackholeTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NexthopBlackholeType) IsValid() bool { + for _, existing := range AllowedNexthopBlackholeTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to NexthopBlackhole_type value +func (v NexthopBlackholeType) Ptr() *NexthopBlackholeType { + return &v +} + +type NullableNexthopBlackholeType struct { + value *NexthopBlackholeType + isSet bool +} + +func (v NullableNexthopBlackholeType) Get() *NexthopBlackholeType { + return v.value +} + +func (v *NullableNexthopBlackholeType) Set(val *NexthopBlackholeType) { + v.value = val + v.isSet = true +} + +func (v NullableNexthopBlackholeType) IsSet() bool { + return v.isSet +} + +func (v *NullableNexthopBlackholeType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNexthopBlackholeType(val *NexthopBlackholeType) *NullableNexthopBlackholeType { + return &NullableNexthopBlackholeType{value: val, isSet: true} +} + +func (v NullableNexthopBlackholeType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNexthopBlackholeType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2beta1api/model_nexthop_internet.go b/services/iaas/v2beta1api/model_nexthop_internet.go index b0a60fd4f3..b9d4e76eb0 100644 --- a/services/iaas/v2beta1api/model_nexthop_internet.go +++ b/services/iaas/v2beta1api/model_nexthop_internet.go @@ -21,7 +21,7 @@ var _ MappedNullable = &NexthopInternet{} // NexthopInternet Object that represents a route to the internet. type NexthopInternet struct { - Type string `json:"type"` + Type NexthopInternetType `json:"type"` AdditionalProperties map[string]interface{} } @@ -31,7 +31,7 @@ type _NexthopInternet NexthopInternet // 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 NewNexthopInternet(types string) *NexthopInternet { +func NewNexthopInternet(types NexthopInternetType) *NexthopInternet { this := NexthopInternet{} this.Type = types return &this @@ -46,9 +46,9 @@ func NewNexthopInternetWithDefaults() *NexthopInternet { } // GetType returns the Type field value -func (o *NexthopInternet) GetType() string { +func (o *NexthopInternet) GetType() NexthopInternetType { if o == nil { - var ret string + var ret NexthopInternetType return ret } @@ -57,7 +57,7 @@ func (o *NexthopInternet) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *NexthopInternet) GetTypeOk() (*string, bool) { +func (o *NexthopInternet) GetTypeOk() (*NexthopInternetType, bool) { if o == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *NexthopInternet) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *NexthopInternet) SetType(v string) { +func (o *NexthopInternet) SetType(v NexthopInternetType) { o.Type = v } diff --git a/services/iaas/v2beta1api/model_nexthop_internet_type.go b/services/iaas/v2beta1api/model_nexthop_internet_type.go new file mode 100644 index 0000000000..8f315c813b --- /dev/null +++ b/services/iaas/v2beta1api/model_nexthop_internet_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" +) + +// NexthopInternetType the model 'NexthopInternetType' +type NexthopInternetType string + +// List of NexthopInternet_type +const ( + NEXTHOPINTERNETTYPE_INTERNET NexthopInternetType = "internet" + NEXTHOPINTERNETTYPE_UNKNOWN_DEFAULT_OPEN_API NexthopInternetType = "unknown_default_open_api" +) + +// All allowed values of NexthopInternetType enum +var AllowedNexthopInternetTypeEnumValues = []NexthopInternetType{ + "internet", + "unknown_default_open_api", +} + +func (v *NexthopInternetType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NexthopInternetType(value) + for _, existing := range AllowedNexthopInternetTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = NEXTHOPINTERNETTYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewNexthopInternetTypeFromValue returns a pointer to a valid NexthopInternetType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNexthopInternetTypeFromValue(v string) (*NexthopInternetType, error) { + ev := NexthopInternetType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopInternetType: valid values are %v", v, AllowedNexthopInternetTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NexthopInternetType) IsValid() bool { + for _, existing := range AllowedNexthopInternetTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to NexthopInternet_type value +func (v NexthopInternetType) Ptr() *NexthopInternetType { + return &v +} + +type NullableNexthopInternetType struct { + value *NexthopInternetType + isSet bool +} + +func (v NullableNexthopInternetType) Get() *NexthopInternetType { + return v.value +} + +func (v *NullableNexthopInternetType) Set(val *NexthopInternetType) { + v.value = val + v.isSet = true +} + +func (v NullableNexthopInternetType) IsSet() bool { + return v.isSet +} + +func (v *NullableNexthopInternetType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNexthopInternetType(val *NexthopInternetType) *NullableNexthopInternetType { + return &NullableNexthopInternetType{value: val, isSet: true} +} + +func (v NullableNexthopInternetType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNexthopInternetType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2beta1api/model_nexthop_ipv4.go b/services/iaas/v2beta1api/model_nexthop_ipv4.go index f9967bdc57..b58e82da8a 100644 --- a/services/iaas/v2beta1api/model_nexthop_ipv4.go +++ b/services/iaas/v2beta1api/model_nexthop_ipv4.go @@ -21,7 +21,7 @@ var _ MappedNullable = &NexthopIPv4{} // NexthopIPv4 Object that represents an IPv4 address. type NexthopIPv4 struct { - Type string `json:"type"` + Type NexthopIPv4Type `json:"type"` // An IPv4 address. Value string `json:"value" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` AdditionalProperties map[string]interface{} @@ -33,7 +33,7 @@ type _NexthopIPv4 NexthopIPv4 // 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 NewNexthopIPv4(types string, value string) *NexthopIPv4 { +func NewNexthopIPv4(types NexthopIPv4Type, value string) *NexthopIPv4 { this := NexthopIPv4{} this.Type = types this.Value = value @@ -49,9 +49,9 @@ func NewNexthopIPv4WithDefaults() *NexthopIPv4 { } // GetType returns the Type field value -func (o *NexthopIPv4) GetType() string { +func (o *NexthopIPv4) GetType() NexthopIPv4Type { if o == nil { - var ret string + var ret NexthopIPv4Type return ret } @@ -60,7 +60,7 @@ func (o *NexthopIPv4) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *NexthopIPv4) GetTypeOk() (*string, bool) { +func (o *NexthopIPv4) GetTypeOk() (*NexthopIPv4Type, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *NexthopIPv4) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *NexthopIPv4) SetType(v string) { +func (o *NexthopIPv4) SetType(v NexthopIPv4Type) { o.Type = v } diff --git a/services/iaas/v2beta1api/model_nexthop_ipv4_type.go b/services/iaas/v2beta1api/model_nexthop_ipv4_type.go new file mode 100644 index 0000000000..b92789304a --- /dev/null +++ b/services/iaas/v2beta1api/model_nexthop_ipv4_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" +) + +// NexthopIPv4Type the model 'NexthopIPv4Type' +type NexthopIPv4Type string + +// List of NexthopIPv4_type +const ( + NEXTHOPIPV4TYPE_IPV4 NexthopIPv4Type = "ipv4" + NEXTHOPIPV4TYPE_UNKNOWN_DEFAULT_OPEN_API NexthopIPv4Type = "unknown_default_open_api" +) + +// All allowed values of NexthopIPv4Type enum +var AllowedNexthopIPv4TypeEnumValues = []NexthopIPv4Type{ + "ipv4", + "unknown_default_open_api", +} + +func (v *NexthopIPv4Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NexthopIPv4Type(value) + for _, existing := range AllowedNexthopIPv4TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = NEXTHOPIPV4TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewNexthopIPv4TypeFromValue returns a pointer to a valid NexthopIPv4Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNexthopIPv4TypeFromValue(v string) (*NexthopIPv4Type, error) { + ev := NexthopIPv4Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopIPv4Type: valid values are %v", v, AllowedNexthopIPv4TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NexthopIPv4Type) IsValid() bool { + for _, existing := range AllowedNexthopIPv4TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to NexthopIPv4_type value +func (v NexthopIPv4Type) Ptr() *NexthopIPv4Type { + return &v +} + +type NullableNexthopIPv4Type struct { + value *NexthopIPv4Type + isSet bool +} + +func (v NullableNexthopIPv4Type) Get() *NexthopIPv4Type { + return v.value +} + +func (v *NullableNexthopIPv4Type) Set(val *NexthopIPv4Type) { + v.value = val + v.isSet = true +} + +func (v NullableNexthopIPv4Type) IsSet() bool { + return v.isSet +} + +func (v *NullableNexthopIPv4Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNexthopIPv4Type(val *NexthopIPv4Type) *NullableNexthopIPv4Type { + return &NullableNexthopIPv4Type{value: val, isSet: true} +} + +func (v NullableNexthopIPv4Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNexthopIPv4Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2beta1api/model_nexthop_ipv6.go b/services/iaas/v2beta1api/model_nexthop_ipv6.go index fa37d7f935..2752f7f382 100644 --- a/services/iaas/v2beta1api/model_nexthop_ipv6.go +++ b/services/iaas/v2beta1api/model_nexthop_ipv6.go @@ -21,7 +21,7 @@ var _ MappedNullable = &NexthopIPv6{} // NexthopIPv6 Object that represents an IPv6 address. type NexthopIPv6 struct { - Type string `json:"type"` + Type NexthopIPv6Type `json:"type"` // An IPv6 address. Value string `json:"value" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` AdditionalProperties map[string]interface{} @@ -33,7 +33,7 @@ type _NexthopIPv6 NexthopIPv6 // 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 NewNexthopIPv6(types string, value string) *NexthopIPv6 { +func NewNexthopIPv6(types NexthopIPv6Type, value string) *NexthopIPv6 { this := NexthopIPv6{} this.Type = types this.Value = value @@ -49,9 +49,9 @@ func NewNexthopIPv6WithDefaults() *NexthopIPv6 { } // GetType returns the Type field value -func (o *NexthopIPv6) GetType() string { +func (o *NexthopIPv6) GetType() NexthopIPv6Type { if o == nil { - var ret string + var ret NexthopIPv6Type return ret } @@ -60,7 +60,7 @@ func (o *NexthopIPv6) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *NexthopIPv6) GetTypeOk() (*string, bool) { +func (o *NexthopIPv6) GetTypeOk() (*NexthopIPv6Type, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *NexthopIPv6) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *NexthopIPv6) SetType(v string) { +func (o *NexthopIPv6) SetType(v NexthopIPv6Type) { o.Type = v } diff --git a/services/iaas/v2beta1api/model_nexthop_ipv6_type.go b/services/iaas/v2beta1api/model_nexthop_ipv6_type.go new file mode 100644 index 0000000000..1a781e2fa6 --- /dev/null +++ b/services/iaas/v2beta1api/model_nexthop_ipv6_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" +) + +// NexthopIPv6Type the model 'NexthopIPv6Type' +type NexthopIPv6Type string + +// List of NexthopIPv6_type +const ( + NEXTHOPIPV6TYPE_IPV6 NexthopIPv6Type = "ipv6" + NEXTHOPIPV6TYPE_UNKNOWN_DEFAULT_OPEN_API NexthopIPv6Type = "unknown_default_open_api" +) + +// All allowed values of NexthopIPv6Type enum +var AllowedNexthopIPv6TypeEnumValues = []NexthopIPv6Type{ + "ipv6", + "unknown_default_open_api", +} + +func (v *NexthopIPv6Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NexthopIPv6Type(value) + for _, existing := range AllowedNexthopIPv6TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = NEXTHOPIPV6TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewNexthopIPv6TypeFromValue returns a pointer to a valid NexthopIPv6Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNexthopIPv6TypeFromValue(v string) (*NexthopIPv6Type, error) { + ev := NexthopIPv6Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NexthopIPv6Type: valid values are %v", v, AllowedNexthopIPv6TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NexthopIPv6Type) IsValid() bool { + for _, existing := range AllowedNexthopIPv6TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to NexthopIPv6_type value +func (v NexthopIPv6Type) Ptr() *NexthopIPv6Type { + return &v +} + +type NullableNexthopIPv6Type struct { + value *NexthopIPv6Type + isSet bool +} + +func (v NullableNexthopIPv6Type) Get() *NexthopIPv6Type { + return v.value +} + +func (v *NullableNexthopIPv6Type) Set(val *NexthopIPv6Type) { + v.value = val + v.isSet = true +} + +func (v NullableNexthopIPv6Type) IsSet() bool { + return v.isSet +} + +func (v *NullableNexthopIPv6Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNexthopIPv6Type(val *NexthopIPv6Type) *NullableNexthopIPv6Type { + return &NullableNexthopIPv6Type{value: val, isSet: true} +} + +func (v NullableNexthopIPv6Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNexthopIPv6Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/v2beta1api/model_nic.go b/services/iaas/v2beta1api/model_nic.go index 73e3d004e3..2f75d65f2f 100644 --- a/services/iaas/v2beta1api/model_nic.go +++ b/services/iaas/v2beta1api/model_nic.go @@ -13,6 +13,7 @@ package v2beta1api import ( "encoding/json" + "time" ) // checks if the NIC type satisfies the MappedNullable interface at compile time @@ -22,6 +23,8 @@ var _ MappedNullable = &NIC{} type NIC struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` // Universally Unique Identifier (UUID). @@ -32,7 +35,7 @@ type NIC struct { Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` @@ -47,7 +50,9 @@ type NIC struct { // Possible values: `ACTIVE`, `DOWN`. Status *string `json:"status,omitempty"` // Possible values: `server`, `metadata`, `gateway`, `none`. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -106,6 +111,38 @@ func (o *NIC) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *NIC) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NIC) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *NIC) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *NIC) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *NIC) GetDescription() string { if o == nil || IsNil(o.Description) { @@ -522,6 +559,38 @@ func (o *NIC) SetType(v string) { o.Type = &v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *NIC) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NIC) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *NIC) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *NIC) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o NIC) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -535,6 +604,9 @@ func (o NIC) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Description) { toSerialize["description"] = o.Description } @@ -574,6 +646,9 @@ func (o NIC) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -597,6 +672,7 @@ func (o *NIC) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "description") delete(additionalProperties, "device") delete(additionalProperties, "id") @@ -610,6 +686,7 @@ func (o *NIC) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "securityGroups") delete(additionalProperties, "status") delete(additionalProperties, "type") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_partial_update_network_area_payload.go b/services/iaas/v2beta1api/model_partial_update_network_area_payload.go index ba14f56a0e..c6a805ca3d 100644 --- a/services/iaas/v2beta1api/model_partial_update_network_area_payload.go +++ b/services/iaas/v2beta1api/model_partial_update_network_area_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &PartialUpdateNetworkAreaPayload{} // PartialUpdateNetworkAreaPayload Object that represents the network area update request. type PartialUpdateNetworkAreaPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Name *string `json:"name,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_partial_update_network_payload.go b/services/iaas/v2beta1api/model_partial_update_network_payload.go index b9148417c2..cfd9915a75 100644 --- a/services/iaas/v2beta1api/model_partial_update_network_payload.go +++ b/services/iaas/v2beta1api/model_partial_update_network_payload.go @@ -20,11 +20,13 @@ var _ MappedNullable = &PartialUpdateNetworkPayload{} // PartialUpdateNetworkPayload Object that represents the request body for a network update. type PartialUpdateNetworkPayload struct { + // Description Object. Allows string up to 255 Characters. + Description *string `json:"description,omitempty"` // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` Ipv4 *UpdateNetworkIPv4Body `json:"ipv4,omitempty"` Ipv6 *UpdateNetworkIPv6Body `json:"ipv6,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` @@ -54,6 +56,38 @@ func NewPartialUpdateNetworkPayloadWithDefaults() *PartialUpdateNetworkPayload { return &this } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PartialUpdateNetworkPayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateNetworkPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PartialUpdateNetworkPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PartialUpdateNetworkPayload) SetDescription(v string) { + o.Description = &v +} + // GetDhcp returns the Dhcp field value if set, zero value otherwise. func (o *PartialUpdateNetworkPayload) GetDhcp() bool { if o == nil || IsNil(o.Dhcp) { @@ -288,6 +322,9 @@ func (o PartialUpdateNetworkPayload) MarshalJSON() ([]byte, error) { func (o PartialUpdateNetworkPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } @@ -331,6 +368,7 @@ func (o *PartialUpdateNetworkPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") delete(additionalProperties, "dhcp") delete(additionalProperties, "ipv4") delete(additionalProperties, "ipv6") diff --git a/services/iaas/v2beta1api/model_project.go b/services/iaas/v2beta1api/model_project.go index 91cee5950d..ee89a6d990 100644 --- a/services/iaas/v2beta1api/model_project.go +++ b/services/iaas/v2beta1api/model_project.go @@ -28,10 +28,14 @@ type Project struct { // Universally Unique Identifier (UUID). Id string `json:"id" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` InternetAccess *bool `json:"internetAccess,omitempty"` + // Possible values: `Schwarz`, `Public`, `SNA`, `VPC`. + ProjectType *string `json:"projectType,omitempty"` // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. Status string `json:"status"` // Date-time when resource was last updated. - UpdatedAt *time.Time `json:"updatedAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // Universally Unique Identifier (UUID). + VpcId *string `json:"vpcId,omitempty" 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{} } @@ -169,6 +173,38 @@ func (o *Project) SetInternetAccess(v bool) { o.InternetAccess = &v } +// GetProjectType returns the ProjectType field value if set, zero value otherwise. +func (o *Project) GetProjectType() string { + if o == nil || IsNil(o.ProjectType) { + var ret string + return ret + } + return *o.ProjectType +} + +// GetProjectTypeOk returns a tuple with the ProjectType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetProjectTypeOk() (*string, bool) { + if o == nil || IsNil(o.ProjectType) { + return nil, false + } + return o.ProjectType, true +} + +// HasProjectType returns a boolean if a field has been set. +func (o *Project) HasProjectType() bool { + if o != nil && !IsNil(o.ProjectType) { + return true + } + + return false +} + +// SetProjectType gets a reference to the given string and assigns it to the ProjectType field. +func (o *Project) SetProjectType(v string) { + o.ProjectType = &v +} + // GetStatus returns the Status field value func (o *Project) GetStatus() string { if o == nil { @@ -225,6 +261,38 @@ func (o *Project) SetUpdatedAt(v time.Time) { o.UpdatedAt = &v } +// GetVpcId returns the VpcId field value if set, zero value otherwise. +func (o *Project) GetVpcId() string { + if o == nil || IsNil(o.VpcId) { + var ret string + return ret + } + return *o.VpcId +} + +// GetVpcIdOk returns a tuple with the VpcId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetVpcIdOk() (*string, bool) { + if o == nil || IsNil(o.VpcId) { + return nil, false + } + return o.VpcId, true +} + +// HasVpcId returns a boolean if a field has been set. +func (o *Project) HasVpcId() bool { + if o != nil && !IsNil(o.VpcId) { + return true + } + + return false +} + +// SetVpcId gets a reference to the given string and assigns it to the VpcId field. +func (o *Project) SetVpcId(v string) { + o.VpcId = &v +} + func (o Project) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -243,10 +311,16 @@ func (o Project) ToMap() (map[string]interface{}, error) { if !IsNil(o.InternetAccess) { toSerialize["internetAccess"] = o.InternetAccess } + if !IsNil(o.ProjectType) { + toSerialize["projectType"] = o.ProjectType + } toSerialize["status"] = o.Status if !IsNil(o.UpdatedAt) { toSerialize["updatedAt"] = o.UpdatedAt } + if !IsNil(o.VpcId) { + toSerialize["vpcId"] = o.VpcId + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -296,8 +370,10 @@ func (o *Project) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "internetAccess") + delete(additionalProperties, "projectType") delete(additionalProperties, "status") delete(additionalProperties, "updatedAt") + delete(additionalProperties, "vpcId") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_public_ip.go b/services/iaas/v2beta1api/model_public_ip.go index b97d2c9bac..eb69db0fd3 100644 --- a/services/iaas/v2beta1api/model_public_ip.go +++ b/services/iaas/v2beta1api/model_public_ip.go @@ -13,6 +13,7 @@ package v2beta1api import ( "encoding/json" + "time" ) // checks if the PublicIp type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &PublicIp{} // PublicIp Object that represents a public IP. type PublicIp struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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}$"` // String that represents an IPv4 address. Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewPublicIpWithDefaults() *PublicIp { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PublicIp) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicIp) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PublicIp) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PublicIp) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *PublicIp) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *PublicIp) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PublicIp) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicIp) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PublicIp) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PublicIp) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o PublicIp) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o PublicIp) MarshalJSON() ([]byte, error) { func (o PublicIp) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o PublicIp) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *PublicIp) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_route.go b/services/iaas/v2beta1api/model_route.go index 824c52fd21..de1f248132 100644 --- a/services/iaas/v2beta1api/model_route.go +++ b/services/iaas/v2beta1api/model_route.go @@ -27,7 +27,7 @@ type Route struct { Destination RouteDestination `json:"destination"` // 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` Nexthop RouteNexthop `json:"nexthop"` // Date-time when resource was last updated. diff --git a/services/iaas/v2beta1api/model_routing_table.go b/services/iaas/v2beta1api/model_routing_table.go index 5c52e330bf..7652f8eb8c 100644 --- a/services/iaas/v2beta1api/model_routing_table.go +++ b/services/iaas/v2beta1api/model_routing_table.go @@ -32,7 +32,7 @@ type RoutingTable struct { DynamicRoutes *bool `json:"dynamicRoutes,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v2beta1api/model_security_group.go b/services/iaas/v2beta1api/model_security_group.go index 3fdac5a137..a19001c2e0 100644 --- a/services/iaas/v2beta1api/model_security_group.go +++ b/services/iaas/v2beta1api/model_security_group.go @@ -28,7 +28,7 @@ type SecurityGroup struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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/v2beta1api/model_server.go b/services/iaas/v2beta1api/model_server.go index 49fe5c5162..de2750c61e 100644 --- a/services/iaas/v2beta1api/model_server.go +++ b/services/iaas/v2beta1api/model_server.go @@ -40,7 +40,7 @@ type Server struct { ImageId *string `json:"imageId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The SSH keypair used during the server creation. KeypairName *string `json:"keypairName,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` diff --git a/services/iaas/v2beta1api/model_server_network.go b/services/iaas/v2beta1api/model_server_network.go index afda437ff5..8d9872e9d2 100644 --- a/services/iaas/v2beta1api/model_server_network.go +++ b/services/iaas/v2beta1api/model_server_network.go @@ -14,6 +14,7 @@ package v2beta1api import ( "encoding/json" "fmt" + "time" ) // checks if the ServerNetwork type satisfies the MappedNullable interface at compile time @@ -23,6 +24,8 @@ var _ MappedNullable = &ServerNetwork{} type ServerNetwork struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an IP address. Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. @@ -40,7 +43,9 @@ type ServerNetwork struct { // Object that represents an IP address. PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list of UUIDs. - SecurityGroups []string `json:"securityGroups,omitempty"` + SecurityGroups []string `json:"securityGroups,omitempty"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -100,6 +105,38 @@ func (o *ServerNetwork) SetAllowedAddresses(v []AllowedAddressesInner) { o.AllowedAddresses = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ServerNetwork) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ServerNetwork) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ServerNetwork) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetIpv4 returns the Ipv4 field value if set, zero value otherwise. func (o *ServerNetwork) GetIpv4() string { if o == nil || IsNil(o.Ipv4) { @@ -348,6 +385,38 @@ func (o *ServerNetwork) SetSecurityGroups(v []string) { o.SecurityGroups = v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ServerNetwork) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ServerNetwork) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ServerNetwork) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o ServerNetwork) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -361,6 +430,9 @@ func (o ServerNetwork) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowedAddresses) { toSerialize["allowedAddresses"] = o.AllowedAddresses } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Ipv4) { toSerialize["ipv4"] = o.Ipv4 } @@ -378,6 +450,9 @@ func (o ServerNetwork) ToMap() (map[string]interface{}, error) { if !IsNil(o.SecurityGroups) { toSerialize["securityGroups"] = o.SecurityGroups } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -426,6 +501,7 @@ func (o *ServerNetwork) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allowedAddresses") + delete(additionalProperties, "createdAt") delete(additionalProperties, "ipv4") delete(additionalProperties, "ipv6") delete(additionalProperties, "mac") @@ -435,6 +511,7 @@ func (o *ServerNetwork) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "nicSecurity") delete(additionalProperties, "publicIp") delete(additionalProperties, "securityGroups") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_snapshot.go b/services/iaas/v2beta1api/model_snapshot.go index 987a2135da..26eeed0276 100644 --- a/services/iaas/v2beta1api/model_snapshot.go +++ b/services/iaas/v2beta1api/model_snapshot.go @@ -30,7 +30,7 @@ type Snapshot struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_update_image_payload.go b/services/iaas/v2beta1api/model_update_image_payload.go index 0bc191aa51..ec6f407e11 100644 --- a/services/iaas/v2beta1api/model_update_image_payload.go +++ b/services/iaas/v2beta1api/model_update_image_payload.go @@ -24,7 +24,7 @@ type UpdateImagePayload struct { Config *ImageConfig `json:"config,omitempty"` // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. DiskFormat *string `json:"diskFormat,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/v2beta1api/model_update_key_pair_payload.go b/services/iaas/v2beta1api/model_update_key_pair_payload.go index 99954007cf..9a78a8e21b 100644 --- a/services/iaas/v2beta1api/model_update_key_pair_payload.go +++ b/services/iaas/v2beta1api/model_update_key_pair_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateKeyPairPayload{} // UpdateKeyPairPayload Object that represents an update request body of a public key of an SSH keypair. type UpdateKeyPairPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_update_nic_payload.go b/services/iaas/v2beta1api/model_update_nic_payload.go index 0cfd96d22b..717afde808 100644 --- a/services/iaas/v2beta1api/model_update_nic_payload.go +++ b/services/iaas/v2beta1api/model_update_nic_payload.go @@ -24,7 +24,7 @@ type UpdateNicPayload struct { AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_update_public_ip_payload.go b/services/iaas/v2beta1api/model_update_public_ip_payload.go index 6563dfe5ec..3200ebf237 100644 --- a/services/iaas/v2beta1api/model_update_public_ip_payload.go +++ b/services/iaas/v2beta1api/model_update_public_ip_payload.go @@ -13,6 +13,7 @@ package v2beta1api import ( "encoding/json" + "time" ) // checks if the UpdatePublicIPPayload type satisfies the MappedNullable interface at compile time @@ -20,14 +21,18 @@ var _ MappedNullable = &UpdatePublicIPPayload{} // UpdatePublicIPPayload Object that represents a public IP. type UpdatePublicIPPayload struct { + // Date-time when resource was created. + CreatedAt *time.Time `json:"createdAt,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}$"` // String that represents an IPv4 address. Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). - NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + NetworkInterface NullableString `json:"networkInterface,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` + // Date-time when resource was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} } @@ -50,6 +55,38 @@ func NewUpdatePublicIPPayloadWithDefaults() *UpdatePublicIPPayload { return &this } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *UpdatePublicIPPayload) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePublicIPPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *UpdatePublicIPPayload) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *UpdatePublicIPPayload) GetId() string { if o == nil || IsNil(o.Id) { @@ -189,6 +226,38 @@ func (o *UpdatePublicIPPayload) UnsetNetworkInterface() { o.NetworkInterface.Unset() } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *UpdatePublicIPPayload) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePublicIPPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *UpdatePublicIPPayload) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o UpdatePublicIPPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -199,6 +268,9 @@ func (o UpdatePublicIPPayload) MarshalJSON() ([]byte, error) { func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -211,6 +283,9 @@ func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { if o.NetworkInterface.IsSet() { toSerialize["networkInterface"] = o.NetworkInterface.Get() } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -233,10 +308,12 @@ func (o *UpdatePublicIPPayload) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") delete(additionalProperties, "id") delete(additionalProperties, "ip") delete(additionalProperties, "labels") delete(additionalProperties, "networkInterface") + delete(additionalProperties, "updatedAt") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_update_route_of_routing_table_payload.go b/services/iaas/v2beta1api/model_update_route_of_routing_table_payload.go index 9762a74f1a..575be5a18a 100644 --- a/services/iaas/v2beta1api/model_update_route_of_routing_table_payload.go +++ b/services/iaas/v2beta1api/model_update_route_of_routing_table_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateRouteOfRoutingTablePayload{} // UpdateRouteOfRoutingTablePayload Object that represents the request body for a route update. type UpdateRouteOfRoutingTablePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_update_routing_table_of_area_payload.go b/services/iaas/v2beta1api/model_update_routing_table_of_area_payload.go index 163687b5ce..e18faac2cb 100644 --- a/services/iaas/v2beta1api/model_update_routing_table_of_area_payload.go +++ b/services/iaas/v2beta1api/model_update_routing_table_of_area_payload.go @@ -24,7 +24,7 @@ type UpdateRoutingTableOfAreaPayload struct { Description *string `json:"description,omitempty"` // The update config setting for a routing table which allows propagation of dynamic routes to this routing table. DynamicRoutes *bool `json:"dynamicRoutes,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_update_server_payload.go b/services/iaas/v2beta1api/model_update_server_payload.go index 8c92de6c33..d2f66d7969 100644 --- a/services/iaas/v2beta1api/model_update_server_payload.go +++ b/services/iaas/v2beta1api/model_update_server_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdateServerPayload{} // UpdateServerPayload Object that represents an update request body of a server. type UpdateServerPayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` diff --git a/services/iaas/v2beta1api/model_update_volume_payload.go b/services/iaas/v2beta1api/model_update_volume_payload.go index 504fe843c0..3787a0c92c 100644 --- a/services/iaas/v2beta1api/model_update_volume_payload.go +++ b/services/iaas/v2beta1api/model_update_volume_payload.go @@ -25,7 +25,7 @@ type UpdateVolumePayload struct { // Description Object. Allows string up to 255 Characters. Description *string `json:"description,omitempty"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go b/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go index 174ac4949a..af21f770f8 100644 --- a/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go @@ -30,7 +30,7 @@ type V2beta1CreateSnapshotPayload struct { Description *string `json:"description,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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_v2beta1_update_backup_payload.go b/services/iaas/v2beta1api/model_v2beta1_update_backup_payload.go index 88469054d4..8bb4bf7c14 100644 --- a/services/iaas/v2beta1api/model_v2beta1_update_backup_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_update_backup_payload.go @@ -31,7 +31,7 @@ type V2beta1UpdateBackupPayload struct { 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 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_v2beta1_update_network_area_route_payload.go b/services/iaas/v2beta1api/model_v2beta1_update_network_area_route_payload.go index d907594612..fd34b2ff00 100644 --- a/services/iaas/v2beta1api/model_v2beta1_update_network_area_route_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_update_network_area_route_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &V2beta1UpdateNetworkAreaRoutePayload{} // V2beta1UpdateNetworkAreaRoutePayload Object that represents the request body for a route update. type V2beta1UpdateNetworkAreaRoutePayload struct { - // 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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_v2beta1_update_security_group_payload.go b/services/iaas/v2beta1api/model_v2beta1_update_security_group_payload.go index 52b545152a..1033722285 100644 --- a/services/iaas/v2beta1api/model_v2beta1_update_security_group_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_update_security_group_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &V2beta1UpdateSecurityGroupPayload{} type V2beta1UpdateSecurityGroupPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_v2beta1_update_snapshot_payload.go b/services/iaas/v2beta1api/model_v2beta1_update_snapshot_payload.go index 8a2ae35d01..2cf787b92b 100644 --- a/services/iaas/v2beta1api/model_v2beta1_update_snapshot_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_update_snapshot_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &V2beta1UpdateSnapshotPayload{} type V2beta1UpdateSnapshotPayload struct { // Description Object. Allows string up to 255 Characters. Description *string `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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_volume.go b/services/iaas/v2beta1api/model_volume.go index 4eb93b38a7..e77b8a5b66 100644 --- a/services/iaas/v2beta1api/model_volume.go +++ b/services/iaas/v2beta1api/model_volume.go @@ -36,7 +36,7 @@ type Volume struct { // 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}$"` ImageConfig *ImageConfig `json:"imageConfig,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` diff --git a/services/iaas/v2beta1api/model_volume_performance_class.go b/services/iaas/v2beta1api/model_volume_performance_class.go index b8e9bdc6f9..fa5c35ea7a 100644 --- a/services/iaas/v2beta1api/model_volume_performance_class.go +++ b/services/iaas/v2beta1api/model_volume_performance_class.go @@ -25,7 +25,7 @@ type VolumePerformanceClass struct { Description *string `json:"description,omitempty"` // Input/Output Operations per second. Iops *int64 `json:"iops,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. The `stackit-` prefix is reserved and cannot be used for Keys. + // 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. Labels map[string]interface{} `json:"labels,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]+)*$"`