diff --git a/CHANGELOG.md b/CHANGELOG.md index 05bb4153a2..1811893725 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,35 @@ - **Improvement:** `ListRecordSets`/`ListZones` docs clarify that records/zones in the `DELETE_SUCCEEDED` state are excluded by default; pass `state[eq]=DELETE_SUCCEEDED` to retrieve them - **Breaking Change:** `PartialUpdateZonePayload.Extensions` type changed from `ZoneExtensions` to `DomainExtensions`, now also exposing `observabilityExtension.state` - `iaas`: + - [v1.15.0](services/iaas/CHANGELOG.md#v1150) + - **Breaking change:** Removal of deprecated compatibility layer previously found in the root of the SDK module + - **Dependencies:** Bump STACKIT SDK resourcemanager module from `v0.26.0` to `v0.26.1` + - `v1api`: + - **Docs:** Update documentation for `labels` field constraints across models. + - **Feature:** Add `Description` field in `Network` model + - **Feature:** Add `CreatedAt` and `UpdatedAt` timestamps in `NIC`, `PublicIp` and `ServerNetwork` model + - `v2api`: + - **Docs:** Update documentation for `labels` field constraints across models. + - **Feature:** Add `Description` field in `Network` model + - **Feature:** Add `CreatedAt` and `UpdatedAt` timestamps in `NIC`, `PublicIp` and `ServerNetwork` model + - **Feature:** Add new enum `DestinationCIDRv4Type` for `Type` field in `DestinationCIDRv4` model + - **Feature:** Add new enum `DestinationCIDRv6Type` for `Type` field in `DestinationCIDRv6` model + - **Feature:** Add new enum `NexthopBlackholeType` for `Type` field in `NexthopBlackhole` model + - **Feature:** Add new enum `NexthopInternetType` for `Type` field in `NexthopInternet` model + - **Feature:** Add new enum `NexthopIPv4Type` for `Type` field in `NexthopIPv4` model + - **Feature:** Add new enum `NexthopIPv6Type` for `Type` field in `NexthopIPv6` model + - **Feature:** Add `ProjectType` and `VpcId` fields in `Project` model + - `v2beta1api`: + - **Docs:** Update documentation for `labels` field constraints across models. + - **Feature:** Add `Description` field in `Network` model + - **Feature:** Add `CreatedAt` and `UpdatedAt` timestamps in `NIC`, `PublicIp` and `ServerNetwork` model + - **Feature:** Add new enum `DestinationCIDRv4Type` for `Type` field in `DestinationCIDRv4` model + - **Feature:** Add new enum `DestinationCIDRv6Type` for `Type` field in `DestinationCIDRv6` model + - **Feature:** Add new enum `NexthopBlackholeType` for `Type` field in `NexthopBlackhole` model + - **Feature:** Add new enum `NexthopInternetType` for `Type` field in `NexthopInternet` model + - **Feature:** Add new enum `NexthopIPv4Type` for `Type` field in `NexthopIPv4` model + - **Feature:** Add new enum `NexthopIPv6Type` for `Type` field in `NexthopIPv6` model + - **Feature:** Add `ProjectType` and `VpcId` fields in `Project` model - [v1.14.5](services/iaas/CHANGELOG.md#v1145) - **Dependencies:** Bump STACKIT SDK core module from `v0.27.0` to `v0.27.1` - [v1.14.4](services/iaas/CHANGELOG.md#v1144) diff --git a/examples/iaas/go.mod b/examples/iaas/go.mod index 3dbbb4711d..5ff16135c2 100644 --- a/examples/iaas/go.mod +++ b/examples/iaas/go.mod @@ -13,5 +13,5 @@ require ( require ( github.com/golang-jwt/jwt/v5 v5.3.1 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.26.0 // indirect + github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.26.1 // indirect ) diff --git a/examples/iaas/go.sum b/examples/iaas/go.sum index fdd4a635df..aa241359ee 100644 --- a/examples/iaas/go.sum +++ b/examples/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/.openapi-generator/VERSION b/services/iaas/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/services/iaas/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/services/iaas/CHANGELOG.md b/services/iaas/CHANGELOG.md index 89252361cb..c73dcc44e3 100644 --- a/services/iaas/CHANGELOG.md +++ b/services/iaas/CHANGELOG.md @@ -1,3 +1,33 @@ +## v1.15.0 +- **Breaking change:** Removal of deprecated compatibility layer previously found in the root of the SDK module +- **Dependencies:** Bump STACKIT SDK resourcemanager module from `v0.26.0` to `v0.26.1` +- `v1api`: + - **Docs:** Update documentation for `labels` field constraints across models. + - **Feature:** Add `Description` field in `Network` model + - **Feature:** Add `CreatedAt` and `UpdatedAt` timestamps in `NIC`, `PublicIp` and `ServerNetwork` model +- `v2api`: + - **Docs:** Update documentation for `labels` field constraints across models. + - **Feature:** Add `Description` field in `Network` model + - **Feature:** Add `CreatedAt` and `UpdatedAt` timestamps in `NIC`, `PublicIp` and `ServerNetwork` model + - **Feature:** Add new enum `DestinationCIDRv4Type` for `Type` field in `DestinationCIDRv4` model + - **Feature:** Add new enum `DestinationCIDRv6Type` for `Type` field in `DestinationCIDRv6` model + - **Feature:** Add new enum `NexthopBlackholeType` for `Type` field in `NexthopBlackhole` model + - **Feature:** Add new enum `NexthopInternetType` for `Type` field in `NexthopInternet` model + - **Feature:** Add new enum `NexthopIPv4Type` for `Type` field in `NexthopIPv4` model + - **Feature:** Add new enum `NexthopIPv6Type` for `Type` field in `NexthopIPv6` model + - **Feature:** Add `ProjectType` and `VpcId` fields in `Project` model +- `v2beta1api`: + - **Docs:** Update documentation for `labels` field constraints across models. + - **Feature:** Add `Description` field in `Network` model + - **Feature:** Add `CreatedAt` and `UpdatedAt` timestamps in `NIC`, `PublicIp` and `ServerNetwork` model + - **Feature:** Add new enum `DestinationCIDRv4Type` for `Type` field in `DestinationCIDRv4` model + - **Feature:** Add new enum `DestinationCIDRv6Type` for `Type` field in `DestinationCIDRv6` model + - **Feature:** Add new enum `NexthopBlackholeType` for `Type` field in `NexthopBlackhole` model + - **Feature:** Add new enum `NexthopInternetType` for `Type` field in `NexthopInternet` model + - **Feature:** Add new enum `NexthopIPv4Type` for `Type` field in `NexthopIPv4` model + - **Feature:** Add new enum `NexthopIPv6Type` for `Type` field in `NexthopIPv6` model + - **Feature:** Add `ProjectType` and `VpcId` fields in `Project` model + ## v1.14.5 - **Dependencies:** Bump STACKIT SDK core module from `v0.27.0` to `v0.27.1` diff --git a/services/iaas/VERSION b/services/iaas/VERSION index 2f61680e49..440ddd8f1c 100644 --- a/services/iaas/VERSION +++ b/services/iaas/VERSION @@ -1 +1 @@ -v1.14.5 +v1.15.0 diff --git a/services/iaas/api_default.go b/services/iaas/api_default.go deleted file mode 100644 index 6c50e53de2..0000000000 --- a/services/iaas/api_default.go +++ /dev/null @@ -1,32140 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "bytes" - "context" - "fmt" - "io" - "net/http" - "net/url" - "strings" - - "github.com/stackitcloud/stackit-sdk-go/core/config" - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" -) - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DefaultApi interface { - /* - AddNetworkToServer Create and attach a network interface from the specified network. - Create and attach a network interface from the specified network to the server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiAddNetworkToServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddNetworkToServer(ctx context.Context, projectId string, region string, serverId string, networkId string) ApiAddNetworkToServerRequest - /* - AddNetworkToServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddNetworkToServerExecute(ctx context.Context, projectId string, region string, serverId string, networkId string) error - /* - AddNicToServer Attach an existing network interface. - Attach an existing network interface to a server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param nicId The identifier (ID) of a network interface. - @return ApiAddNicToServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddNicToServer(ctx context.Context, projectId string, region string, serverId string, nicId string) ApiAddNicToServerRequest - /* - AddNicToServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddNicToServerExecute(ctx context.Context, projectId string, region string, serverId string, nicId string) error - /* - AddPublicIpToServer Associate a public IP to the server. - Associate a public IP to a server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param publicIpId The identifier (ID) of a Public IP. - @return ApiAddPublicIpToServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddPublicIpToServer(ctx context.Context, projectId string, region string, serverId string, publicIpId string) ApiAddPublicIpToServerRequest - /* - AddPublicIpToServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddPublicIpToServerExecute(ctx context.Context, projectId string, region string, serverId string, publicIpId string) error - /* - AddRoutesToRoutingTable Create new routes in a routing table. - Create new routes in an existing routing table. - - @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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddRoutesToRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiAddRoutesToRoutingTableRequest - /* - AddRoutesToRoutingTableExecute executes the request - - @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 RouteListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddRoutesToRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) (*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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddRoutingTableToArea(ctx context.Context, organizationId string, areaId string, region string) ApiAddRoutingTableToAreaRequest - /* - AddRoutingTableToAreaExecute executes the request - - @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 RoutingTable - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddRoutingTableToAreaExecute(ctx context.Context, organizationId string, areaId string, region string) (*RoutingTable, error) - /* - AddSecurityGroupToServer Add a server to a security group. - Add an existing server to an existing security group. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiAddSecurityGroupToServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddSecurityGroupToServer(ctx context.Context, projectId string, region string, serverId string, securityGroupId string) ApiAddSecurityGroupToServerRequest - /* - AddSecurityGroupToServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddSecurityGroupToServerExecute(ctx context.Context, projectId string, region string, serverId string, securityGroupId string) error - /* - AddServiceAccountToServer Attach service account to a server. - Attach a service account to the server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param serviceAccountMail The e-mail address of a service account. - @return ApiAddServiceAccountToServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddServiceAccountToServer(ctx context.Context, projectId string, region string, serverId string, serviceAccountMail string) ApiAddServiceAccountToServerRequest - /* - AddServiceAccountToServerExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @param serviceAccountMail The e-mail address of a service account. - @return ServiceAccountMailListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddServiceAccountToServerExecute(ctx context.Context, projectId string, region string, serverId string, serviceAccountMail string) (*ServiceAccountMailListResponse, error) - /* - AddVolumeToServer Attach a volume to a server. - Attach an existing volume to an existing server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return ApiAddVolumeToServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddVolumeToServer(ctx context.Context, projectId string, region string, serverId string, volumeId string) ApiAddVolumeToServerRequest - /* - AddVolumeToServerExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return VolumeAttachment - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - AddVolumeToServerExecute(ctx context.Context, projectId string, region string, serverId string, volumeId string) (*VolumeAttachment, error) - /* - CreateAffinityGroup Create a new affinity group in a project. - Create a new server affinity group in the given project ID. - - @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 ApiCreateAffinityGroupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateAffinityGroup(ctx context.Context, projectId string, region string) ApiCreateAffinityGroupRequest - /* - CreateAffinityGroupExecute executes the request - - @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 AffinityGroup - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateAffinityGroupExecute(ctx context.Context, projectId string, region string) (*AffinityGroup, error) - /* - CreateBackup Create new Backup. - Create a new Backup in a project. If a snapshot ID is provided create the backup from the snapshot. - - @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 ApiCreateBackupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateBackup(ctx context.Context, projectId string, region string) ApiCreateBackupRequest - /* - CreateBackupExecute executes the request - - @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 Backup - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateBackupExecute(ctx context.Context, projectId string, region string) (*Backup, error) - /* - CreateImage Create new Image. - Create a new Image in a project in queued state. Image data must be imported separately. This call returns a pre-signed URL to upload small images. - - @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 ApiCreateImageRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateImage(ctx context.Context, projectId string, region string) ApiCreateImageRequest - /* - CreateImageExecute executes the request - - @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 ImageCreateResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateImageExecute(ctx context.Context, projectId string, region string) (*ImageCreateResponse, error) - /* - CreateIsolatedNetwork Create a single isolated network. - Creates an isolated network which is not connected to other networks in this project. We recommend using this endpoint only if you are fully aware of its purpose and the consequences of its execution. - - @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 ApiCreateIsolatedNetworkRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateIsolatedNetwork(ctx context.Context, projectId string, region string) ApiCreateIsolatedNetworkRequest - /* - CreateIsolatedNetworkExecute executes the request - - @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 Network - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateIsolatedNetworkExecute(ctx context.Context, projectId string, region string) (*Network, error) - /* - CreateKeyPair Import a public key. - Import a new public key for the requesting user based on provided public key material. The creation will fail if an SSH keypair with the same name already exists. If a name is not provided it is autogenerated form the ssh-pubkey comment section. If that is also not present it will be the the MD5 fingerprint of the key. For autogenerated names invalid characters will be removed. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateKeyPairRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateKeyPair(ctx context.Context) ApiCreateKeyPairRequest - /* - CreateKeyPairExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Keypair - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateKeyPairExecute(ctx context.Context) (*Keypair, 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetwork(ctx context.Context, projectId string, region string) ApiCreateNetworkRequest - /* - CreateNetworkExecute executes the request - - @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 Network - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkExecute(ctx context.Context, projectId string, region string) (*Network, error) - /* - CreateNetworkArea Create new network area in an organization. - Create a new network area in an organization. You can specify `"preview/routingtables"="true"` as a label to enable the preview routing tables feature. This feature cannot be enabled or disabled afterwards. - - @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. - @return ApiCreateNetworkAreaRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkArea(ctx context.Context, organizationId string) ApiCreateNetworkAreaRequest - /* - CreateNetworkAreaExecute executes the request - - @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. - @return NetworkArea - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkAreaExecute(ctx context.Context, organizationId string) (*NetworkArea, error) - /* - CreateNetworkAreaRange Create new network range in a network area. - Create a new network range 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 ApiCreateNetworkAreaRangeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkAreaRange(ctx context.Context, organizationId string, areaId string, region string) ApiCreateNetworkAreaRangeRequest - /* - CreateNetworkAreaRangeExecute executes the request - - @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 NetworkRangeListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkAreaRangeExecute(ctx context.Context, organizationId string, areaId string, region string) (*NetworkRangeListResponse, error) - /* - CreateNetworkAreaRegion Configure a region for a network area. - Configure a new region for 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 ApiCreateNetworkAreaRegionRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkAreaRegion(ctx context.Context, organizationId string, areaId string, region string) ApiCreateNetworkAreaRegionRequest - /* - CreateNetworkAreaRegionExecute executes the request - - @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 RegionalArea - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) (*RegionalArea, error) - /* - CreateNetworkAreaRoute Create new network routes. - Create one or several new network routes 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 ApiCreateNetworkAreaRouteRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkAreaRoute(ctx context.Context, organizationId string, areaId string, region string) ApiCreateNetworkAreaRouteRequest - /* - CreateNetworkAreaRouteExecute executes the request - - @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 RouteListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNetworkAreaRouteExecute(ctx context.Context, organizationId string, areaId string, region string) (*RouteListResponse, error) - /* - CreateNic Create new network interface. - Create a new network interface 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 region The STACKIT Region of the resources. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiCreateNicRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNic(ctx context.Context, projectId string, region string, networkId string) ApiCreateNicRequest - /* - CreateNicExecute executes the request - - @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 NIC - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateNicExecute(ctx context.Context, projectId string, region string, networkId string) (*NIC, error) - /* - CreatePublicIP Create new public IP. - Create a new public IP 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 region The STACKIT Region of the resources. - @return ApiCreatePublicIPRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreatePublicIP(ctx context.Context, projectId string, region string) ApiCreatePublicIPRequest - /* - CreatePublicIPExecute executes the request - - @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 PublicIp - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreatePublicIPExecute(ctx context.Context, projectId string, region string) (*PublicIp, error) - /* - CreateSecurityGroup Create new security group. - Create a new security group 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 region The STACKIT Region of the resources. - @return ApiCreateSecurityGroupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateSecurityGroup(ctx context.Context, projectId string, region string) ApiCreateSecurityGroupRequest - /* - CreateSecurityGroupExecute executes the request - - @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 SecurityGroup - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateSecurityGroupExecute(ctx context.Context, projectId string, region string) (*SecurityGroup, error) - /* - CreateSecurityGroupRule Create new security group rule. - Create a new security group rule 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 region The STACKIT Region of the resources. - @param securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiCreateSecurityGroupRuleRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateSecurityGroupRule(ctx context.Context, projectId string, region string, securityGroupId string) ApiCreateSecurityGroupRuleRequest - /* - CreateSecurityGroupRuleExecute executes the request - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return SecurityGroupRule - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateSecurityGroupRuleExecute(ctx context.Context, projectId string, region string, securityGroupId string) (*SecurityGroupRule, error) - /* - CreateServer Create new server. - Create a new server 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 region The STACKIT Region of the resources. - @return ApiCreateServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateServer(ctx context.Context, projectId string, region string) ApiCreateServerRequest - /* - CreateServerExecute executes the request - - @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 Server - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateServerExecute(ctx context.Context, projectId string, region string) (*Server, error) - /* - CreateSnapshot Create new Snapshot. - Create a new Snapshot from a Volume 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 region The STACKIT Region of the resources. - @return ApiCreateSnapshotRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateSnapshot(ctx context.Context, projectId string, region string) ApiCreateSnapshotRequest - /* - CreateSnapshotExecute executes the request - - @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 Snapshot - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateSnapshotExecute(ctx context.Context, projectId string, region string) (*Snapshot, error) - /* - CreateVolume Create new volume. - Create a new volume in a project. If a volume source is not provided, an empty volume will be created. The size property is required if no source or an image source is 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 region The STACKIT Region of the resources. - @return ApiCreateVolumeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateVolume(ctx context.Context, projectId string, region string) ApiCreateVolumeRequest - /* - CreateVolumeExecute executes the request - - @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 Volume - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateVolumeExecute(ctx context.Context, projectId string, region string) (*Volume, error) - /* - DeallocateServer Deallocate an existing server. - Deallocate an existing server. The server will be removed from the hypervisor so only the volume will be billed. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiDeallocateServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeallocateServer(ctx context.Context, projectId string, region string, serverId string) ApiDeallocateServerRequest - /* - DeallocateServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeallocateServerExecute(ctx context.Context, projectId string, region string, serverId string) error - /* - DeleteAffinityGroup Delete a affinity group in a project. - Delete a affinity group in the given 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 affinityGroupId The identifier (ID) of a STACKIT Affinity Group. - @return ApiDeleteAffinityGroupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteAffinityGroup(ctx context.Context, projectId string, region string, affinityGroupId string) ApiDeleteAffinityGroupRequest - /* - DeleteAffinityGroupExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteAffinityGroupExecute(ctx context.Context, projectId string, region string, affinityGroupId string) error - /* - DeleteBackup Delete a backup. - Delete a backup that is part of the 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 backupId The identifier (ID) of a STACKIT Backup. - @return ApiDeleteBackupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteBackup(ctx context.Context, projectId string, region string, backupId string) ApiDeleteBackupRequest - /* - DeleteBackupExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteBackupExecute(ctx context.Context, projectId string, region string, backupId string) error - /* - DeleteImage Delete an Image. - Delete an image that is part of the 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 imageId The identifier (ID) of a STACKIT Image. - @return ApiDeleteImageRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteImage(ctx context.Context, projectId string, region string, imageId string) ApiDeleteImageRequest - /* - DeleteImageExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteImageExecute(ctx context.Context, projectId string, region string, imageId string) error - /* - DeleteImageShare Remove image share. - Remove the image share. New scope will be local. - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiDeleteImageShareRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteImageShare(ctx context.Context, projectId string, region string, imageId string) ApiDeleteImageShareRequest - /* - DeleteImageShareExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteImageShareExecute(ctx context.Context, projectId string, region string, imageId string) error - /* - DeleteImageShareConsumer Remove an image share consumer. - Remove consumer from a shared image. - - @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 imageId The identifier (ID) of a STACKIT Image. - @param consumerProjectId The identifier (ID) of a STACKIT Project that consumes an image share. - @return ApiDeleteImageShareConsumerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteImageShareConsumer(ctx context.Context, projectId string, region string, imageId string, consumerProjectId string) ApiDeleteImageShareConsumerRequest - /* - DeleteImageShareConsumerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteImageShareConsumerExecute(ctx context.Context, projectId string, region string, imageId string, consumerProjectId string) error - /* - DeleteKeyPair Delete an SSH keypair. - Delete an SSH keypair from a user. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param keypairName The name of an SSH keypair. - @return ApiDeleteKeyPairRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteKeyPair(ctx context.Context, keypairName string) ApiDeleteKeyPairRequest - /* - DeleteKeyPairExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteKeyPairExecute(ctx context.Context, keypairName string) 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetwork(ctx context.Context, projectId string, region string, networkId string) ApiDeleteNetworkRequest - /* - DeleteNetworkExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkExecute(ctx context.Context, projectId string, region string, networkId string) error - /* - DeleteNetworkArea Delete a network area. - Delete an existing network area in an organization. This is only possible if no projects are using the area anymore. - - @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. - @return ApiDeleteNetworkAreaRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkArea(ctx context.Context, organizationId string, areaId string) ApiDeleteNetworkAreaRequest - /* - DeleteNetworkAreaExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkAreaExecute(ctx context.Context, organizationId string, areaId string) error - /* - DeleteNetworkAreaRange Delete a network range. - Delete a network range of a network area. The deletion will fail if the network range is still used. - - @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 networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiDeleteNetworkAreaRangeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkAreaRange(ctx context.Context, organizationId string, areaId string, region string, networkRangeId string) ApiDeleteNetworkAreaRangeRequest - /* - DeleteNetworkAreaRangeExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkAreaRangeExecute(ctx context.Context, organizationId string, areaId string, region string, networkRangeId string) error - /* - DeleteNetworkAreaRegion Delete a configuration of region for a network area. - Delete a current configuration of region for 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 ApiDeleteNetworkAreaRegionRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkAreaRegion(ctx context.Context, organizationId string, areaId string, region string) ApiDeleteNetworkAreaRegionRequest - /* - DeleteNetworkAreaRegionExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) error - /* - DeleteNetworkAreaRoute Delete a network route. - Delete a network route 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 routeId The identifier (ID) of a STACKIT Route. - @return ApiDeleteNetworkAreaRouteRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkAreaRoute(ctx context.Context, organizationId string, areaId string, region string, routeId string) ApiDeleteNetworkAreaRouteRequest - /* - DeleteNetworkAreaRouteExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNetworkAreaRouteExecute(ctx context.Context, organizationId string, areaId string, region string, routeId string) error - /* - DeleteNic Delete a network interface. - Delete a network interface that is part of the 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. - @param nicId The identifier (ID) of a network interface. - @return ApiDeleteNicRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNic(ctx context.Context, projectId string, region string, networkId string, nicId string) ApiDeleteNicRequest - /* - DeleteNicExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteNicExecute(ctx context.Context, projectId string, region string, networkId string, nicId string) error - /* - DeletePublicIP Delete a public IP. - Delete a public IP that is part of the 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 publicIpId The identifier (ID) of a Public IP. - @return ApiDeletePublicIPRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeletePublicIP(ctx context.Context, projectId string, region string, publicIpId string) ApiDeletePublicIPRequest - /* - DeletePublicIPExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeletePublicIPExecute(ctx context.Context, projectId string, region string, publicIpId string) error - /* - DeleteRouteFromRoutingTable Delete a route in a routing table. - Delete a route in an existing routing table. - - @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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteRouteFromRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiDeleteRouteFromRoutingTableRequest - /* - DeleteRouteFromRoutingTableExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteRouteFromRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteRoutingTableFromArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiDeleteRoutingTableFromAreaRequest - /* - DeleteRoutingTableFromAreaExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteRoutingTableFromAreaExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) error - /* - DeleteSecurityGroup Delete security group. - Delete a security group. - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiDeleteSecurityGroupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteSecurityGroup(ctx context.Context, projectId string, region string, securityGroupId string) ApiDeleteSecurityGroupRequest - /* - DeleteSecurityGroupExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteSecurityGroupExecute(ctx context.Context, projectId string, region string, securityGroupId string) error - /* - DeleteSecurityGroupRule Delete security group rule. - Delete a security group rule. - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @param securityGroupRuleId The identifier (ID) of a STACKIT Security Group Rule. - @return ApiDeleteSecurityGroupRuleRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteSecurityGroupRule(ctx context.Context, projectId string, region string, securityGroupId string, securityGroupRuleId string) ApiDeleteSecurityGroupRuleRequest - /* - DeleteSecurityGroupRuleExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteSecurityGroupRuleExecute(ctx context.Context, projectId string, region string, securityGroupId string, securityGroupRuleId string) error - /* - DeleteServer Delete a server. - Delete a server. Volumes won't be deleted. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiDeleteServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteServer(ctx context.Context, projectId string, region string, serverId string) ApiDeleteServerRequest - /* - DeleteServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteServerExecute(ctx context.Context, projectId string, region string, serverId string) error - /* - DeleteSnapshot Delete a snapshot. - Delete a snapshot that is part of the 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 snapshotId The identifier (ID) of a STACKIT Snapshot. - @return ApiDeleteSnapshotRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteSnapshot(ctx context.Context, projectId string, region string, snapshotId string) ApiDeleteSnapshotRequest - /* - DeleteSnapshotExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteSnapshotExecute(ctx context.Context, projectId string, region string, snapshotId string) error - /* - DeleteVolume Delete a volume. - Delete a volume inside a project. The deletion will fail if the volume is still in use. - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return ApiDeleteVolumeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteVolume(ctx context.Context, projectId string, region string, volumeId string) ApiDeleteVolumeRequest - /* - DeleteVolumeExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteVolumeExecute(ctx context.Context, projectId string, region string, volumeId string) error - /* - GetAffinityGroup Get the affinity group. - Get the affinity group created 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 region The STACKIT Region of the resources. - @param affinityGroupId The identifier (ID) of a STACKIT Affinity Group. - @return ApiGetAffinityGroupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetAffinityGroup(ctx context.Context, projectId string, region string, affinityGroupId string) ApiGetAffinityGroupRequest - /* - GetAffinityGroupExecute executes the request - - @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 affinityGroupId The identifier (ID) of a STACKIT Affinity Group. - @return AffinityGroup - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetAffinityGroupExecute(ctx context.Context, projectId string, region string, affinityGroupId string) (*AffinityGroup, error) - /* - GetAttachedVolume Get Volume Attachment details. - Get the details of an existing Volume Attachment. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return ApiGetAttachedVolumeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetAttachedVolume(ctx context.Context, projectId string, region string, serverId string, volumeId string) ApiGetAttachedVolumeRequest - /* - GetAttachedVolumeExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return VolumeAttachment - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetAttachedVolumeExecute(ctx context.Context, projectId string, region string, serverId string, volumeId string) (*VolumeAttachment, error) - /* - GetBackup Get details about a backup. - Get details about a block device backup. - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return ApiGetBackupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetBackup(ctx context.Context, projectId string, region string, backupId string) ApiGetBackupRequest - /* - GetBackupExecute executes the request - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return Backup - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetBackupExecute(ctx context.Context, projectId string, region string, backupId string) (*Backup, error) - /* - GetImage Get details about an image. - Get details about a specific Image 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 imageId The identifier (ID) of a STACKIT Image. - @return ApiGetImageRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetImage(ctx context.Context, projectId string, region string, imageId string) ApiGetImageRequest - /* - GetImageExecute executes the request - - @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 imageId The identifier (ID) of a STACKIT Image. - @return Image - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetImageExecute(ctx context.Context, projectId string, region string, imageId string) (*Image, error) - /* - GetImageShare Get share details of an image. - Get share details about an shared image. - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiGetImageShareRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetImageShare(ctx context.Context, projectId string, region string, imageId string) ApiGetImageShareRequest - /* - GetImageShareExecute executes the request - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ImageShare - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetImageShareExecute(ctx context.Context, projectId string, region string, imageId string) (*ImageShare, error) - /* - GetImageShareConsumer Get image share consumer. - Get details about an image share consumer. - - @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 imageId The identifier (ID) of a STACKIT Image. - @param consumerProjectId The identifier (ID) of a STACKIT Project that consumes an image share. - @return ApiGetImageShareConsumerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetImageShareConsumer(ctx context.Context, projectId string, region string, imageId string, consumerProjectId string) ApiGetImageShareConsumerRequest - /* - GetImageShareConsumerExecute executes the request - - @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 imageId The identifier (ID) of a STACKIT Image. - @param consumerProjectId The identifier (ID) of a STACKIT Project that consumes an image share. - @return ImageShareConsumer - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetImageShareConsumerExecute(ctx context.Context, projectId string, region string, imageId string, consumerProjectId string) (*ImageShareConsumer, error) - /* - GetKeyPair Get SSH keypair details. - Get details about an SSH keypair. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param keypairName The name of an SSH keypair. - @return ApiGetKeyPairRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetKeyPair(ctx context.Context, keypairName string) ApiGetKeyPairRequest - /* - GetKeyPairExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param keypairName The name of an SSH keypair. - @return Keypair - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetKeyPairExecute(ctx context.Context, keypairName string) (*Keypair, error) - /* - GetMachineType Get details about a machine type. - Get details about a specific machine type. - - @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 machineType STACKIT machine type Name. - @return ApiGetMachineTypeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetMachineType(ctx context.Context, projectId string, region string, machineType string) ApiGetMachineTypeRequest - /* - GetMachineTypeExecute executes the request - - @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 machineType STACKIT machine type Name. - @return MachineType - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetMachineTypeExecute(ctx context.Context, projectId string, region string, machineType string) (*MachineType, 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetwork(ctx context.Context, projectId string, region string, networkId string) ApiGetNetworkRequest - /* - GetNetworkExecute executes the request - - @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 Network - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkExecute(ctx context.Context, projectId string, region string, networkId string) (*Network, error) - /* - GetNetworkArea Get details about a network area. - Get details about a network area in an organization. - - @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. - @return ApiGetNetworkAreaRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkArea(ctx context.Context, organizationId string, areaId string) ApiGetNetworkAreaRequest - /* - GetNetworkAreaExecute executes the request - - @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. - @return NetworkArea - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkAreaExecute(ctx context.Context, organizationId string, areaId string) (*NetworkArea, error) - /* - GetNetworkAreaRange Get details about a network range. - Get details about a network range 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 networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiGetNetworkAreaRangeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkAreaRange(ctx context.Context, organizationId string, areaId string, region string, networkRangeId string) ApiGetNetworkAreaRangeRequest - /* - GetNetworkAreaRangeExecute executes the request - - @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 networkRangeId The identifier (ID) of a STACKIT Network Range. - @return NetworkRange - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkAreaRangeExecute(ctx context.Context, organizationId string, areaId string, region string, networkRangeId string) (*NetworkRange, error) - /* - GetNetworkAreaRegion Get details about a configured region. - Get details about a configured region 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 ApiGetNetworkAreaRegionRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkAreaRegion(ctx context.Context, organizationId string, areaId string, region string) ApiGetNetworkAreaRegionRequest - /* - GetNetworkAreaRegionExecute executes the request - - @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 RegionalArea - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) (*RegionalArea, error) - /* - GetNetworkAreaRoute Get details about a network route. - Get details about a network route 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 routeId The identifier (ID) of a STACKIT Route. - @return ApiGetNetworkAreaRouteRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkAreaRoute(ctx context.Context, organizationId string, areaId string, region string, routeId string) ApiGetNetworkAreaRouteRequest - /* - GetNetworkAreaRouteExecute executes the request - - @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 routeId The identifier (ID) of a STACKIT Route. - @return Route - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNetworkAreaRouteExecute(ctx context.Context, organizationId string, areaId string, region string, routeId string) (*Route, error) - /* - GetNic Get details about a network interface. - Get details about a network interface inside a network. - - @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. - @param nicId The identifier (ID) of a network interface. - @return ApiGetNicRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNic(ctx context.Context, projectId string, region string, networkId string, nicId string) ApiGetNicRequest - /* - GetNicExecute executes the request - - @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. - @param nicId The identifier (ID) of a network interface. - @return NIC - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetNicExecute(ctx context.Context, projectId string, region string, networkId string, nicId string) (*NIC, error) - /* - GetOrganizationRequest Lookup an organization request ID. - Lookup an organization request ID from a previous request. This allows to find resource IDs of resources generated during a organization request. - - @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 requestId The identifier (ID) of a STACKIT Request. - @return ApiGetOrganizationRequestRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetOrganizationRequest(ctx context.Context, organizationId string, requestId string) ApiGetOrganizationRequestRequest - /* - GetOrganizationRequestExecute executes the request - - @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 requestId The identifier (ID) of a STACKIT Request. - @return Request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetOrganizationRequestExecute(ctx context.Context, organizationId string, requestId string) (*Request, error) - /* - GetProjectDetails Get project details. - Get details about a STACKIT 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 ApiGetProjectDetailsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetProjectDetails(ctx context.Context, projectId string) ApiGetProjectDetailsRequest - /* - GetProjectDetailsExecute executes the request - - @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 Project - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetProjectDetailsExecute(ctx context.Context, projectId string) (*Project, error) - /* - GetProjectNIC Get details about a network interface of a project. - Get details about a network interface 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 nicId The identifier (ID) of a network interface. - @return ApiGetProjectNICRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetProjectNIC(ctx context.Context, projectId string, region string, nicId string) ApiGetProjectNICRequest - /* - GetProjectNICExecute executes the request - - @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 nicId The identifier (ID) of a network interface. - @return NIC - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetProjectNICExecute(ctx context.Context, projectId string, region string, nicId string) (*NIC, error) - /* - GetProjectRequest Lookup a project request ID. - Lookup a project request ID from a previous request. This allows to find resource IDs of resources generated during a projects request. - - @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 requestId The identifier (ID) of a STACKIT Request. - @return ApiGetProjectRequestRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetProjectRequest(ctx context.Context, projectId string, region string, requestId string) ApiGetProjectRequestRequest - /* - GetProjectRequestExecute executes the request - - @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 requestId The identifier (ID) of a STACKIT Request. - @return Request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetProjectRequestExecute(ctx context.Context, projectId string, region string, requestId string) (*Request, error) - /* - GetPublicIP Get details about a public IP. - Get details about a public IP 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 publicIpId The identifier (ID) of a Public IP. - @return ApiGetPublicIPRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetPublicIP(ctx context.Context, projectId string, region string, publicIpId string) ApiGetPublicIPRequest - /* - GetPublicIPExecute executes the request - - @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 publicIpId The identifier (ID) of a Public IP. - @return PublicIp - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetPublicIPExecute(ctx context.Context, projectId string, region string, publicIpId string) (*PublicIp, error) - /* - GetRouteOfRoutingTable Get details about a route of a routing table. - Get details about a route defined in a routing table. - - @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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiGetRouteOfRoutingTableRequest - /* - GetRouteOfRoutingTableExecute executes the request - - @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 Route - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetRouteOfRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) (*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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiGetRoutingTableOfAreaRequest - /* - GetRoutingTableOfAreaExecute executes the request - - @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 RoutingTable - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetRoutingTableOfAreaExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) (*RoutingTable, error) - /* - GetSecurityGroup Get security group details. - Get details about a security group 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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiGetSecurityGroupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetSecurityGroup(ctx context.Context, projectId string, region string, securityGroupId string) ApiGetSecurityGroupRequest - /* - GetSecurityGroupExecute executes the request - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return SecurityGroup - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetSecurityGroupExecute(ctx context.Context, projectId string, region string, securityGroupId string) (*SecurityGroup, error) - /* - GetSecurityGroupRule Get security group rule details. - Get details about a security group rule 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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @param securityGroupRuleId The identifier (ID) of a STACKIT Security Group Rule. - @return ApiGetSecurityGroupRuleRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetSecurityGroupRule(ctx context.Context, projectId string, region string, securityGroupId string, securityGroupRuleId string) ApiGetSecurityGroupRuleRequest - /* - GetSecurityGroupRuleExecute executes the request - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @param securityGroupRuleId The identifier (ID) of a STACKIT Security Group Rule. - @return SecurityGroupRule - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetSecurityGroupRuleExecute(ctx context.Context, projectId string, region string, securityGroupId string, securityGroupRuleId string) (*SecurityGroupRule, error) - /* - GetServer Get server details. - Get details about a server by its ID. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiGetServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetServer(ctx context.Context, projectId string, region string, serverId string) ApiGetServerRequest - /* - GetServerExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @return Server - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetServerExecute(ctx context.Context, projectId string, region string, serverId string) (*Server, error) - /* - GetServerConsole Get server console. - Get a URL for server remote console. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiGetServerConsoleRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetServerConsole(ctx context.Context, projectId string, region string, serverId string) ApiGetServerConsoleRequest - /* - GetServerConsoleExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ServerConsoleUrl - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetServerConsoleExecute(ctx context.Context, projectId string, region string, serverId string) (*ServerConsoleUrl, error) - /* - GetServerLog Get server log. - Get server console log. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiGetServerLogRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetServerLog(ctx context.Context, projectId string, region string, serverId string) ApiGetServerLogRequest - /* - GetServerLogExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @return GetServerLog200Response - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetServerLogExecute(ctx context.Context, projectId string, region string, serverId string) (*GetServerLog200Response, error) - /* - GetSnapshot Get details about a snapshot. - Get details about a block device snapshot. - - @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 snapshotId The identifier (ID) of a STACKIT Snapshot. - @return ApiGetSnapshotRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetSnapshot(ctx context.Context, projectId string, region string, snapshotId string) ApiGetSnapshotRequest - /* - GetSnapshotExecute executes the request - - @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 snapshotId The identifier (ID) of a STACKIT Snapshot. - @return Snapshot - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetSnapshotExecute(ctx context.Context, projectId string, region string, snapshotId string) (*Snapshot, error) - /* - GetVolume Get details about a volume. - Get details about a block device volume. - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return ApiGetVolumeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetVolume(ctx context.Context, projectId string, region string, volumeId string) ApiGetVolumeRequest - /* - GetVolumeExecute executes the request - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return Volume - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetVolumeExecute(ctx context.Context, projectId string, region string, volumeId string) (*Volume, error) - /* - GetVolumePerformanceClass Get details about a volume performance class. - Get details about a specific volume performance class. - - @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 volumePerformanceClass The name of a STACKIT Volume performance class. - @return ApiGetVolumePerformanceClassRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetVolumePerformanceClass(ctx context.Context, projectId string, region string, volumePerformanceClass string) ApiGetVolumePerformanceClassRequest - /* - GetVolumePerformanceClassExecute executes the request - - @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 volumePerformanceClass The name of a STACKIT Volume performance class. - @return VolumePerformanceClass - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetVolumePerformanceClassExecute(ctx context.Context, projectId string, region string, volumePerformanceClass string) (*VolumePerformanceClass, error) - /* - ImageFromVolume Create an image out of a volume. - Create an image out a a volume. - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @param region The STACKIT Region of the resources. - @return ApiImageFromVolumeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ImageFromVolume(ctx context.Context, projectId string, volumeId string, region string) ApiImageFromVolumeRequest - /* - ImageFromVolumeExecute executes the request - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @param region The STACKIT Region of the resources. - @return Image - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ImageFromVolumeExecute(ctx context.Context, projectId string, volumeId string, region string) (*Image, error) - /* - ListAffinityGroups Get the affinity groups setup for a project. - Get the affinity groups created in a project. Affinity groups are an indication of locality of a server relative to another group of servers. They can be either running on the same host (affinity) or on different ones (anti-affinity). - - @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 ApiListAffinityGroupsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListAffinityGroups(ctx context.Context, projectId string, region string) ApiListAffinityGroupsRequest - /* - ListAffinityGroupsExecute executes the request - - @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 AffinityGroupListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListAffinityGroupsExecute(ctx context.Context, projectId string, region string) (*AffinityGroupListResponse, error) - /* - ListAttachedVolumes List all volume attachments of a server. - Get a list of all volume attachments of a server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiListAttachedVolumesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListAttachedVolumes(ctx context.Context, projectId string, region string, serverId string) ApiListAttachedVolumesRequest - /* - ListAttachedVolumesExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @return VolumeAttachmentListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListAttachedVolumesExecute(ctx context.Context, projectId string, region string, serverId string) (*VolumeAttachmentListResponse, error) - /* - ListAvailabilityZones List all availability zones. - Get a list of all availability zones. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param region The STACKIT Region of the resources. - @return ApiListAvailabilityZonesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListAvailabilityZones(ctx context.Context, region string) ApiListAvailabilityZonesRequest - /* - ListAvailabilityZonesExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param region The STACKIT Region of the resources. - @return AvailabilityZoneListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListAvailabilityZonesExecute(ctx context.Context, region string) (*AvailabilityZoneListResponse, error) - /* - ListBackups List all backups inside a project. - Get a list of all backups 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 ApiListBackupsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListBackups(ctx context.Context, projectId string, region string) ApiListBackupsRequest - /* - ListBackupsExecute executes the request - - @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 BackupListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListBackupsExecute(ctx context.Context, projectId string, region string) (*BackupListResponse, error) - /* - ListImages List all Images inside a project. - Get a list of all images 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 ApiListImagesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListImages(ctx context.Context, projectId string, region string) ApiListImagesRequest - /* - ListImagesExecute executes the request - - @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 ImageListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListImagesExecute(ctx context.Context, projectId string, region string) (*ImageListResponse, error) - /* - ListKeyPairs List all SSH keypairs for the requesting user. - Get a list of all SSH keypairs assigned to the requesting user. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListKeyPairsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListKeyPairs(ctx context.Context) ApiListKeyPairsRequest - /* - ListKeyPairsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return KeyPairListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListKeyPairsExecute(ctx context.Context) (*KeyPairListResponse, error) - /* - ListMachineTypes List all machine types available for a project. - Get a list of all machine type available 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 region The STACKIT Region of the resources. - @return ApiListMachineTypesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListMachineTypes(ctx context.Context, projectId string, region string) ApiListMachineTypesRequest - /* - ListMachineTypesExecute executes the request - - @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 MachineTypeListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListMachineTypesExecute(ctx context.Context, projectId string, region string) (*MachineTypeListResponse, error) - /* - ListNetworkAreaProjects List all projects using a network area. - Get a list of all projects using 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. - @return ApiListNetworkAreaProjectsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreaProjects(ctx context.Context, organizationId string, areaId string) ApiListNetworkAreaProjectsRequest - /* - ListNetworkAreaProjectsExecute executes the request - - @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. - @return ProjectListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreaProjectsExecute(ctx context.Context, organizationId string, areaId string) (*ProjectListResponse, error) - /* - ListNetworkAreaRanges List all network ranges in a network area. - Get a list of all network ranges 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 ApiListNetworkAreaRangesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreaRanges(ctx context.Context, organizationId string, areaId string, region string) ApiListNetworkAreaRangesRequest - /* - ListNetworkAreaRangesExecute executes the request - - @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 NetworkRangeListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreaRangesExecute(ctx context.Context, organizationId string, areaId string, region string) (*NetworkRangeListResponse, error) - /* - ListNetworkAreaRegions List all configured regions in a network area. - Get a list of all configured regions. - - @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. - @return ApiListNetworkAreaRegionsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreaRegions(ctx context.Context, organizationId string, areaId string) ApiListNetworkAreaRegionsRequest - /* - ListNetworkAreaRegionsExecute executes the request - - @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. - @return RegionalAreaListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreaRegionsExecute(ctx context.Context, organizationId string, areaId string) (*RegionalAreaListResponse, error) - /* - ListNetworkAreaRoutes List all network routes in a network area. - Get a list of all network routes 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. - @return ApiListNetworkAreaRoutesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreaRoutes(ctx context.Context, organizationId string, areaId string, region string) ApiListNetworkAreaRoutesRequest - /* - ListNetworkAreaRoutesExecute executes the request - - @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 RouteListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreaRoutesExecute(ctx context.Context, organizationId string, areaId string, region string) (*RouteListResponse, error) - /* - ListNetworkAreas List all network areas in an organization. - Get a list of all visible network areas defined in an organization. - - @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. - @return ApiListNetworkAreasRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreas(ctx context.Context, organizationId string) ApiListNetworkAreasRequest - /* - ListNetworkAreasExecute executes the request - - @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. - @return NetworkAreaListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworkAreasExecute(ctx context.Context, organizationId string) (*NetworkAreaListResponse, 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworks(ctx context.Context, projectId string, region string) ApiListNetworksRequest - /* - ListNetworksExecute executes the request - - @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 NetworkListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNetworksExecute(ctx context.Context, projectId string, region string) (*NetworkListResponse, error) - /* - ListNics List all network interfaces inside a network. - Get a list of all network interfaces inside a network. - - @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 ApiListNicsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNics(ctx context.Context, projectId string, region string, networkId string) ApiListNicsRequest - /* - ListNicsExecute executes the request - - @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 NICListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListNicsExecute(ctx context.Context, projectId string, region string, networkId string) (*NICListResponse, error) - /* - ListProjectNICs List all network interfaces inside a project. - Get a list of all network interfaces 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 ApiListProjectNICsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListProjectNICs(ctx context.Context, projectId string, region string) ApiListProjectNICsRequest - /* - ListProjectNICsExecute executes the request - - @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 NICListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListProjectNICsExecute(ctx context.Context, projectId string, region string) (*NICListResponse, error) - /* - ListPublicIPRanges List all public IP ranges. - Get a list of all public IP ranges that STACKIT uses. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListPublicIPRangesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListPublicIPRanges(ctx context.Context) ApiListPublicIPRangesRequest - /* - ListPublicIPRangesExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return PublicNetworkListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListPublicIPRangesExecute(ctx context.Context) (*PublicNetworkListResponse, error) - /* - ListPublicIPs List all public IPs inside a project. - Get a list of all public IPs 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 ApiListPublicIPsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListPublicIPs(ctx context.Context, projectId string, region string) ApiListPublicIPsRequest - /* - ListPublicIPsExecute executes the request - - @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 PublicIpListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListPublicIPsExecute(ctx context.Context, projectId string, region string) (*PublicIpListResponse, error) - /* - ListQuotas List project quotas. - List quota limits and usage for project resources. - - @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 ApiListQuotasRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListQuotas(ctx context.Context, projectId string, region string) ApiListQuotasRequest - /* - ListQuotasExecute executes the request - - @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 QuotaListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListQuotasExecute(ctx context.Context, projectId string, region string) (*QuotaListResponse, error) - /* - ListRoutesOfRoutingTable List all routes in a routing table. - Get a list of all routes in a routing table. - - @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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListRoutesOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiListRoutesOfRoutingTableRequest - /* - ListRoutesOfRoutingTableExecute executes the request - - @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 RouteListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListRoutesOfRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) (*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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListRoutingTablesOfArea(ctx context.Context, organizationId string, areaId string, region string) ApiListRoutingTablesOfAreaRequest - /* - ListRoutingTablesOfAreaExecute executes the request - - @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 RoutingTableListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListRoutingTablesOfAreaExecute(ctx context.Context, organizationId string, areaId string, region string) (*RoutingTableListResponse, error) - /* - ListSecurityGroupRules List all rules for a security group. - Get a list of all rules inside a security group. - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiListSecurityGroupRulesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListSecurityGroupRules(ctx context.Context, projectId string, region string, securityGroupId string) ApiListSecurityGroupRulesRequest - /* - ListSecurityGroupRulesExecute executes the request - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return SecurityGroupRuleListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListSecurityGroupRulesExecute(ctx context.Context, projectId string, region string, securityGroupId string) (*SecurityGroupRuleListResponse, error) - /* - ListSecurityGroups List all security groups inside a project. - Get a list of all security groups 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 ApiListSecurityGroupsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListSecurityGroups(ctx context.Context, projectId string, region string) ApiListSecurityGroupsRequest - /* - ListSecurityGroupsExecute executes the request - - @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 SecurityGroupListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListSecurityGroupsExecute(ctx context.Context, projectId string, region string) (*SecurityGroupListResponse, error) - /* - ListServerNICs Get all network interfaces. - Get all network interfaces attached to the server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiListServerNICsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListServerNICs(ctx context.Context, projectId string, region string, serverId string) ApiListServerNICsRequest - /* - ListServerNICsExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @return NICListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListServerNICsExecute(ctx context.Context, projectId string, region string, serverId string) (*NICListResponse, error) - /* - ListServerServiceAccounts List the service account of the Server. - Get service account of the server in a list. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiListServerServiceAccountsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListServerServiceAccounts(ctx context.Context, projectId string, region string, serverId string) ApiListServerServiceAccountsRequest - /* - ListServerServiceAccountsExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ServiceAccountMailListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListServerServiceAccountsExecute(ctx context.Context, projectId string, region string, serverId string) (*ServiceAccountMailListResponse, error) - /* - ListServers List all servers inside a project. - Get a list of all servers 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 ApiListServersRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListServers(ctx context.Context, projectId string, region string) ApiListServersRequest - /* - ListServersExecute executes the request - - @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 ServerListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListServersExecute(ctx context.Context, projectId string, region string) (*ServerListResponse, error) - /* - ListSnapshotsInProject List all snapshots inside a project. - Get a list of all snapshots 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 ApiListSnapshotsInProjectRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListSnapshotsInProject(ctx context.Context, projectId string, region string) ApiListSnapshotsInProjectRequest - /* - ListSnapshotsInProjectExecute executes the request - - @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 SnapshotListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListSnapshotsInProjectExecute(ctx context.Context, projectId string, region string) (*SnapshotListResponse, error) - /* - ListVolumePerformanceClasses List all volume performance classes available for a project. - Get a list of all volume performance classes available 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 ApiListVolumePerformanceClassesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListVolumePerformanceClasses(ctx context.Context, projectId string, region string) ApiListVolumePerformanceClassesRequest - /* - ListVolumePerformanceClassesExecute executes the request - - @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 VolumePerformanceClassListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListVolumePerformanceClassesExecute(ctx context.Context, projectId string, region string) (*VolumePerformanceClassListResponse, error) - /* - ListVolumes List all volumes inside a project. - Get a list of all volumes 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 ApiListVolumesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListVolumes(ctx context.Context, projectId string, region string) ApiListVolumesRequest - /* - ListVolumesExecute executes the request - - @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 VolumeListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListVolumesExecute(ctx context.Context, projectId string, region string) (*VolumeListResponse, 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PartialUpdateNetwork(ctx context.Context, projectId string, region string, networkId string) ApiPartialUpdateNetworkRequest - /* - PartialUpdateNetworkExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PartialUpdateNetworkExecute(ctx context.Context, projectId string, region string, networkId string) error - /* - PartialUpdateNetworkArea Update network area settings. - Update the settings of a network area in an organization. - - @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. - @return ApiPartialUpdateNetworkAreaRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PartialUpdateNetworkArea(ctx context.Context, organizationId string, areaId string) ApiPartialUpdateNetworkAreaRequest - /* - PartialUpdateNetworkAreaExecute executes the request - - @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. - @return NetworkArea - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PartialUpdateNetworkAreaExecute(ctx context.Context, organizationId string, areaId string) (*NetworkArea, error) - /* - RebootServer Reboot the server. - Reboot the server. A soft reboot will attempt to gracefully shut down the server by passing the command to the operating system. A hard reboot will power cycle the server without waiting for the operating system to shutdown properly. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiRebootServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RebootServer(ctx context.Context, projectId string, region string, serverId string) ApiRebootServerRequest - /* - RebootServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RebootServerExecute(ctx context.Context, projectId string, region string, serverId string) error - /* - RemoveNetworkFromServer Detach and delete all network interfaces associated with the specified network. - Detach and delete all network interfaces associated with the specified network from the server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiRemoveNetworkFromServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveNetworkFromServer(ctx context.Context, projectId string, region string, serverId string, networkId string) ApiRemoveNetworkFromServerRequest - /* - RemoveNetworkFromServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveNetworkFromServerExecute(ctx context.Context, projectId string, region string, serverId string, networkId string) error - /* - RemoveNicFromServer Detach a network interface. - Detach a network interface from a server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param nicId The identifier (ID) of a network interface. - @return ApiRemoveNicFromServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveNicFromServer(ctx context.Context, projectId string, region string, serverId string, nicId string) ApiRemoveNicFromServerRequest - /* - RemoveNicFromServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveNicFromServerExecute(ctx context.Context, projectId string, region string, serverId string, nicId string) error - /* - RemovePublicIpFromServer Dissociate a public IP from a server. - Dissociate a public IP on an existing server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param publicIpId The identifier (ID) of a Public IP. - @return ApiRemovePublicIpFromServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemovePublicIpFromServer(ctx context.Context, projectId string, region string, serverId string, publicIpId string) ApiRemovePublicIpFromServerRequest - /* - RemovePublicIpFromServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemovePublicIpFromServerExecute(ctx context.Context, projectId string, region string, serverId string, publicIpId string) error - /* - RemoveSecurityGroupFromServer Remove a server from a security group. - Remove a server from a attached security group. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiRemoveSecurityGroupFromServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveSecurityGroupFromServer(ctx context.Context, projectId string, region string, serverId string, securityGroupId string) ApiRemoveSecurityGroupFromServerRequest - /* - RemoveSecurityGroupFromServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveSecurityGroupFromServerExecute(ctx context.Context, projectId string, region string, serverId string, securityGroupId string) error - /* - RemoveServiceAccountFromServer Detach a service account from a server. - Detach a service account from the server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param serviceAccountMail The e-mail address of a service account. - @return ApiRemoveServiceAccountFromServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveServiceAccountFromServer(ctx context.Context, projectId string, region string, serverId string, serviceAccountMail string) ApiRemoveServiceAccountFromServerRequest - /* - RemoveServiceAccountFromServerExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @param serviceAccountMail The e-mail address of a service account. - @return ServiceAccountMailListResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveServiceAccountFromServerExecute(ctx context.Context, projectId string, region string, serverId string, serviceAccountMail string) (*ServiceAccountMailListResponse, error) - /* - RemoveVolumeFromServer Detach a volume from a server. - Detach an existing volume from an existing server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return ApiRemoveVolumeFromServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveVolumeFromServer(ctx context.Context, projectId string, region string, serverId string, volumeId string) ApiRemoveVolumeFromServerRequest - /* - RemoveVolumeFromServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RemoveVolumeFromServerExecute(ctx context.Context, projectId string, region string, serverId string, volumeId string) error - /* - RescueServer Rescue an existing server. - Rescue an existing server. It is shutdown and the initial image is attached as the boot volume, while the boot volume is attached as secondary volume and the server is booted. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiRescueServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RescueServer(ctx context.Context, projectId string, region string, serverId string) ApiRescueServerRequest - /* - RescueServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RescueServerExecute(ctx context.Context, projectId string, region string, serverId string) error - /* - ResizeServer Resize a server. - Resize the server to the given machine type. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiResizeServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ResizeServer(ctx context.Context, projectId string, region string, serverId string) ApiResizeServerRequest - /* - ResizeServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ResizeServerExecute(ctx context.Context, projectId string, region string, serverId string) error - /* - ResizeVolume Update the size of a volume. - Update the size of a block device volume. The new volume size must be larger than the current size. - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return ApiResizeVolumeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ResizeVolume(ctx context.Context, projectId string, region string, volumeId string) ApiResizeVolumeRequest - /* - ResizeVolumeExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ResizeVolumeExecute(ctx context.Context, projectId string, region string, volumeId string) error - /* - RestoreBackup Restore Backup to the referenced source Volume. - Restores a Backup to the existing Volume it references to. The use of this endpoint is disruptive as the volume needs to be detached. If a new volume is to be created use the volumes endpoint with the option to create from backup. - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return ApiRestoreBackupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RestoreBackup(ctx context.Context, projectId string, region string, backupId string) ApiRestoreBackupRequest - /* - RestoreBackupExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - RestoreBackupExecute(ctx context.Context, projectId string, region string, backupId string) error - /* - SetImageShare Set image share. - Set share of an Image. New Options will replace existing settings. - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiSetImageShareRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - SetImageShare(ctx context.Context, projectId string, region string, imageId string) ApiSetImageShareRequest - /* - SetImageShareExecute executes the request - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ImageShare - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - SetImageShareExecute(ctx context.Context, projectId string, region string, imageId string) (*ImageShare, error) - /* - StartServer Boot up a server. - Start an existing server or allocates the server if deallocated. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiStartServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - StartServer(ctx context.Context, projectId string, region string, serverId string) ApiStartServerRequest - /* - StartServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - StartServerExecute(ctx context.Context, projectId string, region string, serverId string) error - /* - StopServer Stop an existing server. - Stops an existing server. The server will remain on the Hypervisor and will be charged full price for all resources attached to it. The attached resources will remain reserved. Useful particularly for vGPU servers. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiStopServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - StopServer(ctx context.Context, projectId string, region string, serverId string) ApiStopServerRequest - /* - StopServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - StopServerExecute(ctx context.Context, projectId string, region string, serverId string) error - /* - UnrescueServer Unrescue an existing server. - Unrescue an existing server. The original boot volume is attached as boot volume of the server and the server is booted up. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiUnrescueServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UnrescueServer(ctx context.Context, projectId string, region string, serverId string) ApiUnrescueServerRequest - /* - UnrescueServerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UnrescueServerExecute(ctx context.Context, projectId string, region string, serverId string) error - /* - UpdateAttachedVolume Update Volume Attachment Parameters. - Update the properties of an existing Volume Attachment. - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return ApiUpdateAttachedVolumeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateAttachedVolume(ctx context.Context, projectId string, region string, serverId string, volumeId string) ApiUpdateAttachedVolumeRequest - /* - UpdateAttachedVolumeExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return VolumeAttachment - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateAttachedVolumeExecute(ctx context.Context, projectId string, region string, serverId string, volumeId string) (*VolumeAttachment, error) - /* - UpdateBackup Update information of a backup. - Update name or labels of the backup. - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return ApiUpdateBackupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateBackup(ctx context.Context, projectId string, region string, backupId string) ApiUpdateBackupRequest - /* - UpdateBackupExecute executes the request - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return Backup - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateBackupExecute(ctx context.Context, projectId string, region string, backupId string) (*Backup, error) - /* - UpdateImage Update Image Parameters. - Update the properties of an existing Image 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 imageId The identifier (ID) of a STACKIT Image. - @return ApiUpdateImageRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateImage(ctx context.Context, projectId string, region string, imageId string) ApiUpdateImageRequest - /* - UpdateImageExecute executes the request - - @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 imageId The identifier (ID) of a STACKIT Image. - @return Image - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateImageExecute(ctx context.Context, projectId string, region string, imageId string) (*Image, error) - /* - UpdateImageShare Update image share. - Update share of an Image. Projects will be appended to existing list. - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiUpdateImageShareRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateImageShare(ctx context.Context, projectId string, region string, imageId string) ApiUpdateImageShareRequest - /* - UpdateImageShareExecute executes the request - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ImageShare - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateImageShareExecute(ctx context.Context, projectId string, region string, imageId string) (*ImageShare, error) - /* - UpdateKeyPair Update information of an SSH keypair. - Update labels of the SSH keypair. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param keypairName The name of an SSH keypair. - @return ApiUpdateKeyPairRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateKeyPair(ctx context.Context, keypairName string) ApiUpdateKeyPairRequest - /* - UpdateKeyPairExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param keypairName The name of an SSH keypair. - @return Keypair - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateKeyPairExecute(ctx context.Context, keypairName string) (*Keypair, error) - /* - UpdateNetworkAreaRegion Update a region for a network area. - Update a new region for 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 ApiUpdateNetworkAreaRegionRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateNetworkAreaRegion(ctx context.Context, organizationId string, areaId string, region string) ApiUpdateNetworkAreaRegionRequest - /* - UpdateNetworkAreaRegionExecute executes the request - - @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 RegionalArea - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) (*RegionalArea, error) - /* - UpdateNetworkAreaRoute Update a network route. - Update a network route 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 routeId The identifier (ID) of a STACKIT Route. - @return ApiUpdateNetworkAreaRouteRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateNetworkAreaRoute(ctx context.Context, organizationId string, areaId string, region string, routeId string) ApiUpdateNetworkAreaRouteRequest - /* - UpdateNetworkAreaRouteExecute executes the request - - @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 routeId The identifier (ID) of a STACKIT Route. - @return Route - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateNetworkAreaRouteExecute(ctx context.Context, organizationId string, areaId string, region string, routeId string) (*Route, error) - /* - UpdateNic Update a network interface. - Update the properties of an existing network interface inside a network. - - @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. - @param nicId The identifier (ID) of a network interface. - @return ApiUpdateNicRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateNic(ctx context.Context, projectId string, region string, networkId string, nicId string) ApiUpdateNicRequest - /* - UpdateNicExecute executes the request - - @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. - @param nicId The identifier (ID) of a network interface. - @return NIC - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateNicExecute(ctx context.Context, projectId string, region string, networkId string, nicId string) (*NIC, error) - /* - UpdatePublicIP Update a public IP. - Update the properties of an existing public IP 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 publicIpId The identifier (ID) of a Public IP. - @return ApiUpdatePublicIPRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdatePublicIP(ctx context.Context, projectId string, region string, publicIpId string) ApiUpdatePublicIPRequest - /* - UpdatePublicIPExecute executes the request - - @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 publicIpId The identifier (ID) of a Public IP. - @return PublicIp - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdatePublicIPExecute(ctx context.Context, projectId string, region string, publicIpId string) (*PublicIp, error) - /* - UpdateRouteOfRoutingTable Update a route of a routing table. - Update a route defined in a routing table. - - @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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiUpdateRouteOfRoutingTableRequest - /* - UpdateRouteOfRoutingTableExecute executes the request - - @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 Route - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateRouteOfRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) (*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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiUpdateRoutingTableOfAreaRequest - /* - UpdateRoutingTableOfAreaExecute executes the request - - @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 RoutingTable - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateRoutingTableOfAreaExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) (*RoutingTable, error) - /* - UpdateSecurityGroup Update information of a security group. - Update labels of the security group. - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiUpdateSecurityGroupRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateSecurityGroup(ctx context.Context, projectId string, region string, securityGroupId string) ApiUpdateSecurityGroupRequest - /* - UpdateSecurityGroupExecute executes the request - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return SecurityGroup - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateSecurityGroupExecute(ctx context.Context, projectId string, region string, securityGroupId string) (*SecurityGroup, error) - /* - UpdateServer Update information of a server. - Update name or labels of the server. - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiUpdateServerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateServer(ctx context.Context, projectId string, region string, serverId string) ApiUpdateServerRequest - /* - UpdateServerExecute executes the request - - @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 serverId The identifier (ID) of a STACKIT Server. - @return Server - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateServerExecute(ctx context.Context, projectId string, region string, serverId string) (*Server, error) - /* - UpdateSnapshot Update information of the snapshot. - Update information like name or labels of the snapshot. - - @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 snapshotId The identifier (ID) of a STACKIT Snapshot. - @return ApiUpdateSnapshotRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateSnapshot(ctx context.Context, projectId string, region string, snapshotId string) ApiUpdateSnapshotRequest - /* - UpdateSnapshotExecute executes the request - - @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 snapshotId The identifier (ID) of a STACKIT Snapshot. - @return Snapshot - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateSnapshotExecute(ctx context.Context, projectId string, region string, snapshotId string) (*Snapshot, error) - /* - UpdateVolume Update information of a volume. - Update name, description or labels of the volume. - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return ApiUpdateVolumeRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateVolume(ctx context.Context, projectId string, region string, volumeId string) ApiUpdateVolumeRequest - /* - UpdateVolumeExecute executes the request - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return Volume - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateVolumeExecute(ctx context.Context, projectId string, region string, volumeId string) (*Volume, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiAddNetworkToServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiAddNicToServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiAddPublicIpToServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiAddRoutesToRoutingTableRequest interface { - // Request an addition of routes to a routing table. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AddRoutesToRoutingTablePayload(addRoutesToRoutingTablePayload AddRoutesToRoutingTablePayload) ApiAddRoutesToRoutingTableRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RouteListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiAddRoutingTableToAreaRequest interface { - // Request an addition of a routing table to an area. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AddRoutingTableToAreaPayload(addRoutingTableToAreaPayload AddRoutingTableToAreaPayload) ApiAddRoutingTableToAreaRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RoutingTable, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiAddSecurityGroupToServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiAddServiceAccountToServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ServiceAccountMailListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiAddVolumeToServerRequest interface { - // Request a volume attachment creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AddVolumeToServerPayload(addVolumeToServerPayload AddVolumeToServerPayload) ApiAddVolumeToServerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*VolumeAttachment, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateAffinityGroupRequest interface { - // Request a affinity group creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateAffinityGroupPayload(createAffinityGroupPayload CreateAffinityGroupPayload) ApiCreateAffinityGroupRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*AffinityGroup, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateBackupRequest interface { - // Request a backup creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateBackupPayload(createBackupPayload CreateBackupPayload) ApiCreateBackupRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Backup, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateImageRequest interface { - // Request an image creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateImagePayload(createImagePayload CreateImagePayload) ApiCreateImageRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ImageCreateResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateIsolatedNetworkRequest interface { - // Request a single isolated network creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateIsolatedNetworkPayload(createIsolatedNetworkPayload CreateIsolatedNetworkPayload) ApiCreateIsolatedNetworkRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Network, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateKeyPairRequest interface { - // Request a public key import. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateKeyPairPayload(createKeyPairPayload CreateKeyPairPayload) ApiCreateKeyPairRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Keypair, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateNetworkRequest interface { - // Request a network creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateNetworkPayload(createNetworkPayload CreateNetworkPayload) ApiCreateNetworkRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Network, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateNetworkAreaRequest interface { - // Request an Area creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateNetworkAreaPayload(createNetworkAreaPayload CreateNetworkAreaPayload) ApiCreateNetworkAreaRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NetworkArea, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateNetworkAreaRangeRequest interface { - // Request an addition of network ranges to an area. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateNetworkAreaRangePayload(createNetworkAreaRangePayload CreateNetworkAreaRangePayload) ApiCreateNetworkAreaRangeRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NetworkRangeListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateNetworkAreaRegionRequest interface { - // Request to add a new regional network area configuration. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateNetworkAreaRegionPayload(createNetworkAreaRegionPayload CreateNetworkAreaRegionPayload) ApiCreateNetworkAreaRegionRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RegionalArea, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateNetworkAreaRouteRequest interface { - // Request an addition of routes to an area. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateNetworkAreaRoutePayload(createNetworkAreaRoutePayload CreateNetworkAreaRoutePayload) ApiCreateNetworkAreaRouteRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RouteListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateNicRequest interface { - // Request a network interface creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateNicPayload(createNicPayload CreateNicPayload) ApiCreateNicRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NIC, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreatePublicIPRequest interface { - // Request a public IP creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreatePublicIPPayload(createPublicIPPayload CreatePublicIPPayload) ApiCreatePublicIPRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*PublicIp, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateSecurityGroupRequest interface { - // Request a security group creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateSecurityGroupPayload(createSecurityGroupPayload CreateSecurityGroupPayload) ApiCreateSecurityGroupRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*SecurityGroup, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateSecurityGroupRuleRequest interface { - // Request for a security group rule creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateSecurityGroupRulePayload(createSecurityGroupRulePayload CreateSecurityGroupRulePayload) ApiCreateSecurityGroupRuleRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*SecurityGroupRule, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateServerRequest interface { - // Request a server creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateServerPayload(createServerPayload CreateServerPayload) ApiCreateServerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Server, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateSnapshotRequest interface { - // Request a snapshot creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateSnapshotPayload(createSnapshotPayload CreateSnapshotPayload) ApiCreateSnapshotRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Snapshot, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateVolumeRequest interface { - // Request a volume creation. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateVolumePayload(createVolumePayload CreateVolumePayload) ApiCreateVolumeRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Volume, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeallocateServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteAffinityGroupRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteBackupRequest interface { - // Force action. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Force(force bool) ApiDeleteBackupRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteImageRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteImageShareRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteImageShareConsumerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteKeyPairRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteNetworkRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteNetworkAreaRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteNetworkAreaRangeRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteNetworkAreaRegionRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteNetworkAreaRouteRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteNicRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeletePublicIPRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteRouteFromRoutingTableRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteRoutingTableFromAreaRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteSecurityGroupRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteSecurityGroupRuleRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteSnapshotRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteVolumeRequest interface { - // Cascade action. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Cascade(cascade bool) ApiDeleteVolumeRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetAffinityGroupRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*AffinityGroup, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetAttachedVolumeRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*VolumeAttachment, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetBackupRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Backup, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetImageRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Image, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetImageShareRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ImageShare, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetImageShareConsumerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ImageShareConsumer, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetKeyPairRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Keypair, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetMachineTypeRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*MachineType, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetNetworkRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Network, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetNetworkAreaRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NetworkArea, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetNetworkAreaRangeRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NetworkRange, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetNetworkAreaRegionRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RegionalArea, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetNetworkAreaRouteRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Route, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetNicRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NIC, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetOrganizationRequestRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Request, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetProjectDetailsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Project, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetProjectNICRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NIC, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetProjectRequestRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Request, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetPublicIPRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*PublicIp, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetRouteOfRoutingTableRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Route, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetRoutingTableOfAreaRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RoutingTable, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetSecurityGroupRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*SecurityGroup, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetSecurityGroupRuleRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*SecurityGroupRule, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetServerRequest interface { - // Show detailed information about server. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Details(details bool) ApiGetServerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Server, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetServerConsoleRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ServerConsoleUrl, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetServerLogRequest interface { - // Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Length(length int64) ApiGetServerLogRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetServerLog200Response, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetSnapshotRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Snapshot, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetVolumeRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Volume, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetVolumePerformanceClassRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*VolumePerformanceClass, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiImageFromVolumeRequest interface { - // Create an image from a volume. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ImageFromVolumePayload(imageFromVolumePayload ImageFromVolumePayload) ApiImageFromVolumeRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Image, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListAffinityGroupsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*AffinityGroupListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListAttachedVolumesRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*VolumeAttachmentListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListAvailabilityZonesRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*AvailabilityZoneListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListBackupsRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListBackupsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*BackupListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListImagesRequest interface { - // List all Images. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - All(all bool) ApiListImagesRequest - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListImagesRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ImageListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListKeyPairsRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListKeyPairsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*KeyPairListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListMachineTypesRequest interface { - // Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Filter(filter string) ApiListMachineTypesRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*MachineTypeListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListNetworkAreaProjectsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ProjectListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListNetworkAreaRangesRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NetworkRangeListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListNetworkAreaRegionsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RegionalAreaListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListNetworkAreaRoutesRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListNetworkAreaRoutesRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RouteListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListNetworkAreasRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListNetworkAreasRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NetworkAreaListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListNetworksRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListNetworksRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NetworkListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListNicsRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListNicsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NICListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListProjectNICsRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListProjectNICsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NICListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListPublicIPRangesRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*PublicNetworkListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListPublicIPsRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListPublicIPsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*PublicIpListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListQuotasRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*QuotaListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListRoutesOfRoutingTableRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListRoutesOfRoutingTableRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RouteListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListRoutingTablesOfAreaRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListRoutingTablesOfAreaRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RoutingTableListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListSecurityGroupRulesRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*SecurityGroupRuleListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListSecurityGroupsRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListSecurityGroupsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*SecurityGroupListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListServerNICsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NICListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListServerServiceAccountsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ServiceAccountMailListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListServersRequest interface { - // Show detailed information about server. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Details(details bool) ApiListServersRequest - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListServersRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ServerListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListSnapshotsInProjectRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListSnapshotsInProjectRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*SnapshotListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListVolumePerformanceClassesRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListVolumePerformanceClassesRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*VolumePerformanceClassListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListVolumesRequest interface { - // Filter resources by labels. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LabelSelector(labelSelector string) ApiListVolumesRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*VolumeListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiPartialUpdateNetworkRequest interface { - // Request an update of a network. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PartialUpdateNetworkPayload(partialUpdateNetworkPayload PartialUpdateNetworkPayload) ApiPartialUpdateNetworkRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiPartialUpdateNetworkAreaRequest interface { - // Request to update an Area. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PartialUpdateNetworkAreaPayload(partialUpdateNetworkAreaPayload PartialUpdateNetworkAreaPayload) ApiPartialUpdateNetworkAreaRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NetworkArea, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRebootServerRequest interface { - // Defines if it is a soft or a hard reboot. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Action(action string) ApiRebootServerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRemoveNetworkFromServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRemoveNicFromServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRemovePublicIpFromServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRemoveSecurityGroupFromServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRemoveServiceAccountFromServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ServiceAccountMailListResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRemoveVolumeFromServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRescueServerRequest interface { - // Request a server rescue. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RescueServerPayload(rescueServerPayload RescueServerPayload) ApiRescueServerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiResizeServerRequest interface { - // Request a resize of a server. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ResizeServerPayload(resizeServerPayload ResizeServerPayload) ApiResizeServerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiResizeVolumeRequest interface { - // Request a volume resize. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ResizeVolumePayload(resizeVolumePayload ResizeVolumePayload) ApiResizeVolumeRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiRestoreBackupRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiSetImageShareRequest interface { - // Settings for an Image Share. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - SetImageSharePayload(setImageSharePayload SetImageSharePayload) ApiSetImageShareRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ImageShare, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiStartServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiStopServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUnrescueServerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() error -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateAttachedVolumeRequest interface { - // Request a volume attachment update. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateAttachedVolumePayload(updateAttachedVolumePayload UpdateAttachedVolumePayload) ApiUpdateAttachedVolumeRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*VolumeAttachment, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateBackupRequest interface { - // Request an update of a backup. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateBackupPayload(updateBackupPayload UpdateBackupPayload) ApiUpdateBackupRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Backup, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateImageRequest interface { - // Request an update of an Image. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateImagePayload(updateImagePayload UpdateImagePayload) ApiUpdateImageRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Image, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateImageShareRequest interface { - // Update an Image Share. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateImageSharePayload(updateImageSharePayload UpdateImageSharePayload) ApiUpdateImageShareRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ImageShare, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateKeyPairRequest interface { - // Request an update of an SSH keypair. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateKeyPairPayload(updateKeyPairPayload UpdateKeyPairPayload) ApiUpdateKeyPairRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Keypair, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateNetworkAreaRegionRequest interface { - // Request an update of a regional network area. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateNetworkAreaRegionPayload(updateNetworkAreaRegionPayload UpdateNetworkAreaRegionPayload) ApiUpdateNetworkAreaRegionRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RegionalArea, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateNetworkAreaRouteRequest interface { - // Request an update of a network route. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateNetworkAreaRoutePayload(updateNetworkAreaRoutePayload UpdateNetworkAreaRoutePayload) ApiUpdateNetworkAreaRouteRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Route, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateNicRequest interface { - // Request an update of a network interface. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateNicPayload(updateNicPayload UpdateNicPayload) ApiUpdateNicRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*NIC, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdatePublicIPRequest interface { - // Request an update of a public IP. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdatePublicIPPayload(updatePublicIPPayload UpdatePublicIPPayload) ApiUpdatePublicIPRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*PublicIp, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateRouteOfRoutingTableRequest interface { - // Request an update of a route in a routing table. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateRouteOfRoutingTablePayload(updateRouteOfRoutingTablePayload UpdateRouteOfRoutingTablePayload) ApiUpdateRouteOfRoutingTableRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Route, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateRoutingTableOfAreaRequest interface { - // Request an update of a routing table. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateRoutingTableOfAreaPayload(updateRoutingTableOfAreaPayload UpdateRoutingTableOfAreaPayload) ApiUpdateRoutingTableOfAreaRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RoutingTable, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateSecurityGroupRequest interface { - // Request an update of a security group. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateSecurityGroupPayload(updateSecurityGroupPayload UpdateSecurityGroupPayload) ApiUpdateSecurityGroupRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*SecurityGroup, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateServerRequest interface { - // Request an update of a server. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateServerPayload(updateServerPayload UpdateServerPayload) ApiUpdateServerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Server, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateSnapshotRequest interface { - // Request an update of a snapshot. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateSnapshotPayload(updateSnapshotPayload UpdateSnapshotPayload) ApiUpdateSnapshotRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Snapshot, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateVolumeRequest interface { - // Request an update of a volume. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateVolumePayload(updateVolumePayload UpdateVolumePayload) ApiUpdateVolumeRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Volume, error) -} - -// DefaultApiService DefaultApi service -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DefaultApiService service - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddNetworkToServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - networkId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddNetworkToServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddNetworkToServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -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 fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -AddNetworkToServer: Create and attach a network interface from the specified network. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiAddNetworkToServerRequest -*/ -func (a *APIClient) AddNetworkToServer(ctx context.Context, projectId string, region string, serverId string, networkId string) ApiAddNetworkToServerRequest { - return AddNetworkToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - networkId: networkId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) AddNetworkToServerExecute(ctx context.Context, projectId string, region string, serverId string, networkId string) error { - r := AddNetworkToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - networkId: networkId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddNicToServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - nicId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddNicToServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddNicToServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/nics/{nicId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", url.PathEscape(ParameterValueToString(r.nicId, "nicId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.nicId) < 36 { - return fmt.Errorf("nicId must have at least 36 elements") - } - if strlen(r.nicId) > 36 { - return fmt.Errorf("nicId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -AddNicToServer: Attach an existing network interface. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param nicId The identifier (ID) of a network interface. - @return ApiAddNicToServerRequest -*/ -func (a *APIClient) AddNicToServer(ctx context.Context, projectId string, region string, serverId string, nicId string) ApiAddNicToServerRequest { - return AddNicToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - nicId: nicId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) AddNicToServerExecute(ctx context.Context, projectId string, region string, serverId string, nicId string) error { - r := AddNicToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - nicId: nicId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddPublicIpToServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - publicIpId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddPublicIpToServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddPublicIpToServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/public-ips/{publicIpId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"publicIpId"+"}", url.PathEscape(ParameterValueToString(r.publicIpId, "publicIpId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.publicIpId) < 36 { - return fmt.Errorf("publicIpId must have at least 36 elements") - } - if strlen(r.publicIpId) > 36 { - return fmt.Errorf("publicIpId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -AddPublicIpToServer: Associate a public IP to the server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param publicIpId The identifier (ID) of a Public IP. - @return ApiAddPublicIpToServerRequest -*/ -func (a *APIClient) AddPublicIpToServer(ctx context.Context, projectId string, region string, serverId string, publicIpId string) ApiAddPublicIpToServerRequest { - return AddPublicIpToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - publicIpId: publicIpId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) AddPublicIpToServerExecute(ctx context.Context, projectId string, region string, serverId string, publicIpId string) error { - r := AddPublicIpToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - publicIpId: publicIpId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutesToRoutingTableRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routingTableId string - addRoutesToRoutingTablePayload *AddRoutesToRoutingTablePayload -} - -// Request an addition of routes to a routing table. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddRoutesToRoutingTableRequest) AddRoutesToRoutingTablePayload(addRoutesToRoutingTablePayload AddRoutesToRoutingTablePayload) ApiAddRoutesToRoutingTableRequest { - r.addRoutesToRoutingTablePayload = &addRoutesToRoutingTablePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddRoutesToRoutingTableRequest) Execute() (*RouteListResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RouteListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddRoutesToRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have less than 36 elements") - } - if r.addRoutesToRoutingTablePayload == nil { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -AddRoutesToRoutingTable: Create new routes in a routing table. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) AddRoutesToRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiAddRoutesToRoutingTableRequest { - return AddRoutesToRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) AddRoutesToRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) (*RouteListResponse, error) { - r := AddRoutesToRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - addRoutingTableToAreaPayload *AddRoutingTableToAreaPayload -} - -// Request an addition of a routing table to an area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddRoutingTableToAreaRequest) AddRoutingTableToAreaPayload(addRoutingTableToAreaPayload AddRoutingTableToAreaPayload) ApiAddRoutingTableToAreaRequest { - r.addRoutingTableToAreaPayload = &addRoutingTableToAreaPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddRoutingTableToAreaRequest) Execute() (*RoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RoutingTable - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddRoutingTableToArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if r.addRoutingTableToAreaPayload == nil { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -AddRoutingTableToArea: Create new routing table in a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) AddRoutingTableToArea(ctx context.Context, organizationId string, areaId string, region string) ApiAddRoutingTableToAreaRequest { - return AddRoutingTableToAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) AddRoutingTableToAreaExecute(ctx context.Context, organizationId string, areaId string, region string) (*RoutingTable, error) { - r := AddRoutingTableToAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddSecurityGroupToServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - securityGroupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddSecurityGroupToServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddSecurityGroupToServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/security-groups/{securityGroupId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return fmt.Errorf("securityGroupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -AddSecurityGroupToServer: Add a server to a security group. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiAddSecurityGroupToServerRequest -*/ -func (a *APIClient) AddSecurityGroupToServer(ctx context.Context, projectId string, region string, serverId string, securityGroupId string) ApiAddSecurityGroupToServerRequest { - return AddSecurityGroupToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - securityGroupId: securityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) AddSecurityGroupToServerExecute(ctx context.Context, projectId string, region string, serverId string, securityGroupId string) error { - r := AddSecurityGroupToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - securityGroupId: securityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddServiceAccountToServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - serviceAccountMail string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddServiceAccountToServerRequest) Execute() (*ServiceAccountMailListResponse, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ServiceAccountMailListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddServiceAccountToServer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service-accounts/{serviceAccountMail}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountMail"+"}", url.PathEscape(ParameterValueToString(r.serviceAccountMail, "serviceAccountMail")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.serviceAccountMail) > 255 { - return localVarReturnValue, fmt.Errorf("serviceAccountMail must have less than 255 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -AddServiceAccountToServer: Attach service account to a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param serviceAccountMail The e-mail address of a service account. - @return ApiAddServiceAccountToServerRequest -*/ -func (a *APIClient) AddServiceAccountToServer(ctx context.Context, projectId string, region string, serverId string, serviceAccountMail string) ApiAddServiceAccountToServerRequest { - return AddServiceAccountToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - serviceAccountMail: serviceAccountMail, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) AddServiceAccountToServerExecute(ctx context.Context, projectId string, region string, serverId string, serviceAccountMail string) (*ServiceAccountMailListResponse, error) { - r := AddServiceAccountToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - serviceAccountMail: serviceAccountMail, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - volumeId string - addVolumeToServerPayload *AddVolumeToServerPayload -} - -// Request a volume attachment creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddVolumeToServerRequest) AddVolumeToServerPayload(addVolumeToServerPayload AddVolumeToServerPayload) ApiAddVolumeToServerRequest { - r.addVolumeToServerPayload = &addVolumeToServerPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r AddVolumeToServerRequest) Execute() (*VolumeAttachment, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VolumeAttachment - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddVolumeToServer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments/{volumeId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have less than 36 elements") - } - - // 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.addVolumeToServerPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -AddVolumeToServer: Attach a volume to a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return ApiAddVolumeToServerRequest -*/ -func (a *APIClient) AddVolumeToServer(ctx context.Context, projectId string, region string, serverId string, volumeId string) ApiAddVolumeToServerRequest { - return AddVolumeToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - volumeId: volumeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) AddVolumeToServerExecute(ctx context.Context, projectId string, region string, serverId string, volumeId string) (*VolumeAttachment, error) { - r := AddVolumeToServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - volumeId: volumeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createAffinityGroupPayload *CreateAffinityGroupPayload -} - -// Request a affinity group creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateAffinityGroupRequest) CreateAffinityGroupPayload(createAffinityGroupPayload CreateAffinityGroupPayload) ApiCreateAffinityGroupRequest { - r.createAffinityGroupPayload = &createAffinityGroupPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateAffinityGroupRequest) Execute() (*AffinityGroup, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AffinityGroup - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAffinityGroup") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/affinity-groups" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createAffinityGroupPayload == nil { - return localVarReturnValue, fmt.Errorf("createAffinityGroupPayload 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.createAffinityGroupPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateAffinityGroup: Create a new affinity group in a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateAffinityGroupRequest -*/ -func (a *APIClient) CreateAffinityGroup(ctx context.Context, projectId string, region string) ApiCreateAffinityGroupRequest { - return CreateAffinityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateAffinityGroupExecute(ctx context.Context, projectId string, region string) (*AffinityGroup, error) { - r := CreateAffinityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createBackupPayload *CreateBackupPayload -} - -// Request a backup creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateBackupRequest) CreateBackupPayload(createBackupPayload CreateBackupPayload) ApiCreateBackupRequest { - r.createBackupPayload = &createBackupPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateBackupRequest) Execute() (*Backup, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Backup - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateBackup") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/backups" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createBackupPayload == nil { - return localVarReturnValue, fmt.Errorf("createBackupPayload 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.createBackupPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 == 413 { - var v Error - err = 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 = 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 = 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 -} - -/* -CreateBackup: Create new Backup. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateBackupRequest -*/ -func (a *APIClient) CreateBackup(ctx context.Context, projectId string, region string) ApiCreateBackupRequest { - return CreateBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateBackupExecute(ctx context.Context, projectId string, region string) (*Backup, error) { - r := CreateBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImageRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createImagePayload *CreateImagePayload -} - -// Request an image creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateImageRequest) CreateImagePayload(createImagePayload CreateImagePayload) ApiCreateImageRequest { - r.createImagePayload = &createImagePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateImageRequest) Execute() (*ImageCreateResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ImageCreateResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateImage") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createImagePayload == nil { - return localVarReturnValue, fmt.Errorf("createImagePayload 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.createImagePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 == 413 { - var v Error - err = 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 == 429 { - var v Error - err = 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 = 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 = 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 -} - -/* -CreateImage: Create new Image. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateImageRequest -*/ -func (a *APIClient) CreateImage(ctx context.Context, projectId string, region string) ApiCreateImageRequest { - return CreateImageRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateImageExecute(ctx context.Context, projectId string, region string) (*ImageCreateResponse, error) { - r := CreateImageRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createIsolatedNetworkPayload *CreateIsolatedNetworkPayload -} - -// Request a single isolated network creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateIsolatedNetworkRequest) CreateIsolatedNetworkPayload(createIsolatedNetworkPayload CreateIsolatedNetworkPayload) ApiCreateIsolatedNetworkRequest { - r.createIsolatedNetworkPayload = &createIsolatedNetworkPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateIsolatedNetworkRequest) Execute() (*Network, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Network - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateIsolatedNetwork") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/isolated-network" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createIsolatedNetworkPayload == nil { - return localVarReturnValue, fmt.Errorf("createIsolatedNetworkPayload 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.createIsolatedNetworkPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateIsolatedNetwork: Create a single isolated network. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateIsolatedNetworkRequest -*/ -func (a *APIClient) CreateIsolatedNetwork(ctx context.Context, projectId string, region string) ApiCreateIsolatedNetworkRequest { - return CreateIsolatedNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateIsolatedNetworkExecute(ctx context.Context, projectId string, region string) (*Network, error) { - r := CreateIsolatedNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairRequest struct { - ctx context.Context - apiService *DefaultApiService - createKeyPairPayload *CreateKeyPairPayload -} - -// Request a public key import. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateKeyPairRequest) CreateKeyPairPayload(createKeyPairPayload CreateKeyPairPayload) ApiCreateKeyPairRequest { - r.createKeyPairPayload = &createKeyPairPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateKeyPairRequest) Execute() (*Keypair, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Keypair - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateKeyPair") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/keypairs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.createKeyPairPayload == nil { - return localVarReturnValue, fmt.Errorf("createKeyPairPayload 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.createKeyPairPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateKeyPair: Import a public key. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateKeyPairRequest -*/ -func (a *APIClient) CreateKeyPair(ctx context.Context) ApiCreateKeyPairRequest { - return CreateKeyPairRequest{ - apiService: a.defaultApi, - ctx: ctx, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateKeyPairExecute(ctx context.Context) (*Keypair, error) { - r := CreateKeyPairRequest{ - apiService: a.defaultApi, - ctx: ctx, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createNetworkPayload *CreateNetworkPayload -} - -// Request a network creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkRequest) CreateNetworkPayload(createNetworkPayload CreateNetworkPayload) ApiCreateNetworkRequest { - r.createNetworkPayload = &createNetworkPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkRequest) Execute() (*Network, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Network - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNetwork") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createNetworkPayload == nil { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateNetwork: Create new network. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) CreateNetwork(ctx context.Context, projectId string, region string) ApiCreateNetworkRequest { - return CreateNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateNetworkExecute(ctx context.Context, projectId string, region string) (*Network, error) { - r := CreateNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - createNetworkAreaPayload *CreateNetworkAreaPayload -} - -// Request an Area creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkAreaRequest) CreateNetworkAreaPayload(createNetworkAreaPayload CreateNetworkAreaPayload) ApiCreateNetworkAreaRequest { - r.createNetworkAreaPayload = &createNetworkAreaPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkAreaRequest) Execute() (*NetworkArea, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkArea - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNetworkArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if r.createNetworkAreaPayload == nil { - return localVarReturnValue, fmt.Errorf("createNetworkAreaPayload 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.createNetworkAreaPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateNetworkArea: Create new network area in an organization. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @return ApiCreateNetworkAreaRequest -*/ -func (a *APIClient) CreateNetworkArea(ctx context.Context, organizationId string) ApiCreateNetworkAreaRequest { - return CreateNetworkAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateNetworkAreaExecute(ctx context.Context, organizationId string) (*NetworkArea, error) { - r := CreateNetworkAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRangeRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - createNetworkAreaRangePayload *CreateNetworkAreaRangePayload -} - -// Request an addition of network ranges to an area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkAreaRangeRequest) CreateNetworkAreaRangePayload(createNetworkAreaRangePayload CreateNetworkAreaRangePayload) ApiCreateNetworkAreaRangeRequest { - r.createNetworkAreaRangePayload = &createNetworkAreaRangePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkAreaRangeRequest) Execute() (*NetworkRangeListResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkRangeListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNetworkAreaRange") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/network-ranges" - 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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if r.createNetworkAreaRangePayload == nil { - return localVarReturnValue, fmt.Errorf("createNetworkAreaRangePayload 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.createNetworkAreaRangePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateNetworkAreaRange: Create new network range in a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateNetworkAreaRangeRequest -*/ -func (a *APIClient) CreateNetworkAreaRange(ctx context.Context, organizationId string, areaId string, region string) ApiCreateNetworkAreaRangeRequest { - return CreateNetworkAreaRangeRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateNetworkAreaRangeExecute(ctx context.Context, organizationId string, areaId string, region string) (*NetworkRangeListResponse, error) { - r := CreateNetworkAreaRangeRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRegionRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - createNetworkAreaRegionPayload *CreateNetworkAreaRegionPayload -} - -// Request to add a new regional network area configuration. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkAreaRegionRequest) CreateNetworkAreaRegionPayload(createNetworkAreaRegionPayload CreateNetworkAreaRegionPayload) ApiCreateNetworkAreaRegionRequest { - r.createNetworkAreaRegionPayload = &createNetworkAreaRegionPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkAreaRegionRequest) Execute() (*RegionalArea, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegionalArea - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNetworkAreaRegion") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}" - 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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if r.createNetworkAreaRegionPayload == nil { - return localVarReturnValue, fmt.Errorf("createNetworkAreaRegionPayload 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.createNetworkAreaRegionPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateNetworkAreaRegion: Configure a region for a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateNetworkAreaRegionRequest -*/ -func (a *APIClient) CreateNetworkAreaRegion(ctx context.Context, organizationId string, areaId string, region string) ApiCreateNetworkAreaRegionRequest { - return CreateNetworkAreaRegionRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) (*RegionalArea, error) { - r := CreateNetworkAreaRegionRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRouteRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - createNetworkAreaRoutePayload *CreateNetworkAreaRoutePayload -} - -// Request an addition of routes to an area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkAreaRouteRequest) CreateNetworkAreaRoutePayload(createNetworkAreaRoutePayload CreateNetworkAreaRoutePayload) ApiCreateNetworkAreaRouteRequest { - r.createNetworkAreaRoutePayload = &createNetworkAreaRoutePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNetworkAreaRouteRequest) Execute() (*RouteListResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RouteListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNetworkAreaRoute") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/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) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if r.createNetworkAreaRoutePayload == nil { - return localVarReturnValue, fmt.Errorf("createNetworkAreaRoutePayload 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.createNetworkAreaRoutePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateNetworkAreaRoute: Create new network routes. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateNetworkAreaRouteRequest -*/ -func (a *APIClient) CreateNetworkAreaRoute(ctx context.Context, organizationId string, areaId string, region string) ApiCreateNetworkAreaRouteRequest { - return CreateNetworkAreaRouteRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateNetworkAreaRouteExecute(ctx context.Context, organizationId string, areaId string, region string) (*RouteListResponse, error) { - r := CreateNetworkAreaRouteRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - networkId string - createNicPayload *CreateNicPayload -} - -// Request a network interface creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNicRequest) CreateNicPayload(createNicPayload CreateNicPayload) ApiCreateNicRequest { - r.createNicPayload = &createNicPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateNicRequest) Execute() (*NIC, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NIC - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNic") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/networks/{networkId}/nics" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return localVarReturnValue, fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return localVarReturnValue, fmt.Errorf("networkId must have less than 36 elements") - } - if r.createNicPayload == nil { - return localVarReturnValue, fmt.Errorf("createNicPayload 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.createNicPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 == 429 { - var v Error - err = 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 = 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 = 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 -} - -/* -CreateNic: Create new network interface. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateNicRequest -*/ -func (a *APIClient) CreateNic(ctx context.Context, projectId string, region string, networkId string) ApiCreateNicRequest { - return CreateNicRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateNicExecute(ctx context.Context, projectId string, region string, networkId string) (*NIC, error) { - r := CreateNicRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createPublicIPPayload *CreatePublicIPPayload -} - -// Request a public IP creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreatePublicIPRequest) CreatePublicIPPayload(createPublicIPPayload CreatePublicIPPayload) ApiCreatePublicIPRequest { - r.createPublicIPPayload = &createPublicIPPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreatePublicIPRequest) Execute() (*PublicIp, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PublicIp - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreatePublicIP") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/public-ips" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createPublicIPPayload == nil { - return localVarReturnValue, fmt.Errorf("createPublicIPPayload 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.createPublicIPPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 == 429 { - var v Error - err = 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 = 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 = 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 -} - -/* -CreatePublicIP: Create new public IP. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreatePublicIPRequest -*/ -func (a *APIClient) CreatePublicIP(ctx context.Context, projectId string, region string) ApiCreatePublicIPRequest { - return CreatePublicIPRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreatePublicIPExecute(ctx context.Context, projectId string, region string) (*PublicIp, error) { - r := CreatePublicIPRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createSecurityGroupPayload *CreateSecurityGroupPayload -} - -// Request a security group creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateSecurityGroupRequest) CreateSecurityGroupPayload(createSecurityGroupPayload CreateSecurityGroupPayload) ApiCreateSecurityGroupRequest { - r.createSecurityGroupPayload = &createSecurityGroupPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateSecurityGroupRequest) Execute() (*SecurityGroup, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SecurityGroup - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateSecurityGroup") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createSecurityGroupPayload == nil { - return localVarReturnValue, fmt.Errorf("createSecurityGroupPayload 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.createSecurityGroupPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateSecurityGroup: Create new security group. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateSecurityGroupRequest -*/ -func (a *APIClient) CreateSecurityGroup(ctx context.Context, projectId string, region string) ApiCreateSecurityGroupRequest { - return CreateSecurityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateSecurityGroupExecute(ctx context.Context, projectId string, region string) (*SecurityGroup, error) { - r := CreateSecurityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRuleRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - securityGroupId string - createSecurityGroupRulePayload *CreateSecurityGroupRulePayload -} - -// Request for a security group rule creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateSecurityGroupRuleRequest) CreateSecurityGroupRulePayload(createSecurityGroupRulePayload CreateSecurityGroupRulePayload) ApiCreateSecurityGroupRuleRequest { - r.createSecurityGroupRulePayload = &createSecurityGroupRulePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateSecurityGroupRuleRequest) Execute() (*SecurityGroupRule, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SecurityGroupRule - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateSecurityGroupRule") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}/rules" - 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, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId must have less than 36 elements") - } - if r.createSecurityGroupRulePayload == nil { - return localVarReturnValue, fmt.Errorf("createSecurityGroupRulePayload 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.createSecurityGroupRulePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateSecurityGroupRule: Create new security group rule. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiCreateSecurityGroupRuleRequest -*/ -func (a *APIClient) CreateSecurityGroupRule(ctx context.Context, projectId string, region string, securityGroupId string) ApiCreateSecurityGroupRuleRequest { - return CreateSecurityGroupRuleRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateSecurityGroupRuleExecute(ctx context.Context, projectId string, region string, securityGroupId string) (*SecurityGroupRule, error) { - r := CreateSecurityGroupRuleRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createServerPayload *CreateServerPayload -} - -// Request a server creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateServerRequest) CreateServerPayload(createServerPayload CreateServerPayload) ApiCreateServerRequest { - r.createServerPayload = &createServerPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateServerRequest) Execute() (*Server, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Server - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateServer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createServerPayload == nil { - return localVarReturnValue, fmt.Errorf("createServerPayload 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.createServerPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -CreateServer: Create new server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateServerRequest -*/ -func (a *APIClient) CreateServer(ctx context.Context, projectId string, region string) ApiCreateServerRequest { - return CreateServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateServerExecute(ctx context.Context, projectId string, region string) (*Server, error) { - r := CreateServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createSnapshotPayload *CreateSnapshotPayload -} - -// Request a snapshot creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateSnapshotRequest) CreateSnapshotPayload(createSnapshotPayload CreateSnapshotPayload) ApiCreateSnapshotRequest { - r.createSnapshotPayload = &createSnapshotPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateSnapshotRequest) Execute() (*Snapshot, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Snapshot - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateSnapshot") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/snapshots" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createSnapshotPayload == nil { - return localVarReturnValue, fmt.Errorf("createSnapshotPayload 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.createSnapshotPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 == 413 { - var v Error - err = 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 = 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 = 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 -} - -/* -CreateSnapshot: Create new Snapshot. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateSnapshotRequest -*/ -func (a *APIClient) CreateSnapshot(ctx context.Context, projectId string, region string) ApiCreateSnapshotRequest { - return CreateSnapshotRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateSnapshotExecute(ctx context.Context, projectId string, region string) (*Snapshot, error) { - r := CreateSnapshotRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createVolumePayload *CreateVolumePayload -} - -// Request a volume creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateVolumeRequest) CreateVolumePayload(createVolumePayload CreateVolumePayload) ApiCreateVolumeRequest { - r.createVolumePayload = &createVolumePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateVolumeRequest) Execute() (*Volume, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Volume - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateVolume") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volumes" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createVolumePayload == nil { - return localVarReturnValue, fmt.Errorf("createVolumePayload 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.createVolumePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 == 413 { - var v Error - err = 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 = 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 = 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 -} - -/* -CreateVolume: Create new volume. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateVolumeRequest -*/ -func (a *APIClient) CreateVolume(ctx context.Context, projectId string, region string) ApiCreateVolumeRequest { - return CreateVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateVolumeExecute(ctx context.Context, projectId string, region string) (*Volume, error) { - r := CreateVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeallocateServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeallocateServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeallocateServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/deallocate" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -DeallocateServer: Deallocate an existing server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiDeallocateServerRequest -*/ -func (a *APIClient) DeallocateServer(ctx context.Context, projectId string, region string, serverId string) ApiDeallocateServerRequest { - return DeallocateServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeallocateServerExecute(ctx context.Context, projectId string, region string, serverId string) error { - r := DeallocateServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteAffinityGroupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - affinityGroupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteAffinityGroupRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAffinityGroup") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/affinity-groups/{affinityGroupId}" - 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, "{"+"affinityGroupId"+"}", url.PathEscape(ParameterValueToString(r.affinityGroupId, "affinityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.affinityGroupId) < 36 { - return fmt.Errorf("affinityGroupId must have at least 36 elements") - } - if strlen(r.affinityGroupId) > 36 { - return fmt.Errorf("affinityGroupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteAffinityGroup: Delete a affinity group in a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 affinityGroupId The identifier (ID) of a STACKIT Affinity Group. - @return ApiDeleteAffinityGroupRequest -*/ -func (a *APIClient) DeleteAffinityGroup(ctx context.Context, projectId string, region string, affinityGroupId string) ApiDeleteAffinityGroupRequest { - return DeleteAffinityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - affinityGroupId: affinityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteAffinityGroupExecute(ctx context.Context, projectId string, region string, affinityGroupId string) error { - r := DeleteAffinityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - affinityGroupId: affinityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteBackupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - backupId string - force *bool -} - -// Force action. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteBackupRequest) Force(force bool) ApiDeleteBackupRequest { - r.force = &force - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteBackupRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteBackup") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/backups/{backupId}" - 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, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(r.backupId, "backupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.backupId) < 36 { - return fmt.Errorf("backupId must have at least 36 elements") - } - if strlen(r.backupId) > 36 { - return fmt.Errorf("backupId must have less than 36 elements") - } - - if r.force != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "force", r.force, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteBackup: Delete a backup. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return ApiDeleteBackupRequest -*/ -func (a *APIClient) DeleteBackup(ctx context.Context, projectId string, region string, backupId string) ApiDeleteBackupRequest { - return DeleteBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - backupId: backupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteBackupExecute(ctx context.Context, projectId string, region string, backupId string) error { - r := DeleteBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - backupId: backupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteImageRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteImageRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteImage") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return fmt.Errorf("imageId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteImage: Delete an Image. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiDeleteImageRequest -*/ -func (a *APIClient) DeleteImage(ctx context.Context, projectId string, region string, imageId string) ApiDeleteImageRequest { - return DeleteImageRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteImageExecute(ctx context.Context, projectId string, region string, imageId string) error { - r := DeleteImageRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteImageShareRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteImageShareRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteImageShare") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}/share" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return fmt.Errorf("imageId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteImageShare: Remove image share. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiDeleteImageShareRequest -*/ -func (a *APIClient) DeleteImageShare(ctx context.Context, projectId string, region string, imageId string) ApiDeleteImageShareRequest { - return DeleteImageShareRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteImageShareExecute(ctx context.Context, projectId string, region string, imageId string) error { - r := DeleteImageShareRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteImageShareConsumerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string - consumerProjectId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteImageShareConsumerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteImageShareConsumer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}/share/{consumerProjectId}" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"consumerProjectId"+"}", url.PathEscape(ParameterValueToString(r.consumerProjectId, "consumerProjectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return fmt.Errorf("imageId must have less than 36 elements") - } - if strlen(r.consumerProjectId) < 36 { - return fmt.Errorf("consumerProjectId must have at least 36 elements") - } - if strlen(r.consumerProjectId) > 36 { - return fmt.Errorf("consumerProjectId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteImageShareConsumer: Remove an image share consumer. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @param consumerProjectId The identifier (ID) of a STACKIT Project that consumes an image share. - @return ApiDeleteImageShareConsumerRequest -*/ -func (a *APIClient) DeleteImageShareConsumer(ctx context.Context, projectId string, region string, imageId string, consumerProjectId string) ApiDeleteImageShareConsumerRequest { - return DeleteImageShareConsumerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - consumerProjectId: consumerProjectId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteImageShareConsumerExecute(ctx context.Context, projectId string, region string, imageId string, consumerProjectId string) error { - r := DeleteImageShareConsumerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - consumerProjectId: consumerProjectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteKeyPairRequest struct { - ctx context.Context - apiService *DefaultApiService - keypairName string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteKeyPairRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteKeyPair") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/keypairs/{keypairName}" - localVarPath = strings.Replace(localVarPath, "{"+"keypairName"+"}", url.PathEscape(ParameterValueToString(r.keypairName, "keypairName")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.keypairName) > 127 { - return fmt.Errorf("keypairName must have less than 127 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteKeyPair: Delete an SSH keypair. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param keypairName The name of an SSH keypair. - @return ApiDeleteKeyPairRequest -*/ -func (a *APIClient) DeleteKeyPair(ctx context.Context, keypairName string) ApiDeleteKeyPairRequest { - return DeleteKeyPairRequest{ - apiService: a.defaultApi, - ctx: ctx, - keypairName: keypairName, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteKeyPairExecute(ctx context.Context, keypairName string) error { - r := DeleteKeyPairRequest{ - apiService: a.defaultApi, - ctx: ctx, - keypairName: keypairName, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteNetworkRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - networkId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteNetworkRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteNetwork") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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 fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteNetwork: Delete network. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) DeleteNetwork(ctx context.Context, projectId string, region string, networkId string) ApiDeleteNetworkRequest { - return DeleteNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteNetworkExecute(ctx context.Context, projectId string, region string, networkId string) error { - r := DeleteNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteNetworkAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteNetworkAreaRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteNetworkArea") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(ParameterValueToString(r.areaId, "areaId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return fmt.Errorf("areaId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteNetworkArea: Delete a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @return ApiDeleteNetworkAreaRequest -*/ -func (a *APIClient) DeleteNetworkArea(ctx context.Context, organizationId string, areaId string) ApiDeleteNetworkAreaRequest { - return DeleteNetworkAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteNetworkAreaExecute(ctx context.Context, organizationId string, areaId string) error { - r := DeleteNetworkAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteNetworkAreaRangeRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - networkRangeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteNetworkAreaRangeRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteNetworkAreaRange") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/network-ranges/{networkRangeId}" - 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, "{"+"networkRangeId"+"}", url.PathEscape(ParameterValueToString(r.networkRangeId, "networkRangeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.networkRangeId) < 36 { - return fmt.Errorf("networkRangeId must have at least 36 elements") - } - if strlen(r.networkRangeId) > 36 { - return fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteNetworkAreaRange: Delete a network range. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiDeleteNetworkAreaRangeRequest -*/ -func (a *APIClient) DeleteNetworkAreaRange(ctx context.Context, organizationId string, areaId string, region string, networkRangeId string) ApiDeleteNetworkAreaRangeRequest { - return DeleteNetworkAreaRangeRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - networkRangeId: networkRangeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteNetworkAreaRangeExecute(ctx context.Context, organizationId string, areaId string, region string, networkRangeId string) error { - r := DeleteNetworkAreaRangeRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - networkRangeId: networkRangeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteNetworkAreaRegionRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteNetworkAreaRegionRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteNetworkAreaRegion") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}" - 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 fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return fmt.Errorf("areaId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteNetworkAreaRegion: Delete a configuration of region for a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiDeleteNetworkAreaRegionRequest -*/ -func (a *APIClient) DeleteNetworkAreaRegion(ctx context.Context, organizationId string, areaId string, region string) ApiDeleteNetworkAreaRegionRequest { - return DeleteNetworkAreaRegionRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) error { - r := DeleteNetworkAreaRegionRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteNetworkAreaRouteRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteNetworkAreaRouteRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteNetworkAreaRoute") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/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, "{"+"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 fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return fmt.Errorf("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteNetworkAreaRoute: Delete a network route. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 routeId The identifier (ID) of a STACKIT Route. - @return ApiDeleteNetworkAreaRouteRequest -*/ -func (a *APIClient) DeleteNetworkAreaRoute(ctx context.Context, organizationId string, areaId string, region string, routeId string) ApiDeleteNetworkAreaRouteRequest { - return DeleteNetworkAreaRouteRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routeId: routeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteNetworkAreaRouteExecute(ctx context.Context, organizationId string, areaId string, region string, routeId string) error { - r := DeleteNetworkAreaRouteRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routeId: routeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteNicRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - networkId string - nicId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteNicRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteNic") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/networks/{networkId}/nics/{nicId}" - 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) - localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", url.PathEscape(ParameterValueToString(r.nicId, "nicId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return fmt.Errorf("networkId must have less than 36 elements") - } - if strlen(r.nicId) < 36 { - return fmt.Errorf("nicId must have at least 36 elements") - } - if strlen(r.nicId) > 36 { - return fmt.Errorf("nicId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteNic: Delete a network interface. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @param nicId The identifier (ID) of a network interface. - @return ApiDeleteNicRequest -*/ -func (a *APIClient) DeleteNic(ctx context.Context, projectId string, region string, networkId string, nicId string) ApiDeleteNicRequest { - return DeleteNicRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - nicId: nicId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteNicExecute(ctx context.Context, projectId string, region string, networkId string, nicId string) error { - r := DeleteNicRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - nicId: nicId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeletePublicIPRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - publicIpId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeletePublicIPRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeletePublicIP") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/public-ips/{publicIpId}" - 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, "{"+"publicIpId"+"}", url.PathEscape(ParameterValueToString(r.publicIpId, "publicIpId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.publicIpId) < 36 { - return fmt.Errorf("publicIpId must have at least 36 elements") - } - if strlen(r.publicIpId) > 36 { - return fmt.Errorf("publicIpId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeletePublicIP: Delete a public IP. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 publicIpId The identifier (ID) of a Public IP. - @return ApiDeletePublicIPRequest -*/ -func (a *APIClient) DeletePublicIP(ctx context.Context, projectId string, region string, publicIpId string) ApiDeletePublicIPRequest { - return DeletePublicIPRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - publicIpId: publicIpId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeletePublicIPExecute(ctx context.Context, projectId string, region string, publicIpId string) error { - r := DeletePublicIPRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - publicIpId: publicIpId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteRouteFromRoutingTableRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routingTableId string - routeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteRouteFromRoutingTableRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRouteFromRoutingTable") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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 fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return fmt.Errorf("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return fmt.Errorf("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return fmt.Errorf("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteRouteFromRoutingTable: Delete a route in a routing table. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) DeleteRouteFromRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiDeleteRouteFromRoutingTableRequest { - return DeleteRouteFromRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteRouteFromRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) error { - r := DeleteRouteFromRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteRoutingTableFromAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routingTableId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteRoutingTableFromAreaRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRoutingTableFromArea") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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 fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return fmt.Errorf("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteRoutingTableFromArea: Delete a routing table. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) DeleteRoutingTableFromArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiDeleteRoutingTableFromAreaRequest { - return DeleteRoutingTableFromAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteRoutingTableFromAreaExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) error { - r := DeleteRoutingTableFromAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteSecurityGroupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - securityGroupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteSecurityGroupRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteSecurityGroup") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}" - 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, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return fmt.Errorf("securityGroupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteSecurityGroup: Delete security group. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiDeleteSecurityGroupRequest -*/ -func (a *APIClient) DeleteSecurityGroup(ctx context.Context, projectId string, region string, securityGroupId string) ApiDeleteSecurityGroupRequest { - return DeleteSecurityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteSecurityGroupExecute(ctx context.Context, projectId string, region string, securityGroupId string) error { - r := DeleteSecurityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteSecurityGroupRuleRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - securityGroupId string - securityGroupRuleId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteSecurityGroupRuleRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteSecurityGroupRule") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}/rules/{securityGroupRuleId}" - 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, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"securityGroupRuleId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupRuleId, "securityGroupRuleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return fmt.Errorf("securityGroupId must have less than 36 elements") - } - if strlen(r.securityGroupRuleId) < 36 { - return fmt.Errorf("securityGroupRuleId must have at least 36 elements") - } - if strlen(r.securityGroupRuleId) > 36 { - return fmt.Errorf("securityGroupRuleId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteSecurityGroupRule: Delete security group rule. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @param securityGroupRuleId The identifier (ID) of a STACKIT Security Group Rule. - @return ApiDeleteSecurityGroupRuleRequest -*/ -func (a *APIClient) DeleteSecurityGroupRule(ctx context.Context, projectId string, region string, securityGroupId string, securityGroupRuleId string) ApiDeleteSecurityGroupRuleRequest { - return DeleteSecurityGroupRuleRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - securityGroupRuleId: securityGroupRuleId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteSecurityGroupRuleExecute(ctx context.Context, projectId string, region string, securityGroupId string, securityGroupRuleId string) error { - r := DeleteSecurityGroupRuleRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - securityGroupRuleId: securityGroupRuleId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteServer: Delete a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiDeleteServerRequest -*/ -func (a *APIClient) DeleteServer(ctx context.Context, projectId string, region string, serverId string) ApiDeleteServerRequest { - return DeleteServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteServerExecute(ctx context.Context, projectId string, region string, serverId string) error { - r := DeleteServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteSnapshotRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - snapshotId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteSnapshotRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteSnapshot") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/snapshots/{snapshotId}" - 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, "{"+"snapshotId"+"}", url.PathEscape(ParameterValueToString(r.snapshotId, "snapshotId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.snapshotId) < 36 { - return fmt.Errorf("snapshotId must have at least 36 elements") - } - if strlen(r.snapshotId) > 36 { - return fmt.Errorf("snapshotId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteSnapshot: Delete a snapshot. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 snapshotId The identifier (ID) of a STACKIT Snapshot. - @return ApiDeleteSnapshotRequest -*/ -func (a *APIClient) DeleteSnapshot(ctx context.Context, projectId string, region string, snapshotId string) ApiDeleteSnapshotRequest { - return DeleteSnapshotRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - snapshotId: snapshotId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteSnapshotExecute(ctx context.Context, projectId string, region string, snapshotId string) error { - r := DeleteSnapshotRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - snapshotId: snapshotId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteVolumeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - volumeId string - cascade *bool -} - -// Cascade action. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteVolumeRequest) Cascade(cascade bool) ApiDeleteVolumeRequest { - r.cascade = &cascade - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteVolumeRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteVolume") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volumes/{volumeId}" - 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, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return fmt.Errorf("volumeId must have less than 36 elements") - } - - if r.cascade != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cascade", r.cascade, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -DeleteVolume: Delete a volume. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return ApiDeleteVolumeRequest -*/ -func (a *APIClient) DeleteVolume(ctx context.Context, projectId string, region string, volumeId string) ApiDeleteVolumeRequest { - return DeleteVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumeId: volumeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteVolumeExecute(ctx context.Context, projectId string, region string, volumeId string) error { - r := DeleteVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumeId: volumeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetAffinityGroupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - affinityGroupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetAffinityGroupRequest) Execute() (*AffinityGroup, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AffinityGroup - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAffinityGroup") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/affinity-groups/{affinityGroupId}" - 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, "{"+"affinityGroupId"+"}", url.PathEscape(ParameterValueToString(r.affinityGroupId, "affinityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.affinityGroupId) < 36 { - return localVarReturnValue, fmt.Errorf("affinityGroupId must have at least 36 elements") - } - if strlen(r.affinityGroupId) > 36 { - return localVarReturnValue, fmt.Errorf("affinityGroupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetAffinityGroup: Get the affinity group. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 affinityGroupId The identifier (ID) of a STACKIT Affinity Group. - @return ApiGetAffinityGroupRequest -*/ -func (a *APIClient) GetAffinityGroup(ctx context.Context, projectId string, region string, affinityGroupId string) ApiGetAffinityGroupRequest { - return GetAffinityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - affinityGroupId: affinityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetAffinityGroupExecute(ctx context.Context, projectId string, region string, affinityGroupId string) (*AffinityGroup, error) { - r := GetAffinityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - affinityGroupId: affinityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetAttachedVolumeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - volumeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetAttachedVolumeRequest) Execute() (*VolumeAttachment, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VolumeAttachment - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAttachedVolume") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments/{volumeId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return localVarReturnValue, fmt.Errorf("volumeId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetAttachedVolume: Get Volume Attachment details. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return ApiGetAttachedVolumeRequest -*/ -func (a *APIClient) GetAttachedVolume(ctx context.Context, projectId string, region string, serverId string, volumeId string) ApiGetAttachedVolumeRequest { - return GetAttachedVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - volumeId: volumeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetAttachedVolumeExecute(ctx context.Context, projectId string, region string, serverId string, volumeId string) (*VolumeAttachment, error) { - r := GetAttachedVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - volumeId: volumeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - backupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetBackupRequest) Execute() (*Backup, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Backup - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetBackup") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/backups/{backupId}" - 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, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(r.backupId, "backupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.backupId) < 36 { - return localVarReturnValue, fmt.Errorf("backupId must have at least 36 elements") - } - if strlen(r.backupId) > 36 { - return localVarReturnValue, fmt.Errorf("backupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetBackup: Get details about a backup. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return ApiGetBackupRequest -*/ -func (a *APIClient) GetBackup(ctx context.Context, projectId string, region string, backupId string) ApiGetBackupRequest { - return GetBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - backupId: backupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, region string, backupId string) (*Backup, error) { - r := GetBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - backupId: backupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetImageRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetImageRequest) Execute() (*Image, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Image - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetImage") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return localVarReturnValue, fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return localVarReturnValue, fmt.Errorf("imageId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetImage: Get details about an image. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiGetImageRequest -*/ -func (a *APIClient) GetImage(ctx context.Context, projectId string, region string, imageId string) ApiGetImageRequest { - return GetImageRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetImageExecute(ctx context.Context, projectId string, region string, imageId string) (*Image, error) { - r := GetImageRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetImageShareRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetImageShareRequest) Execute() (*ImageShare, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ImageShare - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetImageShare") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}/share" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return localVarReturnValue, fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return localVarReturnValue, fmt.Errorf("imageId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetImageShare: Get share details of an image. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiGetImageShareRequest -*/ -func (a *APIClient) GetImageShare(ctx context.Context, projectId string, region string, imageId string) ApiGetImageShareRequest { - return GetImageShareRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetImageShareExecute(ctx context.Context, projectId string, region string, imageId string) (*ImageShare, error) { - r := GetImageShareRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetImageShareConsumerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string - consumerProjectId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetImageShareConsumerRequest) Execute() (*ImageShareConsumer, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ImageShareConsumer - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetImageShareConsumer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}/share/{consumerProjectId}" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"consumerProjectId"+"}", url.PathEscape(ParameterValueToString(r.consumerProjectId, "consumerProjectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return localVarReturnValue, fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return localVarReturnValue, fmt.Errorf("imageId must have less than 36 elements") - } - if strlen(r.consumerProjectId) < 36 { - return localVarReturnValue, fmt.Errorf("consumerProjectId must have at least 36 elements") - } - if strlen(r.consumerProjectId) > 36 { - return localVarReturnValue, fmt.Errorf("consumerProjectId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetImageShareConsumer: Get image share consumer. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @param consumerProjectId The identifier (ID) of a STACKIT Project that consumes an image share. - @return ApiGetImageShareConsumerRequest -*/ -func (a *APIClient) GetImageShareConsumer(ctx context.Context, projectId string, region string, imageId string, consumerProjectId string) ApiGetImageShareConsumerRequest { - return GetImageShareConsumerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - consumerProjectId: consumerProjectId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetImageShareConsumerExecute(ctx context.Context, projectId string, region string, imageId string, consumerProjectId string) (*ImageShareConsumer, error) { - r := GetImageShareConsumerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - consumerProjectId: consumerProjectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetKeyPairRequest struct { - ctx context.Context - apiService *DefaultApiService - keypairName string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetKeyPairRequest) Execute() (*Keypair, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Keypair - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetKeyPair") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/keypairs/{keypairName}" - localVarPath = strings.Replace(localVarPath, "{"+"keypairName"+"}", url.PathEscape(ParameterValueToString(r.keypairName, "keypairName")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.keypairName) > 127 { - return localVarReturnValue, fmt.Errorf("keypairName must have less than 127 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetKeyPair: Get SSH keypair details. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param keypairName The name of an SSH keypair. - @return ApiGetKeyPairRequest -*/ -func (a *APIClient) GetKeyPair(ctx context.Context, keypairName string) ApiGetKeyPairRequest { - return GetKeyPairRequest{ - apiService: a.defaultApi, - ctx: ctx, - keypairName: keypairName, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetKeyPairExecute(ctx context.Context, keypairName string) (*Keypair, error) { - r := GetKeyPairRequest{ - apiService: a.defaultApi, - ctx: ctx, - keypairName: keypairName, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetMachineTypeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - machineType string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetMachineTypeRequest) Execute() (*MachineType, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MachineType - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetMachineType") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/machine-types/{machineType}" - 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, "{"+"machineType"+"}", url.PathEscape(ParameterValueToString(r.machineType, "machineType")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.machineType) > 127 { - return localVarReturnValue, fmt.Errorf("machineType must have less than 127 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetMachineType: Get details about a machine type. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 machineType STACKIT machine type Name. - @return ApiGetMachineTypeRequest -*/ -func (a *APIClient) GetMachineType(ctx context.Context, projectId string, region string, machineType string) ApiGetMachineTypeRequest { - return GetMachineTypeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - machineType: machineType, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetMachineTypeExecute(ctx context.Context, projectId string, region string, machineType string) (*MachineType, error) { - r := GetMachineTypeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - machineType: machineType, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetNetworkRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - networkId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetNetworkRequest) Execute() (*Network, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Network - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNetwork") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return localVarReturnValue, fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetNetwork: Get network details. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) GetNetwork(ctx context.Context, projectId string, region string, networkId string) ApiGetNetworkRequest { - return GetNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetNetworkExecute(ctx context.Context, projectId string, region string, networkId string) (*Network, error) { - r := GetNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetNetworkAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetNetworkAreaRequest) Execute() (*NetworkArea, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkArea - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNetworkArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(ParameterValueToString(r.areaId, "areaId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetNetworkArea: Get details about a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @return ApiGetNetworkAreaRequest -*/ -func (a *APIClient) GetNetworkArea(ctx context.Context, organizationId string, areaId string) ApiGetNetworkAreaRequest { - return GetNetworkAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetNetworkAreaExecute(ctx context.Context, organizationId string, areaId string) (*NetworkArea, error) { - r := GetNetworkAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetNetworkAreaRangeRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - networkRangeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetNetworkAreaRangeRequest) Execute() (*NetworkRange, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkRange - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNetworkAreaRange") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/network-ranges/{networkRangeId}" - 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, "{"+"networkRangeId"+"}", url.PathEscape(ParameterValueToString(r.networkRangeId, "networkRangeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.networkRangeId) < 36 { - return localVarReturnValue, fmt.Errorf("networkRangeId must have at least 36 elements") - } - if strlen(r.networkRangeId) > 36 { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetNetworkAreaRange: Get details about a network range. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 networkRangeId The identifier (ID) of a STACKIT Network Range. - @return ApiGetNetworkAreaRangeRequest -*/ -func (a *APIClient) GetNetworkAreaRange(ctx context.Context, organizationId string, areaId string, region string, networkRangeId string) ApiGetNetworkAreaRangeRequest { - return GetNetworkAreaRangeRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - networkRangeId: networkRangeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetNetworkAreaRangeExecute(ctx context.Context, organizationId string, areaId string, region string, networkRangeId string) (*NetworkRange, error) { - r := GetNetworkAreaRangeRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - networkRangeId: networkRangeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetNetworkAreaRegionRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetNetworkAreaRegionRequest) Execute() (*RegionalArea, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegionalArea - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNetworkAreaRegion") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}" - 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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetNetworkAreaRegion: Get details about a configured region. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiGetNetworkAreaRegionRequest -*/ -func (a *APIClient) GetNetworkAreaRegion(ctx context.Context, organizationId string, areaId string, region string) ApiGetNetworkAreaRegionRequest { - return GetNetworkAreaRegionRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) (*RegionalArea, error) { - r := GetNetworkAreaRegionRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetNetworkAreaRouteRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetNetworkAreaRouteRequest) Execute() (*Route, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNetworkAreaRoute") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/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, "{"+"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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return localVarReturnValue, fmt.Errorf("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetNetworkAreaRoute: Get details about a network route. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 routeId The identifier (ID) of a STACKIT Route. - @return ApiGetNetworkAreaRouteRequest -*/ -func (a *APIClient) GetNetworkAreaRoute(ctx context.Context, organizationId string, areaId string, region string, routeId string) ApiGetNetworkAreaRouteRequest { - return GetNetworkAreaRouteRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routeId: routeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetNetworkAreaRouteExecute(ctx context.Context, organizationId string, areaId string, region string, routeId string) (*Route, error) { - r := GetNetworkAreaRouteRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routeId: routeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetNicRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - networkId string - nicId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetNicRequest) Execute() (*NIC, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NIC - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNic") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/networks/{networkId}/nics/{nicId}" - 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) - localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", url.PathEscape(ParameterValueToString(r.nicId, "nicId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return localVarReturnValue, fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return localVarReturnValue, fmt.Errorf("networkId must have less than 36 elements") - } - if strlen(r.nicId) < 36 { - return localVarReturnValue, fmt.Errorf("nicId must have at least 36 elements") - } - if strlen(r.nicId) > 36 { - return localVarReturnValue, fmt.Errorf("nicId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetNic: Get details about a network interface. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @param nicId The identifier (ID) of a network interface. - @return ApiGetNicRequest -*/ -func (a *APIClient) GetNic(ctx context.Context, projectId string, region string, networkId string, nicId string) ApiGetNicRequest { - return GetNicRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - nicId: nicId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetNicExecute(ctx context.Context, projectId string, region string, networkId string, nicId string) (*NIC, error) { - r := GetNicRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - nicId: nicId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetOrganizationRequestRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - requestId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetOrganizationRequestRequest) Execute() (*Request, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Request - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetOrganizationRequest") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/requests/{requestId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"requestId"+"}", url.PathEscape(ParameterValueToString(r.requestId, "requestId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.requestId) < 36 { - return localVarReturnValue, fmt.Errorf("requestId must have at least 36 elements") - } - if strlen(r.requestId) > 36 { - return localVarReturnValue, fmt.Errorf("requestId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetOrganizationRequest: Lookup an organization request ID. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 requestId The identifier (ID) of a STACKIT Request. - @return ApiGetOrganizationRequestRequest -*/ -func (a *APIClient) GetOrganizationRequest(ctx context.Context, organizationId string, requestId string) ApiGetOrganizationRequestRequest { - return GetOrganizationRequestRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - requestId: requestId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetOrganizationRequestExecute(ctx context.Context, organizationId string, requestId string) (*Request, error) { - r := GetOrganizationRequestRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - requestId: requestId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetProjectDetailsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetProjectDetailsRequest) Execute() (*Project, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Project - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetProjectDetails") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetProjectDetails: Get project details. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiGetProjectDetailsRequest -*/ -func (a *APIClient) GetProjectDetails(ctx context.Context, projectId string) ApiGetProjectDetailsRequest { - return GetProjectDetailsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetProjectDetailsExecute(ctx context.Context, projectId string) (*Project, error) { - r := GetProjectDetailsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetProjectNICRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - nicId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetProjectNICRequest) Execute() (*NIC, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NIC - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetProjectNIC") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/nics/{nicId}" - 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, "{"+"nicId"+"}", url.PathEscape(ParameterValueToString(r.nicId, "nicId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.nicId) < 36 { - return localVarReturnValue, fmt.Errorf("nicId must have at least 36 elements") - } - if strlen(r.nicId) > 36 { - return localVarReturnValue, fmt.Errorf("nicId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetProjectNIC: Get details about a network interface of a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 nicId The identifier (ID) of a network interface. - @return ApiGetProjectNICRequest -*/ -func (a *APIClient) GetProjectNIC(ctx context.Context, projectId string, region string, nicId string) ApiGetProjectNICRequest { - return GetProjectNICRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - nicId: nicId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetProjectNICExecute(ctx context.Context, projectId string, region string, nicId string) (*NIC, error) { - r := GetProjectNICRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - nicId: nicId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetProjectRequestRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - requestId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetProjectRequestRequest) Execute() (*Request, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Request - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetProjectRequest") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/requests/{requestId}" - 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, "{"+"requestId"+"}", url.PathEscape(ParameterValueToString(r.requestId, "requestId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.requestId) < 36 { - return localVarReturnValue, fmt.Errorf("requestId must have at least 36 elements") - } - if strlen(r.requestId) > 36 { - return localVarReturnValue, fmt.Errorf("requestId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetProjectRequest: Lookup a project request ID. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 requestId The identifier (ID) of a STACKIT Request. - @return ApiGetProjectRequestRequest -*/ -func (a *APIClient) GetProjectRequest(ctx context.Context, projectId string, region string, requestId string) ApiGetProjectRequestRequest { - return GetProjectRequestRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - requestId: requestId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetProjectRequestExecute(ctx context.Context, projectId string, region string, requestId string) (*Request, error) { - r := GetProjectRequestRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - requestId: requestId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetPublicIPRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - publicIpId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetPublicIPRequest) Execute() (*PublicIp, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PublicIp - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPublicIP") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/public-ips/{publicIpId}" - 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, "{"+"publicIpId"+"}", url.PathEscape(ParameterValueToString(r.publicIpId, "publicIpId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.publicIpId) < 36 { - return localVarReturnValue, fmt.Errorf("publicIpId must have at least 36 elements") - } - if strlen(r.publicIpId) > 36 { - return localVarReturnValue, fmt.Errorf("publicIpId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetPublicIP: Get details about a public IP. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 publicIpId The identifier (ID) of a Public IP. - @return ApiGetPublicIPRequest -*/ -func (a *APIClient) GetPublicIP(ctx context.Context, projectId string, region string, publicIpId string) ApiGetPublicIPRequest { - return GetPublicIPRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - publicIpId: publicIpId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetPublicIPExecute(ctx context.Context, projectId string, region string, publicIpId string) (*PublicIp, error) { - r := GetPublicIPRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - publicIpId: publicIpId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetRouteOfRoutingTableRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routingTableId string - routeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetRouteOfRoutingTableRequest) Execute() (*Route, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRouteOfRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return localVarReturnValue, fmt.Errorf("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetRouteOfRoutingTable: Get details about a route of a routing table. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) GetRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiGetRouteOfRoutingTableRequest { - return GetRouteOfRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetRouteOfRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) (*Route, error) { - r := GetRouteOfRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetRoutingTableOfAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routingTableId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetRoutingTableOfAreaRequest) Execute() (*RoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RoutingTable - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRoutingTableOfArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetRoutingTableOfArea: Get details about a routing table. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) GetRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiGetRoutingTableOfAreaRequest { - return GetRoutingTableOfAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetRoutingTableOfAreaExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) (*RoutingTable, error) { - r := GetRoutingTableOfAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetSecurityGroupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - securityGroupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetSecurityGroupRequest) Execute() (*SecurityGroup, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SecurityGroup - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetSecurityGroup") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}" - 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, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetSecurityGroup: Get security group details. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiGetSecurityGroupRequest -*/ -func (a *APIClient) GetSecurityGroup(ctx context.Context, projectId string, region string, securityGroupId string) ApiGetSecurityGroupRequest { - return GetSecurityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetSecurityGroupExecute(ctx context.Context, projectId string, region string, securityGroupId string) (*SecurityGroup, error) { - r := GetSecurityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetSecurityGroupRuleRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - securityGroupId string - securityGroupRuleId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetSecurityGroupRuleRequest) Execute() (*SecurityGroupRule, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SecurityGroupRule - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetSecurityGroupRule") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}/rules/{securityGroupRuleId}" - 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, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"securityGroupRuleId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupRuleId, "securityGroupRuleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId must have less than 36 elements") - } - if strlen(r.securityGroupRuleId) < 36 { - return localVarReturnValue, fmt.Errorf("securityGroupRuleId must have at least 36 elements") - } - if strlen(r.securityGroupRuleId) > 36 { - return localVarReturnValue, fmt.Errorf("securityGroupRuleId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetSecurityGroupRule: Get security group rule details. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @param securityGroupRuleId The identifier (ID) of a STACKIT Security Group Rule. - @return ApiGetSecurityGroupRuleRequest -*/ -func (a *APIClient) GetSecurityGroupRule(ctx context.Context, projectId string, region string, securityGroupId string, securityGroupRuleId string) ApiGetSecurityGroupRuleRequest { - return GetSecurityGroupRuleRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - securityGroupRuleId: securityGroupRuleId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetSecurityGroupRuleExecute(ctx context.Context, projectId string, region string, securityGroupId string, securityGroupRuleId string) (*SecurityGroupRule, error) { - r := GetSecurityGroupRuleRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - securityGroupRuleId: securityGroupRuleId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - details *bool -} - -// Show detailed information about server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetServerRequest) Details(details bool) ApiGetServerRequest { - r.details = &details - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetServerRequest) Execute() (*Server, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Server - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetServer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId must have less than 36 elements") - } - - if r.details != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "details", r.details, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetServer: Get server details. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiGetServerRequest -*/ -func (a *APIClient) GetServer(ctx context.Context, projectId string, region string, serverId string) ApiGetServerRequest { - return GetServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetServerExecute(ctx context.Context, projectId string, region string, serverId string) (*Server, error) { - r := GetServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetServerConsoleRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetServerConsoleRequest) Execute() (*ServerConsoleUrl, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ServerConsoleUrl - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetServerConsole") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/console" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetServerConsole: Get server console. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiGetServerConsoleRequest -*/ -func (a *APIClient) GetServerConsole(ctx context.Context, projectId string, region string, serverId string) ApiGetServerConsoleRequest { - return GetServerConsoleRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetServerConsoleExecute(ctx context.Context, projectId string, region string, serverId string) (*ServerConsoleUrl, error) { - r := GetServerConsoleRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetServerLogRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - length *int64 -} - -// Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetServerLogRequest) Length(length int64) ApiGetServerLogRequest { - r.length = &length - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetServerLogRequest) Execute() (*GetServerLog200Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetServerLog200Response - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetServerLog") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/log" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId must have less than 36 elements") - } - - if r.length != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "length", r.length, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetServerLog: Get server log. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiGetServerLogRequest -*/ -func (a *APIClient) GetServerLog(ctx context.Context, projectId string, region string, serverId string) ApiGetServerLogRequest { - return GetServerLogRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetServerLogExecute(ctx context.Context, projectId string, region string, serverId string) (*GetServerLog200Response, error) { - r := GetServerLogRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetSnapshotRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - snapshotId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetSnapshotRequest) Execute() (*Snapshot, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Snapshot - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetSnapshot") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/snapshots/{snapshotId}" - 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, "{"+"snapshotId"+"}", url.PathEscape(ParameterValueToString(r.snapshotId, "snapshotId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.snapshotId) < 36 { - return localVarReturnValue, fmt.Errorf("snapshotId must have at least 36 elements") - } - if strlen(r.snapshotId) > 36 { - return localVarReturnValue, fmt.Errorf("snapshotId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetSnapshot: Get details about a snapshot. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 snapshotId The identifier (ID) of a STACKIT Snapshot. - @return ApiGetSnapshotRequest -*/ -func (a *APIClient) GetSnapshot(ctx context.Context, projectId string, region string, snapshotId string) ApiGetSnapshotRequest { - return GetSnapshotRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - snapshotId: snapshotId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetSnapshotExecute(ctx context.Context, projectId string, region string, snapshotId string) (*Snapshot, error) { - r := GetSnapshotRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - snapshotId: snapshotId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetVolumeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - volumeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetVolumeRequest) Execute() (*Volume, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Volume - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetVolume") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volumes/{volumeId}" - 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, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return localVarReturnValue, fmt.Errorf("volumeId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetVolume: Get details about a volume. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return ApiGetVolumeRequest -*/ -func (a *APIClient) GetVolume(ctx context.Context, projectId string, region string, volumeId string) ApiGetVolumeRequest { - return GetVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumeId: volumeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetVolumeExecute(ctx context.Context, projectId string, region string, volumeId string) (*Volume, error) { - r := GetVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumeId: volumeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetVolumePerformanceClassRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - volumePerformanceClass string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetVolumePerformanceClassRequest) Execute() (*VolumePerformanceClass, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VolumePerformanceClass - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetVolumePerformanceClass") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volume-performance-classes/{volumePerformanceClass}" - 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, "{"+"volumePerformanceClass"+"}", url.PathEscape(ParameterValueToString(r.volumePerformanceClass, "volumePerformanceClass")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.volumePerformanceClass) > 127 { - return localVarReturnValue, fmt.Errorf("volumePerformanceClass must have less than 127 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -GetVolumePerformanceClass: Get details about a volume performance class. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 volumePerformanceClass The name of a STACKIT Volume performance class. - @return ApiGetVolumePerformanceClassRequest -*/ -func (a *APIClient) GetVolumePerformanceClass(ctx context.Context, projectId string, region string, volumePerformanceClass string) ApiGetVolumePerformanceClassRequest { - return GetVolumePerformanceClassRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumePerformanceClass: volumePerformanceClass, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetVolumePerformanceClassExecute(ctx context.Context, projectId string, region string, volumePerformanceClass string) (*VolumePerformanceClass, error) { - r := GetVolumePerformanceClassRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumePerformanceClass: volumePerformanceClass, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - volumeId string - region string - imageFromVolumePayload *ImageFromVolumePayload -} - -// Create an image from a volume. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ImageFromVolumeRequest) ImageFromVolumePayload(imageFromVolumePayload ImageFromVolumePayload) ApiImageFromVolumeRequest { - r.imageFromVolumePayload = &imageFromVolumePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ImageFromVolumeRequest) Execute() (*Image, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Image - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ImageFromVolume") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volumes/{volumeId}/upload" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have less than 36 elements") - } - - // 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.imageFromVolumePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ImageFromVolume: Create an image out of a volume. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @param region The STACKIT Region of the resources. - @return ApiImageFromVolumeRequest -*/ -func (a *APIClient) ImageFromVolume(ctx context.Context, projectId string, volumeId string, region string) ApiImageFromVolumeRequest { - return ImageFromVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - volumeId: volumeId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ImageFromVolumeExecute(ctx context.Context, projectId string, volumeId string, region string) (*Image, error) { - r := ImageFromVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - volumeId: volumeId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAffinityGroupsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListAffinityGroupsRequest) Execute() (*AffinityGroupListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AffinityGroupListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAffinityGroups") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/affinity-groups" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListAffinityGroups: Get the affinity groups setup for a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListAffinityGroupsRequest -*/ -func (a *APIClient) ListAffinityGroups(ctx context.Context, projectId string, region string) ApiListAffinityGroupsRequest { - return ListAffinityGroupsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListAffinityGroupsExecute(ctx context.Context, projectId string, region string) (*AffinityGroupListResponse, error) { - r := ListAffinityGroupsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAttachedVolumesRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListAttachedVolumesRequest) Execute() (*VolumeAttachmentListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VolumeAttachmentListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAttachedVolumes") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListAttachedVolumes: List all volume attachments of a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiListAttachedVolumesRequest -*/ -func (a *APIClient) ListAttachedVolumes(ctx context.Context, projectId string, region string, serverId string) ApiListAttachedVolumesRequest { - return ListAttachedVolumesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListAttachedVolumesExecute(ctx context.Context, projectId string, region string, serverId string) (*VolumeAttachmentListResponse, error) { - r := ListAttachedVolumesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAvailabilityZonesRequest struct { - ctx context.Context - apiService *DefaultApiService - region string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListAvailabilityZonesRequest) Execute() (*AvailabilityZoneListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AvailabilityZoneListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAvailabilityZones") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/regions/{region}/availability-zones" - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListAvailabilityZones: List all availability zones. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param region The STACKIT Region of the resources. - @return ApiListAvailabilityZonesRequest -*/ -func (a *APIClient) ListAvailabilityZones(ctx context.Context, region string) ApiListAvailabilityZonesRequest { - return ListAvailabilityZonesRequest{ - apiService: a.defaultApi, - ctx: ctx, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListAvailabilityZonesExecute(ctx context.Context, region string) (*AvailabilityZoneListResponse, error) { - r := ListAvailabilityZonesRequest{ - apiService: a.defaultApi, - ctx: ctx, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListBackupsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListBackupsRequest) LabelSelector(labelSelector string) ApiListBackupsRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListBackupsRequest) Execute() (*BackupListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BackupListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListBackups") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/backups" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListBackups: List all backups inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListBackupsRequest -*/ -func (a *APIClient) ListBackups(ctx context.Context, projectId string, region string) ApiListBackupsRequest { - return ListBackupsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, region string) (*BackupListResponse, error) { - r := ListBackupsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListImagesRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - all *bool - labelSelector *string -} - -// List all Images. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListImagesRequest) All(all bool) ApiListImagesRequest { - r.all = &all - return r -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListImagesRequest) LabelSelector(labelSelector string) ApiListImagesRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListImagesRequest) Execute() (*ImageListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ImageListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListImages") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.all != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "") - } - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListImages: List all Images inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListImagesRequest -*/ -func (a *APIClient) ListImages(ctx context.Context, projectId string, region string) ApiListImagesRequest { - return ListImagesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListImagesExecute(ctx context.Context, projectId string, region string) (*ImageListResponse, error) { - r := ListImagesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListKeyPairsRequest struct { - ctx context.Context - apiService *DefaultApiService - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListKeyPairsRequest) LabelSelector(labelSelector string) ApiListKeyPairsRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListKeyPairsRequest) Execute() (*KeyPairListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *KeyPairListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListKeyPairs") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/keypairs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListKeyPairs: List all SSH keypairs for the requesting user. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListKeyPairsRequest -*/ -func (a *APIClient) ListKeyPairs(ctx context.Context) ApiListKeyPairsRequest { - return ListKeyPairsRequest{ - apiService: a.defaultApi, - ctx: ctx, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListKeyPairsExecute(ctx context.Context) (*KeyPairListResponse, error) { - r := ListKeyPairsRequest{ - apiService: a.defaultApi, - ctx: ctx, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListMachineTypesRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - filter *string -} - -// Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListMachineTypesRequest) Filter(filter string) ApiListMachineTypesRequest { - r.filter = &filter - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListMachineTypesRequest) Execute() (*MachineTypeListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MachineTypeListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMachineTypes") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/machine-types" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListMachineTypes: List all machine types available for a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListMachineTypesRequest -*/ -func (a *APIClient) ListMachineTypes(ctx context.Context, projectId string, region string) ApiListMachineTypesRequest { - return ListMachineTypesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListMachineTypesExecute(ctx context.Context, projectId string, region string) (*MachineTypeListResponse, error) { - r := ListMachineTypesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListNetworkAreaProjectsRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworkAreaProjectsRequest) Execute() (*ProjectListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ProjectListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListNetworkAreaProjects") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/projects" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(ParameterValueToString(r.areaId, "areaId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListNetworkAreaProjects: List all projects using a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @return ApiListNetworkAreaProjectsRequest -*/ -func (a *APIClient) ListNetworkAreaProjects(ctx context.Context, organizationId string, areaId string) ApiListNetworkAreaProjectsRequest { - return ListNetworkAreaProjectsRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListNetworkAreaProjectsExecute(ctx context.Context, organizationId string, areaId string) (*ProjectListResponse, error) { - r := ListNetworkAreaProjectsRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListNetworkAreaRangesRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworkAreaRangesRequest) Execute() (*NetworkRangeListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkRangeListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListNetworkAreaRanges") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/network-ranges" - 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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListNetworkAreaRanges: List all network ranges in a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListNetworkAreaRangesRequest -*/ -func (a *APIClient) ListNetworkAreaRanges(ctx context.Context, organizationId string, areaId string, region string) ApiListNetworkAreaRangesRequest { - return ListNetworkAreaRangesRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListNetworkAreaRangesExecute(ctx context.Context, organizationId string, areaId string, region string) (*NetworkRangeListResponse, error) { - r := ListNetworkAreaRangesRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListNetworkAreaRegionsRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworkAreaRegionsRequest) Execute() (*RegionalAreaListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegionalAreaListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListNetworkAreaRegions") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(ParameterValueToString(r.areaId, "areaId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListNetworkAreaRegions: List all configured regions in a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @return ApiListNetworkAreaRegionsRequest -*/ -func (a *APIClient) ListNetworkAreaRegions(ctx context.Context, organizationId string, areaId string) ApiListNetworkAreaRegionsRequest { - return ListNetworkAreaRegionsRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListNetworkAreaRegionsExecute(ctx context.Context, organizationId string, areaId string) (*RegionalAreaListResponse, error) { - r := ListNetworkAreaRegionsRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListNetworkAreaRoutesRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworkAreaRoutesRequest) LabelSelector(labelSelector string) ApiListNetworkAreaRoutesRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworkAreaRoutesRequest) Execute() (*RouteListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RouteListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListNetworkAreaRoutes") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/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) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListNetworkAreaRoutes: List all network routes in a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListNetworkAreaRoutesRequest -*/ -func (a *APIClient) ListNetworkAreaRoutes(ctx context.Context, organizationId string, areaId string, region string) ApiListNetworkAreaRoutesRequest { - return ListNetworkAreaRoutesRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListNetworkAreaRoutesExecute(ctx context.Context, organizationId string, areaId string, region string) (*RouteListResponse, error) { - r := ListNetworkAreaRoutesRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListNetworkAreasRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworkAreasRequest) LabelSelector(labelSelector string) ApiListNetworkAreasRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworkAreasRequest) Execute() (*NetworkAreaListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkAreaListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListNetworkAreas") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListNetworkAreas: List all network areas in an organization. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @return ApiListNetworkAreasRequest -*/ -func (a *APIClient) ListNetworkAreas(ctx context.Context, organizationId string) ApiListNetworkAreasRequest { - return ListNetworkAreasRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListNetworkAreasExecute(ctx context.Context, organizationId string) (*NetworkAreaListResponse, error) { - r := ListNetworkAreasRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListNetworksRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworksRequest) LabelSelector(labelSelector string) ApiListNetworksRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNetworksRequest) Execute() (*NetworkListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListNetworks") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListNetworks: List all networks inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) ListNetworks(ctx context.Context, projectId string, region string) ApiListNetworksRequest { - return ListNetworksRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListNetworksExecute(ctx context.Context, projectId string, region string) (*NetworkListResponse, error) { - r := ListNetworksRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListNicsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - networkId string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNicsRequest) LabelSelector(labelSelector string) ApiListNicsRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListNicsRequest) Execute() (*NICListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NICListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListNics") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/networks/{networkId}/nics" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return localVarReturnValue, fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return localVarReturnValue, fmt.Errorf("networkId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListNics: List all network interfaces inside a network. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListNicsRequest -*/ -func (a *APIClient) ListNics(ctx context.Context, projectId string, region string, networkId string) ApiListNicsRequest { - return ListNicsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListNicsExecute(ctx context.Context, projectId string, region string, networkId string) (*NICListResponse, error) { - r := ListNicsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListProjectNICsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListProjectNICsRequest) LabelSelector(labelSelector string) ApiListProjectNICsRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListProjectNICsRequest) Execute() (*NICListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NICListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListProjectNICs") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/nics" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListProjectNICs: List all network interfaces inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListProjectNICsRequest -*/ -func (a *APIClient) ListProjectNICs(ctx context.Context, projectId string, region string) ApiListProjectNICsRequest { - return ListProjectNICsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListProjectNICsExecute(ctx context.Context, projectId string, region string) (*NICListResponse, error) { - r := ListProjectNICsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListPublicIPRangesRequest struct { - ctx context.Context - apiService *DefaultApiService -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListPublicIPRangesRequest) Execute() (*PublicNetworkListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PublicNetworkListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListPublicIPRanges") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/networks/public-ip-ranges" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListPublicIPRanges: List all public IP ranges. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListPublicIPRangesRequest -*/ -func (a *APIClient) ListPublicIPRanges(ctx context.Context) ApiListPublicIPRangesRequest { - return ListPublicIPRangesRequest{ - apiService: a.defaultApi, - ctx: ctx, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListPublicIPRangesExecute(ctx context.Context) (*PublicNetworkListResponse, error) { - r := ListPublicIPRangesRequest{ - apiService: a.defaultApi, - ctx: ctx, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListPublicIPsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListPublicIPsRequest) LabelSelector(labelSelector string) ApiListPublicIPsRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListPublicIPsRequest) Execute() (*PublicIpListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PublicIpListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListPublicIPs") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/public-ips" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListPublicIPs: List all public IPs inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListPublicIPsRequest -*/ -func (a *APIClient) ListPublicIPs(ctx context.Context, projectId string, region string) ApiListPublicIPsRequest { - return ListPublicIPsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListPublicIPsExecute(ctx context.Context, projectId string, region string) (*PublicIpListResponse, error) { - r := ListPublicIPsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListQuotasRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListQuotasRequest) Execute() (*QuotaListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *QuotaListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListQuotas") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/quotas" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListQuotas: List project quotas. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListQuotasRequest -*/ -func (a *APIClient) ListQuotas(ctx context.Context, projectId string, region string) ApiListQuotasRequest { - return ListQuotasRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListQuotasExecute(ctx context.Context, projectId string, region string) (*QuotaListResponse, error) { - r := ListQuotasRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRoutesOfRoutingTableRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routingTableId string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListRoutesOfRoutingTableRequest) LabelSelector(labelSelector string) ApiListRoutesOfRoutingTableRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListRoutesOfRoutingTableRequest) Execute() (*RouteListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RouteListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRoutesOfRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListRoutesOfRoutingTable: List all routes in a routing table. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) ListRoutesOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiListRoutesOfRoutingTableRequest { - return ListRoutesOfRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListRoutesOfRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) (*RouteListResponse, error) { - r := ListRoutesOfRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRoutingTablesOfAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListRoutingTablesOfAreaRequest) LabelSelector(labelSelector string) ApiListRoutingTablesOfAreaRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListRoutingTablesOfAreaRequest) Execute() (*RoutingTableListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RoutingTableListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRoutingTablesOfArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListRoutingTablesOfArea: List all routing tables in a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) ListRoutingTablesOfArea(ctx context.Context, organizationId string, areaId string, region string) ApiListRoutingTablesOfAreaRequest { - return ListRoutingTablesOfAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListRoutingTablesOfAreaExecute(ctx context.Context, organizationId string, areaId string, region string) (*RoutingTableListResponse, error) { - r := ListRoutingTablesOfAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListSecurityGroupRulesRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - securityGroupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListSecurityGroupRulesRequest) Execute() (*SecurityGroupRuleListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SecurityGroupRuleListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListSecurityGroupRules") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}/rules" - 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, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListSecurityGroupRules: List all rules for a security group. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiListSecurityGroupRulesRequest -*/ -func (a *APIClient) ListSecurityGroupRules(ctx context.Context, projectId string, region string, securityGroupId string) ApiListSecurityGroupRulesRequest { - return ListSecurityGroupRulesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListSecurityGroupRulesExecute(ctx context.Context, projectId string, region string, securityGroupId string) (*SecurityGroupRuleListResponse, error) { - r := ListSecurityGroupRulesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListSecurityGroupsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListSecurityGroupsRequest) LabelSelector(labelSelector string) ApiListSecurityGroupsRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListSecurityGroupsRequest) Execute() (*SecurityGroupListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SecurityGroupListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListSecurityGroups") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListSecurityGroups: List all security groups inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListSecurityGroupsRequest -*/ -func (a *APIClient) ListSecurityGroups(ctx context.Context, projectId string, region string) ApiListSecurityGroupsRequest { - return ListSecurityGroupsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListSecurityGroupsExecute(ctx context.Context, projectId string, region string) (*SecurityGroupListResponse, error) { - r := ListSecurityGroupsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListServerNICsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListServerNICsRequest) Execute() (*NICListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NICListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListServerNICs") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/nics" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListServerNICs: Get all network interfaces. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiListServerNICsRequest -*/ -func (a *APIClient) ListServerNICs(ctx context.Context, projectId string, region string, serverId string) ApiListServerNICsRequest { - return ListServerNICsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListServerNICsExecute(ctx context.Context, projectId string, region string, serverId string) (*NICListResponse, error) { - r := ListServerNICsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListServerServiceAccountsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListServerServiceAccountsRequest) Execute() (*ServiceAccountMailListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ServiceAccountMailListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListServerServiceAccounts") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service-accounts" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListServerServiceAccounts: List the service account of the Server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiListServerServiceAccountsRequest -*/ -func (a *APIClient) ListServerServiceAccounts(ctx context.Context, projectId string, region string, serverId string) ApiListServerServiceAccountsRequest { - return ListServerServiceAccountsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListServerServiceAccountsExecute(ctx context.Context, projectId string, region string, serverId string) (*ServiceAccountMailListResponse, error) { - r := ListServerServiceAccountsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListServersRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - details *bool - labelSelector *string -} - -// Show detailed information about server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListServersRequest) Details(details bool) ApiListServersRequest { - r.details = &details - return r -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListServersRequest) LabelSelector(labelSelector string) ApiListServersRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListServersRequest) Execute() (*ServerListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ServerListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListServers") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.details != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "details", r.details, "") - } - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListServers: List all servers inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListServersRequest -*/ -func (a *APIClient) ListServers(ctx context.Context, projectId string, region string) ApiListServersRequest { - return ListServersRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListServersExecute(ctx context.Context, projectId string, region string) (*ServerListResponse, error) { - r := ListServersRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListSnapshotsInProjectRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListSnapshotsInProjectRequest) LabelSelector(labelSelector string) ApiListSnapshotsInProjectRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListSnapshotsInProjectRequest) Execute() (*SnapshotListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SnapshotListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListSnapshotsInProject") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/snapshots" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListSnapshotsInProject: List all snapshots inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListSnapshotsInProjectRequest -*/ -func (a *APIClient) ListSnapshotsInProject(ctx context.Context, projectId string, region string) ApiListSnapshotsInProjectRequest { - return ListSnapshotsInProjectRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListSnapshotsInProjectExecute(ctx context.Context, projectId string, region string) (*SnapshotListResponse, error) { - r := ListSnapshotsInProjectRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListVolumePerformanceClassesRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListVolumePerformanceClassesRequest) LabelSelector(labelSelector string) ApiListVolumePerformanceClassesRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListVolumePerformanceClassesRequest) Execute() (*VolumePerformanceClassListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VolumePerformanceClassListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListVolumePerformanceClasses") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volume-performance-classes" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListVolumePerformanceClasses: List all volume performance classes available for a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListVolumePerformanceClassesRequest -*/ -func (a *APIClient) ListVolumePerformanceClasses(ctx context.Context, projectId string, region string) ApiListVolumePerformanceClassesRequest { - return ListVolumePerformanceClassesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListVolumePerformanceClassesExecute(ctx context.Context, projectId string, region string) (*VolumePerformanceClassListResponse, error) { - r := ListVolumePerformanceClassesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListVolumesRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - labelSelector *string -} - -// Filter resources by labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListVolumesRequest) LabelSelector(labelSelector string) ApiListVolumesRequest { - r.labelSelector = &labelSelector - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListVolumesRequest) Execute() (*VolumeListResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VolumeListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListVolumes") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volumes" - 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, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.labelSelector != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ListVolumes: List all volumes inside a project. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListVolumesRequest -*/ -func (a *APIClient) ListVolumes(ctx context.Context, projectId string, region string) ApiListVolumesRequest { - return ListVolumesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListVolumesExecute(ctx context.Context, projectId string, region string) (*VolumeListResponse, error) { - r := ListVolumesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - networkId string - partialUpdateNetworkPayload *PartialUpdateNetworkPayload -} - -// Request an update of a network. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PartialUpdateNetworkRequest) PartialUpdateNetworkPayload(partialUpdateNetworkPayload PartialUpdateNetworkPayload) ApiPartialUpdateNetworkRequest { - r.partialUpdateNetworkPayload = &partialUpdateNetworkPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PartialUpdateNetworkRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PartialUpdateNetwork") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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 fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return fmt.Errorf("networkId must have less than 36 elements") - } - if r.partialUpdateNetworkPayload == nil { - return fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -PartialUpdateNetwork: Update network settings. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) PartialUpdateNetwork(ctx context.Context, projectId string, region string, networkId string) ApiPartialUpdateNetworkRequest { - return PartialUpdateNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) PartialUpdateNetworkExecute(ctx context.Context, projectId string, region string, networkId string) error { - r := PartialUpdateNetworkRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - partialUpdateNetworkAreaPayload *PartialUpdateNetworkAreaPayload -} - -// Request to update an Area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PartialUpdateNetworkAreaRequest) PartialUpdateNetworkAreaPayload(partialUpdateNetworkAreaPayload PartialUpdateNetworkAreaPayload) ApiPartialUpdateNetworkAreaRequest { - r.partialUpdateNetworkAreaPayload = &partialUpdateNetworkAreaPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PartialUpdateNetworkAreaRequest) Execute() (*NetworkArea, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NetworkArea - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PartialUpdateNetworkArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"areaId"+"}", url.PathEscape(ParameterValueToString(r.areaId, "areaId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.organizationId) < 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if r.partialUpdateNetworkAreaPayload == nil { - return localVarReturnValue, fmt.Errorf("partialUpdateNetworkAreaPayload 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.partialUpdateNetworkAreaPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -PartialUpdateNetworkArea: Update network area settings. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @return ApiPartialUpdateNetworkAreaRequest -*/ -func (a *APIClient) PartialUpdateNetworkArea(ctx context.Context, organizationId string, areaId string) ApiPartialUpdateNetworkAreaRequest { - return PartialUpdateNetworkAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) PartialUpdateNetworkAreaExecute(ctx context.Context, organizationId string, areaId string) (*NetworkArea, error) { - r := PartialUpdateNetworkAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RebootServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - action *string -} - -// Defines if it is a soft or a hard reboot. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RebootServerRequest) Action(action string) ApiRebootServerRequest { - r.action = &action - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RebootServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RebootServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/reboot" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - - if r.action != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "action", r.action, "") - } - // 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -RebootServer: Reboot the server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiRebootServerRequest -*/ -func (a *APIClient) RebootServer(ctx context.Context, projectId string, region string, serverId string) ApiRebootServerRequest { - return RebootServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RebootServerExecute(ctx context.Context, projectId string, region string, serverId string) error { - r := RebootServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RemoveNetworkFromServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - networkId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RemoveNetworkFromServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveNetworkFromServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -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 fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -RemoveNetworkFromServer: Detach and delete all network interfaces associated with the specified network. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param networkId The identifier (ID) of a STACKIT Network. - @return ApiRemoveNetworkFromServerRequest -*/ -func (a *APIClient) RemoveNetworkFromServer(ctx context.Context, projectId string, region string, serverId string, networkId string) ApiRemoveNetworkFromServerRequest { - return RemoveNetworkFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - networkId: networkId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RemoveNetworkFromServerExecute(ctx context.Context, projectId string, region string, serverId string, networkId string) error { - r := RemoveNetworkFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - networkId: networkId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RemoveNicFromServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - nicId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RemoveNicFromServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveNicFromServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/nics/{nicId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", url.PathEscape(ParameterValueToString(r.nicId, "nicId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.nicId) < 36 { - return fmt.Errorf("nicId must have at least 36 elements") - } - if strlen(r.nicId) > 36 { - return fmt.Errorf("nicId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -RemoveNicFromServer: Detach a network interface. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param nicId The identifier (ID) of a network interface. - @return ApiRemoveNicFromServerRequest -*/ -func (a *APIClient) RemoveNicFromServer(ctx context.Context, projectId string, region string, serverId string, nicId string) ApiRemoveNicFromServerRequest { - return RemoveNicFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - nicId: nicId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RemoveNicFromServerExecute(ctx context.Context, projectId string, region string, serverId string, nicId string) error { - r := RemoveNicFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - nicId: nicId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RemovePublicIpFromServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - publicIpId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RemovePublicIpFromServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemovePublicIpFromServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/public-ips/{publicIpId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"publicIpId"+"}", url.PathEscape(ParameterValueToString(r.publicIpId, "publicIpId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.publicIpId) < 36 { - return fmt.Errorf("publicIpId must have at least 36 elements") - } - if strlen(r.publicIpId) > 36 { - return fmt.Errorf("publicIpId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -RemovePublicIpFromServer: Dissociate a public IP from a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param publicIpId The identifier (ID) of a Public IP. - @return ApiRemovePublicIpFromServerRequest -*/ -func (a *APIClient) RemovePublicIpFromServer(ctx context.Context, projectId string, region string, serverId string, publicIpId string) ApiRemovePublicIpFromServerRequest { - return RemovePublicIpFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - publicIpId: publicIpId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RemovePublicIpFromServerExecute(ctx context.Context, projectId string, region string, serverId string, publicIpId string) error { - r := RemovePublicIpFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - publicIpId: publicIpId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RemoveSecurityGroupFromServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - securityGroupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RemoveSecurityGroupFromServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveSecurityGroupFromServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/security-groups/{securityGroupId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return fmt.Errorf("securityGroupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -RemoveSecurityGroupFromServer: Remove a server from a security group. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiRemoveSecurityGroupFromServerRequest -*/ -func (a *APIClient) RemoveSecurityGroupFromServer(ctx context.Context, projectId string, region string, serverId string, securityGroupId string) ApiRemoveSecurityGroupFromServerRequest { - return RemoveSecurityGroupFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - securityGroupId: securityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RemoveSecurityGroupFromServerExecute(ctx context.Context, projectId string, region string, serverId string, securityGroupId string) error { - r := RemoveSecurityGroupFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - securityGroupId: securityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RemoveServiceAccountFromServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - serviceAccountMail string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RemoveServiceAccountFromServerRequest) Execute() (*ServiceAccountMailListResponse, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ServiceAccountMailListResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveServiceAccountFromServer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service-accounts/{serviceAccountMail}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountMail"+"}", url.PathEscape(ParameterValueToString(r.serviceAccountMail, "serviceAccountMail")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.serviceAccountMail) > 255 { - return localVarReturnValue, fmt.Errorf("serviceAccountMail must have less than 255 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -RemoveServiceAccountFromServer: Detach a service account from a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param serviceAccountMail The e-mail address of a service account. - @return ApiRemoveServiceAccountFromServerRequest -*/ -func (a *APIClient) RemoveServiceAccountFromServer(ctx context.Context, projectId string, region string, serverId string, serviceAccountMail string) ApiRemoveServiceAccountFromServerRequest { - return RemoveServiceAccountFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - serviceAccountMail: serviceAccountMail, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RemoveServiceAccountFromServerExecute(ctx context.Context, projectId string, region string, serverId string, serviceAccountMail string) (*ServiceAccountMailListResponse, error) { - r := RemoveServiceAccountFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - serviceAccountMail: serviceAccountMail, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RemoveVolumeFromServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - volumeId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RemoveVolumeFromServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveVolumeFromServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments/{volumeId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return fmt.Errorf("volumeId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -RemoveVolumeFromServer: Detach a volume from a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return ApiRemoveVolumeFromServerRequest -*/ -func (a *APIClient) RemoveVolumeFromServer(ctx context.Context, projectId string, region string, serverId string, volumeId string) ApiRemoveVolumeFromServerRequest { - return RemoveVolumeFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - volumeId: volumeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RemoveVolumeFromServerExecute(ctx context.Context, projectId string, region string, serverId string, volumeId string) error { - r := RemoveVolumeFromServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - volumeId: volumeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RescueServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - rescueServerPayload *RescueServerPayload -} - -// Request a server rescue. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RescueServerRequest) RescueServerPayload(rescueServerPayload RescueServerPayload) ApiRescueServerRequest { - r.rescueServerPayload = &rescueServerPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RescueServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RescueServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/rescue" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if r.rescueServerPayload == nil { - return fmt.Errorf("rescueServerPayload 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.rescueServerPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -RescueServer: Rescue an existing server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiRescueServerRequest -*/ -func (a *APIClient) RescueServer(ctx context.Context, projectId string, region string, serverId string) ApiRescueServerRequest { - return RescueServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RescueServerExecute(ctx context.Context, projectId string, region string, serverId string) error { - r := RescueServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - resizeServerPayload *ResizeServerPayload -} - -// Request a resize of a server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ResizeServerRequest) ResizeServerPayload(resizeServerPayload ResizeServerPayload) ApiResizeServerRequest { - r.resizeServerPayload = &resizeServerPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ResizeServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ResizeServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/resize" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId must have less than 36 elements") - } - if r.resizeServerPayload == nil { - return fmt.Errorf("resizeServerPayload 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.resizeServerPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ResizeServer: Resize a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiResizeServerRequest -*/ -func (a *APIClient) ResizeServer(ctx context.Context, projectId string, region string, serverId string) ApiResizeServerRequest { - return ResizeServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ResizeServerExecute(ctx context.Context, projectId string, region string, serverId string) error { - r := ResizeServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeVolumeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - volumeId string - resizeVolumePayload *ResizeVolumePayload -} - -// Request a volume resize. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ResizeVolumeRequest) ResizeVolumePayload(resizeVolumePayload ResizeVolumePayload) ApiResizeVolumeRequest { - r.resizeVolumePayload = &resizeVolumePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ResizeVolumeRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ResizeVolume") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volumes/{volumeId}/resize" - 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, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return fmt.Errorf("volumeId must have less than 36 elements") - } - - // 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.resizeVolumePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -ResizeVolume: Update the size of a volume. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return ApiResizeVolumeRequest -*/ -func (a *APIClient) ResizeVolume(ctx context.Context, projectId string, region string, volumeId string) ApiResizeVolumeRequest { - return ResizeVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumeId: volumeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ResizeVolumeExecute(ctx context.Context, projectId string, region string, volumeId string) error { - r := ResizeVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumeId: volumeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreBackupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - backupId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r RestoreBackupRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RestoreBackup") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/backups/{backupId}/restore" - 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, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(r.backupId, "backupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.backupId) < 36 { - return fmt.Errorf("backupId must have at least 36 elements") - } - if strlen(r.backupId) > 36 { - return fmt.Errorf("backupId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 -} - -/* -RestoreBackup: Restore Backup to the referenced source Volume. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return ApiRestoreBackupRequest -*/ -func (a *APIClient) RestoreBackup(ctx context.Context, projectId string, region string, backupId string) ApiRestoreBackupRequest { - return RestoreBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - backupId: backupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) RestoreBackupExecute(ctx context.Context, projectId string, region string, backupId string) error { - r := RestoreBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - backupId: backupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SetImageShareRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string - setImageSharePayload *SetImageSharePayload -} - -// Settings for an Image Share. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r SetImageShareRequest) SetImageSharePayload(setImageSharePayload SetImageSharePayload) ApiSetImageShareRequest { - r.setImageSharePayload = &setImageSharePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r SetImageShareRequest) Execute() (*ImageShare, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ImageShare - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetImageShare") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}/share" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return localVarReturnValue, fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return localVarReturnValue, fmt.Errorf("imageId must have less than 36 elements") - } - if r.setImageSharePayload == nil { - return localVarReturnValue, fmt.Errorf("setImageSharePayload 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.setImageSharePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -SetImageShare: Set image share. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiSetImageShareRequest -*/ -func (a *APIClient) SetImageShare(ctx context.Context, projectId string, region string, imageId string) ApiSetImageShareRequest { - return SetImageShareRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) SetImageShareExecute(ctx context.Context, projectId string, region string, imageId string) (*ImageShare, error) { - r := SetImageShareRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StartServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r StartServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.StartServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/start" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -StartServer: Boot up a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiStartServerRequest -*/ -func (a *APIClient) StartServer(ctx context.Context, projectId string, region string, serverId string) ApiStartServerRequest { - return StartServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) StartServerExecute(ctx context.Context, projectId string, region string, serverId string) error { - r := StartServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StopServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r StopServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.StopServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/stop" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -StopServer: Stop an existing server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiStopServerRequest -*/ -func (a *APIClient) StopServer(ctx context.Context, projectId string, region string, serverId string) ApiStopServerRequest { - return StopServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) StopServerExecute(ctx context.Context, projectId string, region string, serverId string) error { - r := StopServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnrescueServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UnrescueServerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UnrescueServer") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/unrescue" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return fmt.Errorf("serverId 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UnrescueServer: Unrescue an existing server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiUnrescueServerRequest -*/ -func (a *APIClient) UnrescueServer(ctx context.Context, projectId string, region string, serverId string) ApiUnrescueServerRequest { - return UnrescueServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UnrescueServerExecute(ctx context.Context, projectId string, region string, serverId string) error { - r := UnrescueServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - volumeId string - updateAttachedVolumePayload *UpdateAttachedVolumePayload -} - -// Request a volume attachment update. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateAttachedVolumeRequest) UpdateAttachedVolumePayload(updateAttachedVolumePayload UpdateAttachedVolumePayload) ApiUpdateAttachedVolumeRequest { - r.updateAttachedVolumePayload = &updateAttachedVolumePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateAttachedVolumeRequest) Execute() (*VolumeAttachment, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VolumeAttachment - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateAttachedVolume") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments/{volumeId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have less than 36 elements") - } - if r.updateAttachedVolumePayload == nil { - return localVarReturnValue, fmt.Errorf("updateAttachedVolumePayload 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.updateAttachedVolumePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateAttachedVolume: Update Volume Attachment Parameters. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @param volumeId The identifier (ID) of a STACKIT Volume. - @return ApiUpdateAttachedVolumeRequest -*/ -func (a *APIClient) UpdateAttachedVolume(ctx context.Context, projectId string, region string, serverId string, volumeId string) ApiUpdateAttachedVolumeRequest { - return UpdateAttachedVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - volumeId: volumeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateAttachedVolumeExecute(ctx context.Context, projectId string, region string, serverId string, volumeId string) (*VolumeAttachment, error) { - r := UpdateAttachedVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - volumeId: volumeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - backupId string - updateBackupPayload *UpdateBackupPayload -} - -// Request an update of a backup. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateBackupRequest) UpdateBackupPayload(updateBackupPayload UpdateBackupPayload) ApiUpdateBackupRequest { - r.updateBackupPayload = &updateBackupPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateBackupRequest) Execute() (*Backup, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Backup - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateBackup") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/backups/{backupId}" - 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, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(r.backupId, "backupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.backupId) < 36 { - return localVarReturnValue, fmt.Errorf("backupId must have at least 36 elements") - } - if strlen(r.backupId) > 36 { - return localVarReturnValue, fmt.Errorf("backupId must have less than 36 elements") - } - if r.updateBackupPayload == nil { - return localVarReturnValue, fmt.Errorf("updateBackupPayload 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.updateBackupPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateBackup: Update information of a backup. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 backupId The identifier (ID) of a STACKIT Backup. - @return ApiUpdateBackupRequest -*/ -func (a *APIClient) UpdateBackup(ctx context.Context, projectId string, region string, backupId string) ApiUpdateBackupRequest { - return UpdateBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - backupId: backupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateBackupExecute(ctx context.Context, projectId string, region string, backupId string) (*Backup, error) { - r := UpdateBackupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - backupId: backupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string - updateImagePayload *UpdateImagePayload -} - -// Request an update of an Image. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateImageRequest) UpdateImagePayload(updateImagePayload UpdateImagePayload) ApiUpdateImageRequest { - r.updateImagePayload = &updateImagePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateImageRequest) Execute() (*Image, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Image - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateImage") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return localVarReturnValue, fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return localVarReturnValue, fmt.Errorf("imageId must have less than 36 elements") - } - if r.updateImagePayload == nil { - return localVarReturnValue, fmt.Errorf("updateImagePayload 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.updateImagePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateImage: Update Image Parameters. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiUpdateImageRequest -*/ -func (a *APIClient) UpdateImage(ctx context.Context, projectId string, region string, imageId string) ApiUpdateImageRequest { - return UpdateImageRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateImageExecute(ctx context.Context, projectId string, region string, imageId string) (*Image, error) { - r := UpdateImageRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageShareRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - imageId string - updateImageSharePayload *UpdateImageSharePayload -} - -// Update an Image Share. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateImageShareRequest) UpdateImageSharePayload(updateImageSharePayload UpdateImageSharePayload) ApiUpdateImageShareRequest { - r.updateImageSharePayload = &updateImageSharePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateImageShareRequest) Execute() (*ImageShare, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ImageShare - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateImageShare") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/images/{imageId}/share" - 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, "{"+"imageId"+"}", url.PathEscape(ParameterValueToString(r.imageId, "imageId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.imageId) < 36 { - return localVarReturnValue, fmt.Errorf("imageId must have at least 36 elements") - } - if strlen(r.imageId) > 36 { - return localVarReturnValue, fmt.Errorf("imageId must have less than 36 elements") - } - if r.updateImageSharePayload == nil { - return localVarReturnValue, fmt.Errorf("updateImageSharePayload 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.updateImageSharePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateImageShare: Update image share. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 imageId The identifier (ID) of a STACKIT Image. - @return ApiUpdateImageShareRequest -*/ -func (a *APIClient) UpdateImageShare(ctx context.Context, projectId string, region string, imageId string) ApiUpdateImageShareRequest { - return UpdateImageShareRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateImageShareExecute(ctx context.Context, projectId string, region string, imageId string) (*ImageShare, error) { - r := UpdateImageShareRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - imageId: imageId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateKeyPairRequest struct { - ctx context.Context - apiService *DefaultApiService - keypairName string - updateKeyPairPayload *UpdateKeyPairPayload -} - -// Request an update of an SSH keypair. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateKeyPairRequest) UpdateKeyPairPayload(updateKeyPairPayload UpdateKeyPairPayload) ApiUpdateKeyPairRequest { - r.updateKeyPairPayload = &updateKeyPairPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateKeyPairRequest) Execute() (*Keypair, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Keypair - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateKeyPair") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/keypairs/{keypairName}" - localVarPath = strings.Replace(localVarPath, "{"+"keypairName"+"}", url.PathEscape(ParameterValueToString(r.keypairName, "keypairName")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.keypairName) > 127 { - return localVarReturnValue, fmt.Errorf("keypairName must have less than 127 elements") - } - if r.updateKeyPairPayload == nil { - return localVarReturnValue, fmt.Errorf("updateKeyPairPayload 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.updateKeyPairPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateKeyPair: Update information of an SSH keypair. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param keypairName The name of an SSH keypair. - @return ApiUpdateKeyPairRequest -*/ -func (a *APIClient) UpdateKeyPair(ctx context.Context, keypairName string) ApiUpdateKeyPairRequest { - return UpdateKeyPairRequest{ - apiService: a.defaultApi, - ctx: ctx, - keypairName: keypairName, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateKeyPairExecute(ctx context.Context, keypairName string) (*Keypair, error) { - r := UpdateKeyPairRequest{ - apiService: a.defaultApi, - ctx: ctx, - keypairName: keypairName, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRegionRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - updateNetworkAreaRegionPayload *UpdateNetworkAreaRegionPayload -} - -// Request an update of a regional network area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateNetworkAreaRegionRequest) UpdateNetworkAreaRegionPayload(updateNetworkAreaRegionPayload UpdateNetworkAreaRegionPayload) ApiUpdateNetworkAreaRegionRequest { - r.updateNetworkAreaRegionPayload = &updateNetworkAreaRegionPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateNetworkAreaRegionRequest) Execute() (*RegionalArea, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegionalArea - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateNetworkAreaRegion") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}" - 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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if r.updateNetworkAreaRegionPayload == nil { - return localVarReturnValue, fmt.Errorf("updateNetworkAreaRegionPayload 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.updateNetworkAreaRegionPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateNetworkAreaRegion: Update a region for a network area. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiUpdateNetworkAreaRegionRequest -*/ -func (a *APIClient) UpdateNetworkAreaRegion(ctx context.Context, organizationId string, areaId string, region string) ApiUpdateNetworkAreaRegionRequest { - return UpdateNetworkAreaRegionRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) (*RegionalArea, error) { - r := UpdateNetworkAreaRegionRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRouteRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routeId string - updateNetworkAreaRoutePayload *UpdateNetworkAreaRoutePayload -} - -// Request an update of a network route. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateNetworkAreaRouteRequest) UpdateNetworkAreaRoutePayload(updateNetworkAreaRoutePayload UpdateNetworkAreaRoutePayload) ApiUpdateNetworkAreaRouteRequest { - r.updateNetworkAreaRoutePayload = &updateNetworkAreaRoutePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateNetworkAreaRouteRequest) Execute() (*Route, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateNetworkAreaRoute") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/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, "{"+"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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return localVarReturnValue, fmt.Errorf("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return localVarReturnValue, fmt.Errorf("routeId must have less than 36 elements") - } - if r.updateNetworkAreaRoutePayload == nil { - return localVarReturnValue, fmt.Errorf("updateNetworkAreaRoutePayload 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.updateNetworkAreaRoutePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateNetworkAreaRoute: Update a network route. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 routeId The identifier (ID) of a STACKIT Route. - @return ApiUpdateNetworkAreaRouteRequest -*/ -func (a *APIClient) UpdateNetworkAreaRoute(ctx context.Context, organizationId string, areaId string, region string, routeId string) ApiUpdateNetworkAreaRouteRequest { - return UpdateNetworkAreaRouteRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routeId: routeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateNetworkAreaRouteExecute(ctx context.Context, organizationId string, areaId string, region string, routeId string) (*Route, error) { - r := UpdateNetworkAreaRouteRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routeId: routeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - networkId string - nicId string - updateNicPayload *UpdateNicPayload -} - -// Request an update of a network interface. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateNicRequest) UpdateNicPayload(updateNicPayload UpdateNicPayload) ApiUpdateNicRequest { - r.updateNicPayload = &updateNicPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateNicRequest) Execute() (*NIC, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NIC - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateNic") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/networks/{networkId}/nics/{nicId}" - 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) - localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", url.PathEscape(ParameterValueToString(r.nicId, "nicId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.networkId) < 36 { - return localVarReturnValue, fmt.Errorf("networkId must have at least 36 elements") - } - if strlen(r.networkId) > 36 { - return localVarReturnValue, fmt.Errorf("networkId must have less than 36 elements") - } - if strlen(r.nicId) < 36 { - return localVarReturnValue, fmt.Errorf("nicId must have at least 36 elements") - } - if strlen(r.nicId) > 36 { - return localVarReturnValue, fmt.Errorf("nicId must have less than 36 elements") - } - if r.updateNicPayload == nil { - return localVarReturnValue, fmt.Errorf("updateNicPayload 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.updateNicPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateNic: Update a network interface. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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. - @param nicId The identifier (ID) of a network interface. - @return ApiUpdateNicRequest -*/ -func (a *APIClient) UpdateNic(ctx context.Context, projectId string, region string, networkId string, nicId string) ApiUpdateNicRequest { - return UpdateNicRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - nicId: nicId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateNicExecute(ctx context.Context, projectId string, region string, networkId string, nicId string) (*NIC, error) { - r := UpdateNicRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - networkId: networkId, - nicId: nicId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - publicIpId string - updatePublicIPPayload *UpdatePublicIPPayload -} - -// Request an update of a public IP. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdatePublicIPRequest) UpdatePublicIPPayload(updatePublicIPPayload UpdatePublicIPPayload) ApiUpdatePublicIPRequest { - r.updatePublicIPPayload = &updatePublicIPPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdatePublicIPRequest) Execute() (*PublicIp, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PublicIp - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdatePublicIP") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/public-ips/{publicIpId}" - 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, "{"+"publicIpId"+"}", url.PathEscape(ParameterValueToString(r.publicIpId, "publicIpId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.publicIpId) < 36 { - return localVarReturnValue, fmt.Errorf("publicIpId must have at least 36 elements") - } - if strlen(r.publicIpId) > 36 { - return localVarReturnValue, fmt.Errorf("publicIpId must have less than 36 elements") - } - if r.updatePublicIPPayload == nil { - return localVarReturnValue, fmt.Errorf("updatePublicIPPayload 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.updatePublicIPPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdatePublicIP: Update a public IP. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 publicIpId The identifier (ID) of a Public IP. - @return ApiUpdatePublicIPRequest -*/ -func (a *APIClient) UpdatePublicIP(ctx context.Context, projectId string, region string, publicIpId string) ApiUpdatePublicIPRequest { - return UpdatePublicIPRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - publicIpId: publicIpId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdatePublicIPExecute(ctx context.Context, projectId string, region string, publicIpId string) (*PublicIp, error) { - r := UpdatePublicIPRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - publicIpId: publicIpId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRouteOfRoutingTableRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routingTableId string - routeId string - updateRouteOfRoutingTablePayload *UpdateRouteOfRoutingTablePayload -} - -// Request an update of a route in a routing table. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateRouteOfRoutingTableRequest) UpdateRouteOfRoutingTablePayload(updateRouteOfRoutingTablePayload UpdateRouteOfRoutingTablePayload) ApiUpdateRouteOfRoutingTableRequest { - r.updateRouteOfRoutingTablePayload = &updateRouteOfRoutingTablePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateRouteOfRoutingTableRequest) Execute() (*Route, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Route - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateRouteOfRoutingTable") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have less than 36 elements") - } - if strlen(r.routeId) < 36 { - return localVarReturnValue, fmt.Errorf("routeId must have at least 36 elements") - } - if strlen(r.routeId) > 36 { - return localVarReturnValue, fmt.Errorf("routeId must have less than 36 elements") - } - if r.updateRouteOfRoutingTablePayload == nil { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateRouteOfRoutingTable: Update a route of a routing table. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) UpdateRouteOfRoutingTable(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) ApiUpdateRouteOfRoutingTableRequest { - return UpdateRouteOfRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateRouteOfRoutingTableExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string, routeId string) (*Route, error) { - r := UpdateRouteOfRoutingTableRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - routeId: routeId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - areaId string - region string - routingTableId string - updateRoutingTableOfAreaPayload *UpdateRoutingTableOfAreaPayload -} - -// Request an update of a routing table. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateRoutingTableOfAreaRequest) UpdateRoutingTableOfAreaPayload(updateRoutingTableOfAreaPayload UpdateRoutingTableOfAreaPayload) ApiUpdateRoutingTableOfAreaRequest { - r.updateRoutingTableOfAreaPayload = &updateRoutingTableOfAreaPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateRoutingTableOfAreaRequest) Execute() (*RoutingTable, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RoutingTable - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateRoutingTableOfArea") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/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, fmt.Errorf("organizationId must have at least 36 elements") - } - if strlen(r.organizationId) > 36 { - return localVarReturnValue, fmt.Errorf("organizationId must have less than 36 elements") - } - if strlen(r.areaId) < 36 { - return localVarReturnValue, fmt.Errorf("areaId must have at least 36 elements") - } - if strlen(r.areaId) > 36 { - return localVarReturnValue, fmt.Errorf("areaId must have less than 36 elements") - } - if strlen(r.routingTableId) < 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have at least 36 elements") - } - if strlen(r.routingTableId) > 36 { - return localVarReturnValue, fmt.Errorf("routingTableId must have less than 36 elements") - } - if r.updateRoutingTableOfAreaPayload == nil { - return localVarReturnValue, fmt.Errorf("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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateRoutingTableOfArea: Update a routing table. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 *APIClient) UpdateRoutingTableOfArea(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) ApiUpdateRoutingTableOfAreaRequest { - return UpdateRoutingTableOfAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateRoutingTableOfAreaExecute(ctx context.Context, organizationId string, areaId string, region string, routingTableId string) (*RoutingTable, error) { - r := UpdateRoutingTableOfAreaRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - areaId: areaId, - region: region, - routingTableId: routingTableId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - securityGroupId string - updateSecurityGroupPayload *UpdateSecurityGroupPayload -} - -// Request an update of a security group. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateSecurityGroupRequest) UpdateSecurityGroupPayload(updateSecurityGroupPayload UpdateSecurityGroupPayload) ApiUpdateSecurityGroupRequest { - r.updateSecurityGroupPayload = &updateSecurityGroupPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateSecurityGroupRequest) Execute() (*SecurityGroup, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SecurityGroup - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateSecurityGroup") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}" - 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, "{"+"securityGroupId"+"}", url.PathEscape(ParameterValueToString(r.securityGroupId, "securityGroupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.securityGroupId) < 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId must have at least 36 elements") - } - if strlen(r.securityGroupId) > 36 { - return localVarReturnValue, fmt.Errorf("securityGroupId must have less than 36 elements") - } - if r.updateSecurityGroupPayload == nil { - return localVarReturnValue, fmt.Errorf("updateSecurityGroupPayload 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.updateSecurityGroupPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateSecurityGroup: Update information of a security group. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 securityGroupId The identifier (ID) of a STACKIT Security Group. - @return ApiUpdateSecurityGroupRequest -*/ -func (a *APIClient) UpdateSecurityGroup(ctx context.Context, projectId string, region string, securityGroupId string) ApiUpdateSecurityGroupRequest { - return UpdateSecurityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateSecurityGroupExecute(ctx context.Context, projectId string, region string, securityGroupId string) (*SecurityGroup, error) { - r := UpdateSecurityGroupRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - securityGroupId: securityGroupId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - serverId string - updateServerPayload *UpdateServerPayload -} - -// Request an update of a server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateServerRequest) UpdateServerPayload(updateServerPayload UpdateServerPayload) ApiUpdateServerRequest { - r.updateServerPayload = &updateServerPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateServerRequest) Execute() (*Server, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Server - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateServer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/servers/{serverId}" - 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, "{"+"serverId"+"}", url.PathEscape(ParameterValueToString(r.serverId, "serverId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.serverId) < 36 { - return localVarReturnValue, fmt.Errorf("serverId must have at least 36 elements") - } - if strlen(r.serverId) > 36 { - return localVarReturnValue, fmt.Errorf("serverId must have less than 36 elements") - } - if r.updateServerPayload == nil { - return localVarReturnValue, fmt.Errorf("updateServerPayload 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.updateServerPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateServer: Update information of a server. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 serverId The identifier (ID) of a STACKIT Server. - @return ApiUpdateServerRequest -*/ -func (a *APIClient) UpdateServer(ctx context.Context, projectId string, region string, serverId string) ApiUpdateServerRequest { - return UpdateServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateServerExecute(ctx context.Context, projectId string, region string, serverId string) (*Server, error) { - r := UpdateServerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - serverId: serverId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - snapshotId string - updateSnapshotPayload *UpdateSnapshotPayload -} - -// Request an update of a snapshot. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateSnapshotRequest) UpdateSnapshotPayload(updateSnapshotPayload UpdateSnapshotPayload) ApiUpdateSnapshotRequest { - r.updateSnapshotPayload = &updateSnapshotPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateSnapshotRequest) Execute() (*Snapshot, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Snapshot - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateSnapshot") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/snapshots/{snapshotId}" - 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, "{"+"snapshotId"+"}", url.PathEscape(ParameterValueToString(r.snapshotId, "snapshotId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.snapshotId) < 36 { - return localVarReturnValue, fmt.Errorf("snapshotId must have at least 36 elements") - } - if strlen(r.snapshotId) > 36 { - return localVarReturnValue, fmt.Errorf("snapshotId must have less than 36 elements") - } - if r.updateSnapshotPayload == nil { - return localVarReturnValue, fmt.Errorf("updateSnapshotPayload 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.updateSnapshotPayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateSnapshot: Update information of the snapshot. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 snapshotId The identifier (ID) of a STACKIT Snapshot. - @return ApiUpdateSnapshotRequest -*/ -func (a *APIClient) UpdateSnapshot(ctx context.Context, projectId string, region string, snapshotId string) ApiUpdateSnapshotRequest { - return UpdateSnapshotRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - snapshotId: snapshotId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateSnapshotExecute(ctx context.Context, projectId string, region string, snapshotId string) (*Snapshot, error) { - r := UpdateSnapshotRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - snapshotId: snapshotId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumeRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - volumeId string - updateVolumePayload *UpdateVolumePayload -} - -// Request an update of a volume. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateVolumeRequest) UpdateVolumePayload(updateVolumePayload UpdateVolumePayload) ApiUpdateVolumeRequest { - r.updateVolumePayload = &updateVolumePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateVolumeRequest) Execute() (*Volume, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Volume - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateVolume") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/volumes/{volumeId}" - 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, "{"+"volumeId"+"}", url.PathEscape(ParameterValueToString(r.volumeId, "volumeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.volumeId) < 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have at least 36 elements") - } - if strlen(r.volumeId) > 36 { - return localVarReturnValue, fmt.Errorf("volumeId must have less than 36 elements") - } - if r.updateVolumePayload == nil { - return localVarReturnValue, fmt.Errorf("updateVolumePayload 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.updateVolumePayload - req, err := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = 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 = 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 = 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 = 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 = 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 = 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 -} - -/* -UpdateVolume: Update information of a volume. - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 volumeId The identifier (ID) of a STACKIT Volume. - @return ApiUpdateVolumeRequest -*/ -func (a *APIClient) UpdateVolume(ctx context.Context, projectId string, region string, volumeId string) ApiUpdateVolumeRequest { - return UpdateVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumeId: volumeId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateVolumeExecute(ctx context.Context, projectId string, region string, volumeId string) (*Volume, error) { - r := UpdateVolumeRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - volumeId: volumeId, - } - return r.Execute() -} diff --git a/services/iaas/client.go b/services/iaas/client.go deleted file mode 100644 index 47881419b8..0000000000 --- a/services/iaas/client.go +++ /dev/null @@ -1,635 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "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)/(?:vnd\.[^;]+\+)?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 v2 -// In most cases there should be only one, shared, APIClient. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type APIClient struct { - cfg *config.Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - defaultApi *DefaultApiService -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type service struct { - client DefaultApi -} - -// NewAPIClient creates a new API client. -// Optionally receives configuration options -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 - 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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func ParameterValueToString(obj interface{}, key string) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - 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{}, 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, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), 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) - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), 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(), collectionType) - } - return - - case reflect.Interface: - fallthrough - case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 !IsNil(postBody) { - 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, fmt.Errorf("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, fmt.Errorf("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 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 fmt.Errorf("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 fmt.Errorf("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 -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// 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) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s", 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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) -} diff --git a/services/iaas/configuration.go b/services/iaas/configuration.go deleted file mode 100644 index 0dce4d983e..0000000000 --- a/services/iaas/configuration.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -// NewConfiguration returns a new Configuration object -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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/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_routes_to_routing_table_payload.go b/services/iaas/model_add_routes_to_routing_table_payload.go deleted file mode 100644 index 82e518ebb6..0000000000 --- a/services/iaas/model_add_routes_to_routing_table_payload.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the AddRoutesToRoutingTablePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddRoutesToRoutingTablePayload{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutesToRoutingTablePayloadGetItemsAttributeType = *[]Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutesToRoutingTablePayloadGetItemsArgType = []Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutesToRoutingTablePayloadGetItemsRetType = []Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutesToRoutingTablePayloadGetItemsAttributeTypeOk(arg AddRoutesToRoutingTablePayloadGetItemsAttributeType) (ret AddRoutesToRoutingTablePayloadGetItemsRetType, 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 setAddRoutesToRoutingTablePayloadGetItemsAttributeType(arg *AddRoutesToRoutingTablePayloadGetItemsAttributeType, val AddRoutesToRoutingTablePayloadGetItemsRetType) { - *arg = &val -} - -// AddRoutesToRoutingTablePayload Object represents a request to add network routes. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutesToRoutingTablePayload struct { - // A list of routes. - // REQUIRED - Items AddRoutesToRoutingTablePayloadGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAddRoutesToRoutingTablePayload(items AddRoutesToRoutingTablePayloadGetItemsArgType) *AddRoutesToRoutingTablePayload { - this := AddRoutesToRoutingTablePayload{} - setAddRoutesToRoutingTablePayloadGetItemsAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAddRoutesToRoutingTablePayloadWithDefaults() *AddRoutesToRoutingTablePayload { - this := AddRoutesToRoutingTablePayload{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutesToRoutingTablePayload) GetItems() (ret AddRoutesToRoutingTablePayloadGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *AddRoutesToRoutingTablePayload) GetItemsOk() (ret AddRoutesToRoutingTablePayloadGetItemsRetType, ok bool) { - return getAddRoutesToRoutingTablePayloadGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutesToRoutingTablePayload) SetItems(v AddRoutesToRoutingTablePayloadGetItemsRetType) { - setAddRoutesToRoutingTablePayloadGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AddRoutesToRoutingTablePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAddRoutesToRoutingTablePayloadGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAddRoutesToRoutingTablePayload struct { - value *AddRoutesToRoutingTablePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAddRoutesToRoutingTablePayload) Get() *AddRoutesToRoutingTablePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAddRoutesToRoutingTablePayload) Set(val *AddRoutesToRoutingTablePayload) { - 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 NullableAddRoutesToRoutingTablePayload) 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 *NullableAddRoutesToRoutingTablePayload) 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 NewNullableAddRoutesToRoutingTablePayload(val *AddRoutesToRoutingTablePayload) *NullableAddRoutesToRoutingTablePayload { - return &NullableAddRoutesToRoutingTablePayload{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 NullableAddRoutesToRoutingTablePayload) 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 *NullableAddRoutesToRoutingTablePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_add_routes_to_routing_table_payload_test.go b/services/iaas/model_add_routes_to_routing_table_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_add_routes_to_routing_table_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_add_routing_table_to_area_payload.go b/services/iaas/model_add_routing_table_to_area_payload.go deleted file mode 100644 index cbeb1960dc..0000000000 --- a/services/iaas/model_add_routing_table_to_area_payload.go +++ /dev/null @@ -1,627 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the AddRoutingTableToAreaPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddRoutingTableToAreaPayload{} - -/* - 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 AddRoutingTableToAreaPayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadGetCreatedAtAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetCreatedAtAttributeType) (ret AddRoutingTableToAreaPayloadGetCreatedAtRetType, 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 setAddRoutingTableToAreaPayloadGetCreatedAtAttributeType(arg *AddRoutingTableToAreaPayloadGetCreatedAtAttributeType, val AddRoutingTableToAreaPayloadGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for default -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetDefaultAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetDefaultArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetDefaultRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadgetDefaultAttributeTypeOk(arg AddRoutingTableToAreaPayloadgetDefaultAttributeType) (ret AddRoutingTableToAreaPayloadgetDefaultRetType, 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 setAddRoutingTableToAreaPayloadgetDefaultAttributeType(arg *AddRoutingTableToAreaPayloadgetDefaultAttributeType, val AddRoutingTableToAreaPayloadgetDefaultRetType) { - *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 AddRoutingTableToAreaPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadGetDescriptionAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetDescriptionAttributeType) (ret AddRoutingTableToAreaPayloadGetDescriptionRetType, 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 setAddRoutingTableToAreaPayloadGetDescriptionAttributeType(arg *AddRoutingTableToAreaPayloadGetDescriptionAttributeType, val AddRoutingTableToAreaPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetDescriptionRetType = string - -/* - types and functions for dynamicRoutes -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetDynamicRoutesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetDynamicRoutesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeTypeOk(arg AddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType) (ret AddRoutingTableToAreaPayloadgetDynamicRoutesRetType, 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 setAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType(arg *AddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType, val AddRoutingTableToAreaPayloadgetDynamicRoutesRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadGetIdAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetIdAttributeType) (ret AddRoutingTableToAreaPayloadGetIdRetType, 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 setAddRoutingTableToAreaPayloadGetIdAttributeType(arg *AddRoutingTableToAreaPayloadGetIdAttributeType, val AddRoutingTableToAreaPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadGetLabelsAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetLabelsAttributeType) (ret AddRoutingTableToAreaPayloadGetLabelsRetType, 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 setAddRoutingTableToAreaPayloadGetLabelsAttributeType(arg *AddRoutingTableToAreaPayloadGetLabelsAttributeType, val AddRoutingTableToAreaPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadGetNameAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetNameAttributeType) (ret AddRoutingTableToAreaPayloadGetNameRetType, 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 setAddRoutingTableToAreaPayloadGetNameAttributeType(arg *AddRoutingTableToAreaPayloadGetNameAttributeType, val AddRoutingTableToAreaPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetNameRetType = string - -/* - types and functions for systemRoutes -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetSystemRoutesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetSystemRoutesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadgetSystemRoutesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadgetSystemRoutesAttributeTypeOk(arg AddRoutingTableToAreaPayloadgetSystemRoutesAttributeType) (ret AddRoutingTableToAreaPayloadgetSystemRoutesRetType, 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 setAddRoutingTableToAreaPayloadgetSystemRoutesAttributeType(arg *AddRoutingTableToAreaPayloadgetSystemRoutesAttributeType, val AddRoutingTableToAreaPayloadgetSystemRoutesRetType) { - *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 AddRoutingTableToAreaPayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddRoutingTableToAreaPayloadGetUpdatedAtAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetUpdatedAtAttributeType) (ret AddRoutingTableToAreaPayloadGetUpdatedAtRetType, 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 setAddRoutingTableToAreaPayloadGetUpdatedAtAttributeType(arg *AddRoutingTableToAreaPayloadGetUpdatedAtAttributeType, val AddRoutingTableToAreaPayloadGetUpdatedAtRetType) { - *arg = &val -} - -// AddRoutingTableToAreaPayload An object representing a routing table. Filterable Fields: `dynamicRoutes`, `systemRoutes`. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddRoutingTableToAreaPayload struct { - // Date-time when resource was created. - CreatedAt AddRoutingTableToAreaPayloadGetCreatedAtAttributeType `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 AddRoutingTableToAreaPayloadgetDefaultAttributeType `json:"default,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description AddRoutingTableToAreaPayloadGetDescriptionAttributeType `json:"description,omitempty"` - // A config setting for a routing table which allows propagation of dynamic routes to this routing table. - 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. - Labels AddRoutingTableToAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name AddRoutingTableToAreaPayloadGetNameAttributeType `json:"name" required:"true"` - // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes AddRoutingTableToAreaPayloadgetSystemRoutesAttributeType `json:"systemRoutes,omitempty"` - // Date-time when resource was last updated. - UpdatedAt AddRoutingTableToAreaPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAddRoutingTableToAreaPayload(name AddRoutingTableToAreaPayloadGetNameArgType) *AddRoutingTableToAreaPayload { - this := AddRoutingTableToAreaPayload{} - setAddRoutingTableToAreaPayloadGetNameAttributeType(&this.Name, name) - 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) GetCreatedAt() (res AddRoutingTableToAreaPayloadGetCreatedAtRetType) { - 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 *AddRoutingTableToAreaPayload) GetCreatedAtOk() (ret AddRoutingTableToAreaPayloadGetCreatedAtRetType, ok bool) { - return getAddRoutingTableToAreaPayloadGetCreatedAtAttributeTypeOk(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 *AddRoutingTableToAreaPayload) 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 *AddRoutingTableToAreaPayload) SetCreatedAt(v AddRoutingTableToAreaPayloadGetCreatedAtRetType) { - setAddRoutingTableToAreaPayloadGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetDefault returns the Default 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 *AddRoutingTableToAreaPayload) GetDefault() (res AddRoutingTableToAreaPayloadgetDefaultRetType) { - res, _ = o.GetDefaultOk() - return -} - -// GetDefaultOk returns a tuple with the Default 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 *AddRoutingTableToAreaPayload) GetDefaultOk() (ret AddRoutingTableToAreaPayloadgetDefaultRetType, ok bool) { - return getAddRoutingTableToAreaPayloadgetDefaultAttributeTypeOk(o.Default) -} - -// HasDefault 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 *AddRoutingTableToAreaPayload) HasDefault() bool { - _, ok := o.GetDefaultOk() - return ok -} - -// SetDefault gets a reference to the given bool and assigns it to the Default field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) SetDefault(v AddRoutingTableToAreaPayloadgetDefaultRetType) { - setAddRoutingTableToAreaPayloadgetDefaultAttributeType(&o.Default, 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 *AddRoutingTableToAreaPayload) GetDescription() (res AddRoutingTableToAreaPayloadGetDescriptionRetType) { - 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 *AddRoutingTableToAreaPayload) GetDescriptionOk() (ret AddRoutingTableToAreaPayloadGetDescriptionRetType, ok bool) { - return getAddRoutingTableToAreaPayloadGetDescriptionAttributeTypeOk(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 *AddRoutingTableToAreaPayload) 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 *AddRoutingTableToAreaPayload) SetDescription(v AddRoutingTableToAreaPayloadGetDescriptionRetType) { - setAddRoutingTableToAreaPayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetDynamicRoutes returns the DynamicRoutes 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 *AddRoutingTableToAreaPayload) GetDynamicRoutes() (res AddRoutingTableToAreaPayloadgetDynamicRoutesRetType) { - res, _ = o.GetDynamicRoutesOk() - return -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes 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 *AddRoutingTableToAreaPayload) GetDynamicRoutesOk() (ret AddRoutingTableToAreaPayloadgetDynamicRoutesRetType, ok bool) { - return getAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeTypeOk(o.DynamicRoutes) -} - -// HasDynamicRoutes 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 *AddRoutingTableToAreaPayload) HasDynamicRoutes() bool { - _, ok := o.GetDynamicRoutesOk() - return ok -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) SetDynamicRoutes(v AddRoutingTableToAreaPayloadgetDynamicRoutesRetType) { - setAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType(&o.DynamicRoutes, 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 *AddRoutingTableToAreaPayload) GetId() (res AddRoutingTableToAreaPayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *AddRoutingTableToAreaPayload) GetIdOk() (ret AddRoutingTableToAreaPayloadGetIdRetType, ok bool) { - return getAddRoutingTableToAreaPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *AddRoutingTableToAreaPayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) SetId(v AddRoutingTableToAreaPayloadGetIdRetType) { - setAddRoutingTableToAreaPayloadGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) GetLabels() (res AddRoutingTableToAreaPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) GetLabelsOk() (ret AddRoutingTableToAreaPayloadGetLabelsRetType, ok bool) { - return getAddRoutingTableToAreaPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) SetLabels(v AddRoutingTableToAreaPayloadGetLabelsRetType) { - setAddRoutingTableToAreaPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) GetName() (ret AddRoutingTableToAreaPayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *AddRoutingTableToAreaPayload) GetNameOk() (ret AddRoutingTableToAreaPayloadGetNameRetType, ok bool) { - return getAddRoutingTableToAreaPayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) SetName(v AddRoutingTableToAreaPayloadGetNameRetType) { - setAddRoutingTableToAreaPayloadGetNameAttributeType(&o.Name, v) -} - -// GetSystemRoutes returns the SystemRoutes 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 *AddRoutingTableToAreaPayload) GetSystemRoutes() (res AddRoutingTableToAreaPayloadgetSystemRoutesRetType) { - res, _ = o.GetSystemRoutesOk() - return -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes 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 *AddRoutingTableToAreaPayload) GetSystemRoutesOk() (ret AddRoutingTableToAreaPayloadgetSystemRoutesRetType, ok bool) { - return getAddRoutingTableToAreaPayloadgetSystemRoutesAttributeTypeOk(o.SystemRoutes) -} - -// HasSystemRoutes 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 *AddRoutingTableToAreaPayload) HasSystemRoutes() bool { - _, ok := o.GetSystemRoutesOk() - return ok -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddRoutingTableToAreaPayload) SetSystemRoutes(v AddRoutingTableToAreaPayloadgetSystemRoutesRetType) { - setAddRoutingTableToAreaPayloadgetSystemRoutesAttributeType(&o.SystemRoutes, 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 *AddRoutingTableToAreaPayload) GetUpdatedAt() (res AddRoutingTableToAreaPayloadGetUpdatedAtRetType) { - 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 *AddRoutingTableToAreaPayload) GetUpdatedAtOk() (ret AddRoutingTableToAreaPayloadGetUpdatedAtRetType, ok bool) { - return getAddRoutingTableToAreaPayloadGetUpdatedAtAttributeTypeOk(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 *AddRoutingTableToAreaPayload) 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 *AddRoutingTableToAreaPayload) SetUpdatedAt(v AddRoutingTableToAreaPayloadGetUpdatedAtRetType) { - setAddRoutingTableToAreaPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AddRoutingTableToAreaPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAddRoutingTableToAreaPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getAddRoutingTableToAreaPayloadgetDefaultAttributeTypeOk(o.Default); ok { - toSerialize["Default"] = val - } - if val, ok := getAddRoutingTableToAreaPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeTypeOk(o.DynamicRoutes); ok { - toSerialize["DynamicRoutes"] = val - } - if val, ok := getAddRoutingTableToAreaPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getAddRoutingTableToAreaPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getAddRoutingTableToAreaPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getAddRoutingTableToAreaPayloadgetSystemRoutesAttributeTypeOk(o.SystemRoutes); ok { - toSerialize["SystemRoutes"] = val - } - if val, ok := getAddRoutingTableToAreaPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAddRoutingTableToAreaPayload struct { - value *AddRoutingTableToAreaPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAddRoutingTableToAreaPayload) Get() *AddRoutingTableToAreaPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAddRoutingTableToAreaPayload) Set(val *AddRoutingTableToAreaPayload) { - 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 NullableAddRoutingTableToAreaPayload) 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 *NullableAddRoutingTableToAreaPayload) 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 NewNullableAddRoutingTableToAreaPayload(val *AddRoutingTableToAreaPayload) *NullableAddRoutingTableToAreaPayload { - return &NullableAddRoutingTableToAreaPayload{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 NullableAddRoutingTableToAreaPayload) 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 *NullableAddRoutingTableToAreaPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_add_routing_table_to_area_payload_test.go b/services/iaas/model_add_routing_table_to_area_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_add_routing_table_to_area_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_add_volume_to_server_payload.go b/services/iaas/model_add_volume_to_server_payload.go deleted file mode 100644 index 57d74fb0d5..0000000000 --- a/services/iaas/model_add_volume_to_server_payload.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the AddVolumeToServerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddVolumeToServerPayload{} - -/* - types and functions for deleteOnTermination -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadgetDeleteOnTerminationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadgetDeleteOnTerminationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadgetDeleteOnTerminationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddVolumeToServerPayloadgetDeleteOnTerminationAttributeTypeOk(arg AddVolumeToServerPayloadgetDeleteOnTerminationAttributeType) (ret AddVolumeToServerPayloadgetDeleteOnTerminationRetType, 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 setAddVolumeToServerPayloadgetDeleteOnTerminationAttributeType(arg *AddVolumeToServerPayloadgetDeleteOnTerminationAttributeType, val AddVolumeToServerPayloadgetDeleteOnTerminationRetType) { - *arg = &val -} - -/* - types and functions for serverId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadGetServerIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddVolumeToServerPayloadGetServerIdAttributeTypeOk(arg AddVolumeToServerPayloadGetServerIdAttributeType) (ret AddVolumeToServerPayloadGetServerIdRetType, 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 setAddVolumeToServerPayloadGetServerIdAttributeType(arg *AddVolumeToServerPayloadGetServerIdAttributeType, val AddVolumeToServerPayloadGetServerIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadGetServerIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadGetServerIdRetType = string - -/* - types and functions for volumeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadGetVolumeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAddVolumeToServerPayloadGetVolumeIdAttributeTypeOk(arg AddVolumeToServerPayloadGetVolumeIdAttributeType) (ret AddVolumeToServerPayloadGetVolumeIdRetType, 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 setAddVolumeToServerPayloadGetVolumeIdAttributeType(arg *AddVolumeToServerPayloadGetVolumeIdAttributeType, val AddVolumeToServerPayloadGetVolumeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadGetVolumeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayloadGetVolumeIdRetType = string - -// AddVolumeToServerPayload Object that represents a Volume attachment to a server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AddVolumeToServerPayload struct { - // Delete the volume during the termination of the server. Defaults to false. - DeleteOnTermination AddVolumeToServerPayloadgetDeleteOnTerminationAttributeType `json:"deleteOnTermination,omitempty"` - // Universally Unique Identifier (UUID). - ServerId AddVolumeToServerPayloadGetServerIdAttributeType `json:"serverId,omitempty"` - // Universally Unique Identifier (UUID). - VolumeId AddVolumeToServerPayloadGetVolumeIdAttributeType `json:"volumeId,omitempty"` -} - -// NewAddVolumeToServerPayload instantiates a new AddVolumeToServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAddVolumeToServerPayload() *AddVolumeToServerPayload { - this := AddVolumeToServerPayload{} - return &this -} - -// NewAddVolumeToServerPayloadWithDefaults instantiates a new AddVolumeToServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAddVolumeToServerPayloadWithDefaults() *AddVolumeToServerPayload { - this := AddVolumeToServerPayload{} - return &this -} - -// GetDeleteOnTermination returns the DeleteOnTermination 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 *AddVolumeToServerPayload) GetDeleteOnTermination() (res AddVolumeToServerPayloadgetDeleteOnTerminationRetType) { - res, _ = o.GetDeleteOnTerminationOk() - return -} - -// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination 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 *AddVolumeToServerPayload) GetDeleteOnTerminationOk() (ret AddVolumeToServerPayloadgetDeleteOnTerminationRetType, ok bool) { - return getAddVolumeToServerPayloadgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination) -} - -// HasDeleteOnTermination 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 *AddVolumeToServerPayload) HasDeleteOnTermination() bool { - _, ok := o.GetDeleteOnTerminationOk() - return ok -} - -// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddVolumeToServerPayload) SetDeleteOnTermination(v AddVolumeToServerPayloadgetDeleteOnTerminationRetType) { - setAddVolumeToServerPayloadgetDeleteOnTerminationAttributeType(&o.DeleteOnTermination, v) -} - -// GetServerId returns the ServerId 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 *AddVolumeToServerPayload) GetServerId() (res AddVolumeToServerPayloadGetServerIdRetType) { - res, _ = o.GetServerIdOk() - return -} - -// GetServerIdOk returns a tuple with the ServerId 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 *AddVolumeToServerPayload) GetServerIdOk() (ret AddVolumeToServerPayloadGetServerIdRetType, ok bool) { - return getAddVolumeToServerPayloadGetServerIdAttributeTypeOk(o.ServerId) -} - -// HasServerId 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 *AddVolumeToServerPayload) HasServerId() bool { - _, ok := o.GetServerIdOk() - return ok -} - -// SetServerId gets a reference to the given string and assigns it to the ServerId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddVolumeToServerPayload) SetServerId(v AddVolumeToServerPayloadGetServerIdRetType) { - setAddVolumeToServerPayloadGetServerIdAttributeType(&o.ServerId, v) -} - -// GetVolumeId returns the VolumeId 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 *AddVolumeToServerPayload) GetVolumeId() (res AddVolumeToServerPayloadGetVolumeIdRetType) { - res, _ = o.GetVolumeIdOk() - return -} - -// GetVolumeIdOk returns a tuple with the VolumeId 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 *AddVolumeToServerPayload) GetVolumeIdOk() (ret AddVolumeToServerPayloadGetVolumeIdRetType, ok bool) { - return getAddVolumeToServerPayloadGetVolumeIdAttributeTypeOk(o.VolumeId) -} - -// HasVolumeId 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 *AddVolumeToServerPayload) HasVolumeId() bool { - _, ok := o.GetVolumeIdOk() - return ok -} - -// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AddVolumeToServerPayload) SetVolumeId(v AddVolumeToServerPayloadGetVolumeIdRetType) { - setAddVolumeToServerPayloadGetVolumeIdAttributeType(&o.VolumeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AddVolumeToServerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAddVolumeToServerPayloadgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination); ok { - toSerialize["DeleteOnTermination"] = val - } - if val, ok := getAddVolumeToServerPayloadGetServerIdAttributeTypeOk(o.ServerId); ok { - toSerialize["ServerId"] = val - } - if val, ok := getAddVolumeToServerPayloadGetVolumeIdAttributeTypeOk(o.VolumeId); ok { - toSerialize["VolumeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAddVolumeToServerPayload struct { - value *AddVolumeToServerPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAddVolumeToServerPayload) Get() *AddVolumeToServerPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAddVolumeToServerPayload) Set(val *AddVolumeToServerPayload) { - 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 NullableAddVolumeToServerPayload) 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 *NullableAddVolumeToServerPayload) 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 NewNullableAddVolumeToServerPayload(val *AddVolumeToServerPayload) *NullableAddVolumeToServerPayload { - return &NullableAddVolumeToServerPayload{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 NullableAddVolumeToServerPayload) 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 *NullableAddVolumeToServerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_add_volume_to_server_payload_test.go b/services/iaas/model_add_volume_to_server_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_add_volume_to_server_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_affinity_group.go b/services/iaas/model_affinity_group.go deleted file mode 100644 index c4ee75da97..0000000000 --- a/services/iaas/model_affinity_group.go +++ /dev/null @@ -1,322 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the AffinityGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AffinityGroup{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAffinityGroupGetIdAttributeTypeOk(arg AffinityGroupGetIdAttributeType) (ret AffinityGroupGetIdRetType, 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 setAffinityGroupGetIdAttributeType(arg *AffinityGroupGetIdAttributeType, val AffinityGroupGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetIdRetType = string - -/* - types and functions for members -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetMembersAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetMembersArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetMembersRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAffinityGroupGetMembersAttributeTypeOk(arg AffinityGroupGetMembersAttributeType) (ret AffinityGroupGetMembersRetType, 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 setAffinityGroupGetMembersAttributeType(arg *AffinityGroupGetMembersAttributeType, val AffinityGroupGetMembersRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAffinityGroupGetNameAttributeTypeOk(arg AffinityGroupGetNameAttributeType) (ret AffinityGroupGetNameRetType, 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 setAffinityGroupGetNameAttributeType(arg *AffinityGroupGetNameAttributeType, val AffinityGroupGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetNameRetType = string - -/* - types and functions for policy -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetPolicyAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAffinityGroupGetPolicyAttributeTypeOk(arg AffinityGroupGetPolicyAttributeType) (ret AffinityGroupGetPolicyRetType, 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 setAffinityGroupGetPolicyAttributeType(arg *AffinityGroupGetPolicyAttributeType, val AffinityGroupGetPolicyRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetPolicyArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupGetPolicyRetType = string - -// AffinityGroup Definition of an affinity group. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroup struct { - // Universally Unique Identifier (UUID). - Id AffinityGroupGetIdAttributeType `json:"id,omitempty"` - // The servers that are part of the affinity group. - Members AffinityGroupGetMembersAttributeType `json:"members,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name AffinityGroupGetNameAttributeType `json:"name" required:"true"` - // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. - // REQUIRED - Policy AffinityGroupGetPolicyAttributeType `json:"policy" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AffinityGroup AffinityGroup - -// NewAffinityGroup instantiates a new AffinityGroup 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAffinityGroup(name AffinityGroupGetNameArgType, policy AffinityGroupGetPolicyArgType) *AffinityGroup { - this := AffinityGroup{} - setAffinityGroupGetNameAttributeType(&this.Name, name) - setAffinityGroupGetPolicyAttributeType(&this.Policy, policy) - return &this -} - -// NewAffinityGroupWithDefaults instantiates a new AffinityGroup 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAffinityGroupWithDefaults() *AffinityGroup { - this := AffinityGroup{} - return &this -} - -// 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 *AffinityGroup) GetId() (res AffinityGroupGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *AffinityGroup) GetIdOk() (ret AffinityGroupGetIdRetType, ok bool) { - return getAffinityGroupGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *AffinityGroup) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AffinityGroup) SetId(v AffinityGroupGetIdRetType) { - setAffinityGroupGetIdAttributeType(&o.Id, v) -} - -// GetMembers returns the Members 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 *AffinityGroup) GetMembers() (res AffinityGroupGetMembersRetType) { - res, _ = o.GetMembersOk() - return -} - -// GetMembersOk returns a tuple with the Members 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 *AffinityGroup) GetMembersOk() (ret AffinityGroupGetMembersRetType, ok bool) { - return getAffinityGroupGetMembersAttributeTypeOk(o.Members) -} - -// HasMembers 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 *AffinityGroup) HasMembers() bool { - _, ok := o.GetMembersOk() - return ok -} - -// SetMembers gets a reference to the given []string and assigns it to the Members field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AffinityGroup) SetMembers(v AffinityGroupGetMembersRetType) { - setAffinityGroupGetMembersAttributeType(&o.Members, 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 *AffinityGroup) GetName() (ret AffinityGroupGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *AffinityGroup) GetNameOk() (ret AffinityGroupGetNameRetType, ok bool) { - return getAffinityGroupGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AffinityGroup) SetName(v AffinityGroupGetNameRetType) { - setAffinityGroupGetNameAttributeType(&o.Name, v) -} - -// GetPolicy returns the Policy field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AffinityGroup) GetPolicy() (ret AffinityGroupGetPolicyRetType) { - ret, _ = o.GetPolicyOk() - return ret -} - -// GetPolicyOk returns a tuple with the Policy field value -// 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 *AffinityGroup) GetPolicyOk() (ret AffinityGroupGetPolicyRetType, ok bool) { - return getAffinityGroupGetPolicyAttributeTypeOk(o.Policy) -} - -// SetPolicy sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AffinityGroup) SetPolicy(v AffinityGroupGetPolicyRetType) { - setAffinityGroupGetPolicyAttributeType(&o.Policy, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AffinityGroup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAffinityGroupGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getAffinityGroupGetMembersAttributeTypeOk(o.Members); ok { - toSerialize["Members"] = val - } - if val, ok := getAffinityGroupGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getAffinityGroupGetPolicyAttributeTypeOk(o.Policy); ok { - toSerialize["Policy"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAffinityGroup struct { - value *AffinityGroup - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAffinityGroup) Get() *AffinityGroup { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAffinityGroup) Set(val *AffinityGroup) { - 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 NullableAffinityGroup) 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 *NullableAffinityGroup) 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 NewNullableAffinityGroup(val *AffinityGroup) *NullableAffinityGroup { - return &NullableAffinityGroup{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 NullableAffinityGroup) 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 *NullableAffinityGroup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_affinity_group_list_response.go b/services/iaas/model_affinity_group_list_response.go deleted file mode 100644 index f4ce914169..0000000000 --- a/services/iaas/model_affinity_group_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the AffinityGroupListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AffinityGroupListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupListResponseGetItemsAttributeType = *[]AffinityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupListResponseGetItemsArgType = []AffinityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupListResponseGetItemsRetType = []AffinityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAffinityGroupListResponseGetItemsAttributeTypeOk(arg AffinityGroupListResponseGetItemsAttributeType) (ret AffinityGroupListResponseGetItemsRetType, 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 setAffinityGroupListResponseGetItemsAttributeType(arg *AffinityGroupListResponseGetItemsAttributeType, val AffinityGroupListResponseGetItemsRetType) { - *arg = &val -} - -// AffinityGroupListResponse Response object for affinity group list request. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AffinityGroupListResponse struct { - // A list of affinity groups. - // REQUIRED - Items AffinityGroupListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AffinityGroupListResponse AffinityGroupListResponse - -// NewAffinityGroupListResponse instantiates a new AffinityGroupListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAffinityGroupListResponse(items AffinityGroupListResponseGetItemsArgType) *AffinityGroupListResponse { - this := AffinityGroupListResponse{} - setAffinityGroupListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewAffinityGroupListResponseWithDefaults instantiates a new AffinityGroupListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAffinityGroupListResponseWithDefaults() *AffinityGroupListResponse { - this := AffinityGroupListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AffinityGroupListResponse) GetItems() (ret AffinityGroupListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *AffinityGroupListResponse) GetItemsOk() (ret AffinityGroupListResponseGetItemsRetType, ok bool) { - return getAffinityGroupListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AffinityGroupListResponse) SetItems(v AffinityGroupListResponseGetItemsRetType) { - setAffinityGroupListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AffinityGroupListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAffinityGroupListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAffinityGroupListResponse struct { - value *AffinityGroupListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAffinityGroupListResponse) Get() *AffinityGroupListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAffinityGroupListResponse) Set(val *AffinityGroupListResponse) { - 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 NullableAffinityGroupListResponse) 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 *NullableAffinityGroupListResponse) 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 NewNullableAffinityGroupListResponse(val *AffinityGroupListResponse) *NullableAffinityGroupListResponse { - return &NullableAffinityGroupListResponse{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 NullableAffinityGroupListResponse) 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 *NullableAffinityGroupListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_affinity_group_list_response_test.go b/services/iaas/model_affinity_group_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_affinity_group_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_affinity_group_test.go b/services/iaas/model_affinity_group_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_affinity_group_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_allowed_addresses_inner.go b/services/iaas/model_allowed_addresses_inner.go deleted file mode 100644 index f7c5b25af2..0000000000 --- a/services/iaas/model_allowed_addresses_inner.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" - "regexp" -) - -// AllowedAddressesInner - struct for AllowedAddressesInner -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AllowedAddressesInner struct { - String *string -} - -// stringAsAllowedAddressesInner is a convenience function that returns string wrapped in AllowedAddressesInner -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func StringAsAllowedAddressesInner(v *string) AllowedAddressesInner { - return AllowedAddressesInner{ - String: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *AllowedAddressesInner) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // Workaround until upstream issue is fixed: - // https://github.com/OpenAPITools/openapi-generator/issues/21751 - // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226 - // try to unmarshal data into String - dstAllowedAddressesInner1 := &AllowedAddressesInner{} - err = json.Unmarshal(data, &dstAllowedAddressesInner1.String) - if err == nil { - jsonString, _ := json.Marshal(&dstAllowedAddressesInner1.String) - regex := `/((^\\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*$))/` - regex = regexp.MustCompile("^\\/|\\/$").ReplaceAllString(regex, "$1") // Remove beginning slash and ending slash - regex = regexp.MustCompile("\\\\(.)").ReplaceAllString(regex, "$1") // Remove duplicate escaping char for dots - rawString := regexp.MustCompile(`^"|"$`).ReplaceAllString(*dstAllowedAddressesInner1.String, "$1") // Remove quotes - isMatched, _ := regexp.MatchString(regex, rawString) - if string(jsonString) != "{}" && isMatched { // empty struct - dst.String = dstAllowedAddressesInner1.String - match++ - } - } - - // try to unmarshal data into String - dstAllowedAddressesInner2 := &AllowedAddressesInner{} - err = json.Unmarshal(data, &dstAllowedAddressesInner2.String) - if err == nil { - jsonString, _ := json.Marshal(&dstAllowedAddressesInner2.String) - regex := `/^((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])))?$/` - regex = regexp.MustCompile("^\\/|\\/$").ReplaceAllString(regex, "$1") // Remove beginning slash and ending slash - regex = regexp.MustCompile("\\\\(.)").ReplaceAllString(regex, "$1") // Remove duplicate escaping char for dots - rawString := regexp.MustCompile(`^"|"$`).ReplaceAllString(*dstAllowedAddressesInner2.String, "$1") // Remove quotes - isMatched, _ := regexp.MatchString(regex, rawString) - if string(jsonString) != "{}" && isMatched { // empty struct - dst.String = dstAllowedAddressesInner2.String - match++ - } - } - - if match > 1 { // more than 1 match - // reset to nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(AllowedAddressesInner)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src AllowedAddressesInner) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.String != nil { - return json.Marshal(&src.String) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *AllowedAddressesInner) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAllowedAddressesInner struct { - value *AllowedAddressesInner - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAllowedAddressesInner) Get() *AllowedAddressesInner { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAllowedAddressesInner) Set(val *AllowedAddressesInner) { - 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 NullableAllowedAddressesInner) 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 *NullableAllowedAddressesInner) 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 NewNullableAllowedAddressesInner(val *AllowedAddressesInner) *NullableAllowedAddressesInner { - return &NullableAllowedAddressesInner{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 NullableAllowedAddressesInner) 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 *NullableAllowedAddressesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_allowed_addresses_inner_test.go b/services/iaas/model_allowed_addresses_inner_test.go deleted file mode 100644 index 7925fd261b..0000000000 --- a/services/iaas/model_allowed_addresses_inner_test.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas - -import ( - "testing" -) - -// isOneOf - -func TestAllowedAddressesInner_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - - { - name: "success - string 10.1.2.10", - args: args{ - src: []byte(`"10.1.2.10"`), - }, - wantErr: false, - }, - - { - name: "success - string 192.168.0.0/24", - args: args{ - src: []byte(`"192.168.0.0/24"`), - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := &AllowedAddressesInner{} - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - marshalJson, err := v.MarshalJSON() - if err != nil { - t.Fatalf("failed marshalling AllowedAddressesInner: %v", err) - } - if string(marshalJson) != string(tt.args.src) { - t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson) - } - }) - } -} diff --git a/services/iaas/model_area_id.go b/services/iaas/model_area_id.go deleted file mode 100644 index acc0763d15..0000000000 --- a/services/iaas/model_area_id.go +++ /dev/null @@ -1,165 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" - "regexp" -) - -// AreaId - The identifier (ID) of an area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AreaId struct { - StaticAreaID *StaticAreaID - String *string -} - -// StaticAreaIDAsAreaId is a convenience function that returns StaticAreaID wrapped in AreaId -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func StaticAreaIDAsAreaId(v *StaticAreaID) AreaId { - return AreaId{ - StaticAreaID: v, - } -} - -// stringAsAreaId is a convenience function that returns string wrapped in AreaId -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func StringAsAreaId(v *string) AreaId { - return AreaId{ - String: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *AreaId) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // Workaround until upstream issue is fixed: - // https://github.com/OpenAPITools/openapi-generator/issues/21751 - // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226 - // try to unmarshal data into String - dstAreaId1 := &AreaId{} - err = json.Unmarshal(data, &dstAreaId1.String) - if err == nil { - jsonString, _ := json.Marshal(&dstAreaId1.String) - regex := `/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/` - regex = regexp.MustCompile("^\\/|\\/$").ReplaceAllString(regex, "$1") // Remove beginning slash and ending slash - regex = regexp.MustCompile("\\\\(.)").ReplaceAllString(regex, "$1") // Remove duplicate escaping char for dots - rawString := regexp.MustCompile(`^"|"$`).ReplaceAllString(*dstAreaId1.String, "$1") // Remove quotes - isMatched, _ := regexp.MatchString(regex, rawString) - if string(jsonString) != "{}" && isMatched { // empty struct - dst.String = dstAreaId1.String - match++ - } - } - - // try to unmarshal data into StaticAreaID - dstAreaId2 := &AreaId{} - err = json.Unmarshal(data, &dstAreaId2.StaticAreaID) - if err == nil { - jsonStaticAreaID, _ := json.Marshal(&dstAreaId2.StaticAreaID) - if string(jsonStaticAreaID) != "{}" { // empty struct - dst.StaticAreaID = dstAreaId2.StaticAreaID - match++ - } - } - - if match > 1 { // more than 1 match - // reset to nil - dst.StaticAreaID = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(AreaId)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AreaId)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src AreaId) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.StaticAreaID != nil { - return json.Marshal(&src.StaticAreaID) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *AreaId) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.StaticAreaID != nil { - return obj.StaticAreaID - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAreaId struct { - value *AreaId - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAreaId) Get() *AreaId { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAreaId) Set(val *AreaId) { - 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 NullableAreaId) 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 *NullableAreaId) 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 NewNullableAreaId(val *AreaId) *NullableAreaId { - return &NullableAreaId{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 NullableAreaId) 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 *NullableAreaId) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_area_id_test.go b/services/iaas/model_area_id_test.go deleted file mode 100644 index 63bff37461..0000000000 --- a/services/iaas/model_area_id_test.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas - -import ( - "testing" -) - -// isOneOf - -func TestAreaId_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - - { - name: "success - string d61a8564-c8dd-4ffb-bc15-143e7d0c85ed", - args: args{ - src: []byte(`"d61a8564-c8dd-4ffb-bc15-143e7d0c85ed"`), - }, - wantErr: false, - }, - - { - name: "success - StaticAreaID PUBLIC", - args: args{ - src: []byte(`"PUBLIC"`), - }, - wantErr: false, - }, - { - name: "success - StaticAreaID SCHWARZ", - args: args{ - src: []byte(`"SCHWARZ"`), - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := &AreaId{} - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - marshalJson, err := v.MarshalJSON() - if err != nil { - t.Fatalf("failed marshalling AreaId: %v", err) - } - if string(marshalJson) != string(tt.args.src) { - t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson) - } - }) - } -} diff --git a/services/iaas/model_availability_zone_list_response.go b/services/iaas/model_availability_zone_list_response.go deleted file mode 100644 index 21901bddb5..0000000000 --- a/services/iaas/model_availability_zone_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the AvailabilityZoneListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AvailabilityZoneListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AvailabilityZoneListResponseGetItemsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AvailabilityZoneListResponseGetItemsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AvailabilityZoneListResponseGetItemsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAvailabilityZoneListResponseGetItemsAttributeTypeOk(arg AvailabilityZoneListResponseGetItemsAttributeType) (ret AvailabilityZoneListResponseGetItemsRetType, 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 setAvailabilityZoneListResponseGetItemsAttributeType(arg *AvailabilityZoneListResponseGetItemsAttributeType, val AvailabilityZoneListResponseGetItemsRetType) { - *arg = &val -} - -// AvailabilityZoneListResponse Availability Zone list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AvailabilityZoneListResponse struct { - // A list of availability zones. - // REQUIRED - Items AvailabilityZoneListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AvailabilityZoneListResponse AvailabilityZoneListResponse - -// NewAvailabilityZoneListResponse instantiates a new AvailabilityZoneListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAvailabilityZoneListResponse(items AvailabilityZoneListResponseGetItemsArgType) *AvailabilityZoneListResponse { - this := AvailabilityZoneListResponse{} - setAvailabilityZoneListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewAvailabilityZoneListResponseWithDefaults instantiates a new AvailabilityZoneListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAvailabilityZoneListResponseWithDefaults() *AvailabilityZoneListResponse { - this := AvailabilityZoneListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AvailabilityZoneListResponse) GetItems() (ret AvailabilityZoneListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *AvailabilityZoneListResponse) GetItemsOk() (ret AvailabilityZoneListResponseGetItemsRetType, ok bool) { - return getAvailabilityZoneListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AvailabilityZoneListResponse) SetItems(v AvailabilityZoneListResponseGetItemsRetType) { - setAvailabilityZoneListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AvailabilityZoneListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAvailabilityZoneListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAvailabilityZoneListResponse struct { - value *AvailabilityZoneListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAvailabilityZoneListResponse) Get() *AvailabilityZoneListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAvailabilityZoneListResponse) Set(val *AvailabilityZoneListResponse) { - 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 NullableAvailabilityZoneListResponse) 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 *NullableAvailabilityZoneListResponse) 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 NewNullableAvailabilityZoneListResponse(val *AvailabilityZoneListResponse) *NullableAvailabilityZoneListResponse { - return &NullableAvailabilityZoneListResponse{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 NullableAvailabilityZoneListResponse) 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 *NullableAvailabilityZoneListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_availability_zone_list_response_test.go b/services/iaas/model_availability_zone_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_availability_zone_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_backup.go b/services/iaas/model_backup.go deleted file mode 100644 index ff5a93f2b9..0000000000 --- a/services/iaas/model_backup.go +++ /dev/null @@ -1,802 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Backup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Backup{} - -/* - types and functions for availabilityZone -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetAvailabilityZoneAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetAvailabilityZoneAttributeTypeOk(arg BackupGetAvailabilityZoneAttributeType) (ret BackupGetAvailabilityZoneRetType, 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 setBackupGetAvailabilityZoneAttributeType(arg *BackupGetAvailabilityZoneAttributeType, val BackupGetAvailabilityZoneRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetAvailabilityZoneArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetAvailabilityZoneRetType = string - -/* - 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 BackupGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetCreatedAtAttributeTypeOk(arg BackupGetCreatedAtAttributeType) (ret BackupGetCreatedAtRetType, 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 setBackupGetCreatedAtAttributeType(arg *BackupGetCreatedAtAttributeType, val BackupGetCreatedAtRetType) { - *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 BackupGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetDescriptionAttributeTypeOk(arg BackupGetDescriptionAttributeType) (ret BackupGetDescriptionRetType, 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 setBackupGetDescriptionAttributeType(arg *BackupGetDescriptionAttributeType, val BackupGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetDescriptionRetType = string - -/* - types and functions for encrypted -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupgetEncryptedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupgetEncryptedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupgetEncryptedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupgetEncryptedAttributeTypeOk(arg BackupgetEncryptedAttributeType) (ret BackupgetEncryptedRetType, 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 setBackupgetEncryptedAttributeType(arg *BackupgetEncryptedAttributeType, val BackupgetEncryptedRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetIdAttributeTypeOk(arg BackupGetIdAttributeType) (ret BackupGetIdRetType, 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 setBackupGetIdAttributeType(arg *BackupGetIdAttributeType, val BackupGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetLabelsAttributeTypeOk(arg BackupGetLabelsAttributeType) (ret BackupGetLabelsRetType, 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 setBackupGetLabelsAttributeType(arg *BackupGetLabelsAttributeType, val BackupGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetNameAttributeTypeOk(arg BackupGetNameAttributeType) (ret BackupGetNameRetType, 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 setBackupGetNameAttributeType(arg *BackupGetNameAttributeType, val BackupGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetNameRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetSizeAttributeTypeOk(arg BackupGetSizeAttributeType) (ret BackupGetSizeRetType, 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 setBackupGetSizeAttributeType(arg *BackupGetSizeAttributeType, val BackupGetSizeRetType) { - *arg = &val -} - -/* - types and functions for snapshotId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSnapshotIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetSnapshotIdAttributeTypeOk(arg BackupGetSnapshotIdAttributeType) (ret BackupGetSnapshotIdRetType, 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 setBackupGetSnapshotIdAttributeType(arg *BackupGetSnapshotIdAttributeType, val BackupGetSnapshotIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSnapshotIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSnapshotIdRetType = string - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetStatusAttributeTypeOk(arg BackupGetStatusAttributeType) (ret BackupGetStatusRetType, 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 setBackupGetStatusAttributeType(arg *BackupGetStatusAttributeType, val BackupGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetStatusRetType = 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 BackupGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetUpdatedAtAttributeTypeOk(arg BackupGetUpdatedAtAttributeType) (ret BackupGetUpdatedAtRetType, 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 setBackupGetUpdatedAtAttributeType(arg *BackupGetUpdatedAtAttributeType, val BackupGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for volumeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetVolumeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetVolumeIdAttributeTypeOk(arg BackupGetVolumeIdAttributeType) (ret BackupGetVolumeIdRetType, 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 setBackupGetVolumeIdAttributeType(arg *BackupGetVolumeIdAttributeType, val BackupGetVolumeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetVolumeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetVolumeIdRetType = string - -// Backup Object that represents a backup. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Backup struct { - // Object that represents an availability zone. - AvailabilityZone BackupGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` - // Date-time when resource was created. - CreatedAt BackupGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description BackupGetDescriptionAttributeType `json:"description,omitempty"` - // Indicates if a volume is encrypted. - 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. - Labels BackupGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name BackupGetNameAttributeType `json:"name,omitempty"` - // Size in Gigabyte. - Size BackupGetSizeAttributeType `json:"size,omitempty"` - // Universally Unique Identifier (UUID). - SnapshotId BackupGetSnapshotIdAttributeType `json:"snapshotId,omitempty"` - // The status of a backup object. Possible values: `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`. - Status BackupGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt BackupGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - // Universally Unique Identifier (UUID). - VolumeId BackupGetVolumeIdAttributeType `json:"volumeId,omitempty"` -} - -// NewBackup instantiates a new Backup 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBackup() *Backup { - this := Backup{} - return &this -} - -// NewBackupWithDefaults instantiates a new Backup 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBackupWithDefaults() *Backup { - this := Backup{} - return &this -} - -// GetAvailabilityZone returns the AvailabilityZone 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 *Backup) GetAvailabilityZone() (res BackupGetAvailabilityZoneRetType) { - res, _ = o.GetAvailabilityZoneOk() - return -} - -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone 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 *Backup) GetAvailabilityZoneOk() (ret BackupGetAvailabilityZoneRetType, ok bool) { - return getBackupGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) -} - -// HasAvailabilityZone 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 *Backup) HasAvailabilityZone() bool { - _, ok := o.GetAvailabilityZoneOk() - return ok -} - -// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetAvailabilityZone(v BackupGetAvailabilityZoneRetType) { - setBackupGetAvailabilityZoneAttributeType(&o.AvailabilityZone, 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 *Backup) GetCreatedAt() (res BackupGetCreatedAtRetType) { - 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 *Backup) GetCreatedAtOk() (ret BackupGetCreatedAtRetType, ok bool) { - return getBackupGetCreatedAtAttributeTypeOk(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 *Backup) 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 *Backup) SetCreatedAt(v BackupGetCreatedAtRetType) { - setBackupGetCreatedAtAttributeType(&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 *Backup) GetDescription() (res BackupGetDescriptionRetType) { - 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 *Backup) GetDescriptionOk() (ret BackupGetDescriptionRetType, ok bool) { - return getBackupGetDescriptionAttributeTypeOk(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 *Backup) 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 *Backup) SetDescription(v BackupGetDescriptionRetType) { - setBackupGetDescriptionAttributeType(&o.Description, v) -} - -// GetEncrypted returns the Encrypted 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 *Backup) GetEncrypted() (res BackupgetEncryptedRetType) { - res, _ = o.GetEncryptedOk() - return -} - -// GetEncryptedOk returns a tuple with the Encrypted 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 *Backup) GetEncryptedOk() (ret BackupgetEncryptedRetType, ok bool) { - return getBackupgetEncryptedAttributeTypeOk(o.Encrypted) -} - -// HasEncrypted 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 *Backup) HasEncrypted() bool { - _, ok := o.GetEncryptedOk() - return ok -} - -// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetEncrypted(v BackupgetEncryptedRetType) { - setBackupgetEncryptedAttributeType(&o.Encrypted, 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 *Backup) GetId() (res BackupGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *Backup) GetIdOk() (ret BackupGetIdRetType, ok bool) { - return getBackupGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Backup) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetId(v BackupGetIdRetType) { - setBackupGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetLabels() (res BackupGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetLabelsOk() (ret BackupGetLabelsRetType, ok bool) { - return getBackupGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetLabels(v BackupGetLabelsRetType) { - setBackupGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetName() (res BackupGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *Backup) GetNameOk() (ret BackupGetNameRetType, ok bool) { - return getBackupGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *Backup) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetName(v BackupGetNameRetType) { - setBackupGetNameAttributeType(&o.Name, v) -} - -// GetSize returns the Size 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 *Backup) GetSize() (res BackupGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *Backup) GetSizeOk() (ret BackupGetSizeRetType, ok bool) { - return getBackupGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *Backup) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetSize(v BackupGetSizeRetType) { - setBackupGetSizeAttributeType(&o.Size, v) -} - -// GetSnapshotId returns the SnapshotId 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 *Backup) GetSnapshotId() (res BackupGetSnapshotIdRetType) { - res, _ = o.GetSnapshotIdOk() - return -} - -// GetSnapshotIdOk returns a tuple with the SnapshotId 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 *Backup) GetSnapshotIdOk() (ret BackupGetSnapshotIdRetType, ok bool) { - return getBackupGetSnapshotIdAttributeTypeOk(o.SnapshotId) -} - -// HasSnapshotId 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 *Backup) HasSnapshotId() bool { - _, ok := o.GetSnapshotIdOk() - return ok -} - -// SetSnapshotId gets a reference to the given string and assigns it to the SnapshotId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetSnapshotId(v BackupGetSnapshotIdRetType) { - setBackupGetSnapshotIdAttributeType(&o.SnapshotId, v) -} - -// GetStatus returns the Status 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 *Backup) GetStatus() (res BackupGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *Backup) GetStatusOk() (ret BackupGetStatusRetType, ok bool) { - return getBackupGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *Backup) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetStatus(v BackupGetStatusRetType) { - setBackupGetStatusAttributeType(&o.Status, 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 *Backup) GetUpdatedAt() (res BackupGetUpdatedAtRetType) { - 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 *Backup) GetUpdatedAtOk() (ret BackupGetUpdatedAtRetType, ok bool) { - return getBackupGetUpdatedAtAttributeTypeOk(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 *Backup) 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 *Backup) SetUpdatedAt(v BackupGetUpdatedAtRetType) { - setBackupGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetVolumeId returns the VolumeId 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 *Backup) GetVolumeId() (res BackupGetVolumeIdRetType) { - res, _ = o.GetVolumeIdOk() - return -} - -// GetVolumeIdOk returns a tuple with the VolumeId 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 *Backup) GetVolumeIdOk() (ret BackupGetVolumeIdRetType, ok bool) { - return getBackupGetVolumeIdAttributeTypeOk(o.VolumeId) -} - -// HasVolumeId 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 *Backup) HasVolumeId() bool { - _, ok := o.GetVolumeIdOk() - return ok -} - -// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetVolumeId(v BackupGetVolumeIdRetType) { - setBackupGetVolumeIdAttributeType(&o.VolumeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Backup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBackupGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { - toSerialize["AvailabilityZone"] = val - } - if val, ok := getBackupGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getBackupGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getBackupgetEncryptedAttributeTypeOk(o.Encrypted); ok { - toSerialize["Encrypted"] = val - } - if val, ok := getBackupGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getBackupGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getBackupGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getBackupGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getBackupGetSnapshotIdAttributeTypeOk(o.SnapshotId); ok { - toSerialize["SnapshotId"] = val - } - if val, ok := getBackupGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getBackupGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getBackupGetVolumeIdAttributeTypeOk(o.VolumeId); ok { - toSerialize["VolumeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBackup struct { - value *Backup - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBackup) Get() *Backup { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBackup) Set(val *Backup) { - 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 NullableBackup) 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 *NullableBackup) 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 NewNullableBackup(val *Backup) *NullableBackup { - return &NullableBackup{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 NullableBackup) 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 *NullableBackup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_backup_list_response.go b/services/iaas/model_backup_list_response.go deleted file mode 100644 index 47422a847d..0000000000 --- a/services/iaas/model_backup_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the BackupListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BackupListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListResponseGetItemsAttributeType = *[]Backup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListResponseGetItemsArgType = []Backup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListResponseGetItemsRetType = []Backup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupListResponseGetItemsAttributeTypeOk(arg BackupListResponseGetItemsAttributeType) (ret BackupListResponseGetItemsRetType, 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 setBackupListResponseGetItemsAttributeType(arg *BackupListResponseGetItemsAttributeType, val BackupListResponseGetItemsRetType) { - *arg = &val -} - -// BackupListResponse Backup list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListResponse struct { - // A list containing backup objects. - // REQUIRED - Items BackupListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _BackupListResponse BackupListResponse - -// NewBackupListResponse instantiates a new BackupListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBackupListResponse(items BackupListResponseGetItemsArgType) *BackupListResponse { - this := BackupListResponse{} - setBackupListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewBackupListResponseWithDefaults instantiates a new BackupListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBackupListResponseWithDefaults() *BackupListResponse { - this := BackupListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BackupListResponse) GetItems() (ret BackupListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *BackupListResponse) GetItemsOk() (ret BackupListResponseGetItemsRetType, ok bool) { - return getBackupListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BackupListResponse) SetItems(v BackupListResponseGetItemsRetType) { - setBackupListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o BackupListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBackupListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBackupListResponse struct { - value *BackupListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBackupListResponse) Get() *BackupListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBackupListResponse) Set(val *BackupListResponse) { - 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 NullableBackupListResponse) 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 *NullableBackupListResponse) 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 NewNullableBackupListResponse(val *BackupListResponse) *NullableBackupListResponse { - return &NullableBackupListResponse{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 NullableBackupListResponse) 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 *NullableBackupListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_backup_list_response_test.go b/services/iaas/model_backup_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_backup_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_backup_source.go b/services/iaas/model_backup_source.go deleted file mode 100644 index d3094606f6..0000000000 --- a/services/iaas/model_backup_source.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the BackupSource type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BackupSource{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupSourceGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupSourceGetIdAttributeTypeOk(arg BackupSourceGetIdAttributeType) (ret BackupSourceGetIdRetType, 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 setBackupSourceGetIdAttributeType(arg *BackupSourceGetIdAttributeType, val BackupSourceGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupSourceGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupSourceGetIdRetType = string - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupSourceGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupSourceGetTypeAttributeTypeOk(arg BackupSourceGetTypeAttributeType) (ret BackupSourceGetTypeRetType, 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 setBackupSourceGetTypeAttributeType(arg *BackupSourceGetTypeAttributeType, val BackupSourceGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupSourceGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupSourceGetTypeRetType = string - -// BackupSource The source object of a backup. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupSource struct { - // Universally Unique Identifier (UUID). - // REQUIRED - Id BackupSourceGetIdAttributeType `json:"id" required:"true"` - // The source types of a backup. Possible values: `volume`, `snapshot`. - // REQUIRED - Type BackupSourceGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _BackupSource BackupSource - -// NewBackupSource instantiates a new BackupSource 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBackupSource(id BackupSourceGetIdArgType, types BackupSourceGetTypeArgType) *BackupSource { - this := BackupSource{} - setBackupSourceGetIdAttributeType(&this.Id, id) - setBackupSourceGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewBackupSourceWithDefaults instantiates a new BackupSource 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBackupSourceWithDefaults() *BackupSource { - this := BackupSource{} - return &this -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BackupSource) GetId() (ret BackupSourceGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// 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 *BackupSource) GetIdOk() (ret BackupSourceGetIdRetType, ok bool) { - return getBackupSourceGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BackupSource) SetId(v BackupSourceGetIdRetType) { - setBackupSourceGetIdAttributeType(&o.Id, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BackupSource) GetType() (ret BackupSourceGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *BackupSource) GetTypeOk() (ret BackupSourceGetTypeRetType, ok bool) { - return getBackupSourceGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BackupSource) SetType(v BackupSourceGetTypeRetType) { - setBackupSourceGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o BackupSource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBackupSourceGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getBackupSourceGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBackupSource struct { - value *BackupSource - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBackupSource) Get() *BackupSource { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBackupSource) Set(val *BackupSource) { - 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 NullableBackupSource) 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 *NullableBackupSource) 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 NewNullableBackupSource(val *BackupSource) *NullableBackupSource { - return &NullableBackupSource{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 NullableBackupSource) 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 *NullableBackupSource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_backup_source_test.go b/services/iaas/model_backup_source_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_backup_source_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_backup_test.go b/services/iaas/model_backup_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_backup_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_base_security_group_rule.go b/services/iaas/model_base_security_group_rule.go deleted file mode 100644 index 590f95bec2..0000000000 --- a/services/iaas/model_base_security_group_rule.go +++ /dev/null @@ -1,741 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the BaseSecurityGroupRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseSecurityGroupRule{} - -/* - 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 BaseSecurityGroupRuleGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(arg BaseSecurityGroupRuleGetCreatedAtAttributeType) (ret BaseSecurityGroupRuleGetCreatedAtRetType, 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 setBaseSecurityGroupRuleGetCreatedAtAttributeType(arg *BaseSecurityGroupRuleGetCreatedAtAttributeType, val BaseSecurityGroupRuleGetCreatedAtRetType) { - *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 BaseSecurityGroupRuleGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(arg BaseSecurityGroupRuleGetDescriptionAttributeType) (ret BaseSecurityGroupRuleGetDescriptionRetType, 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 setBaseSecurityGroupRuleGetDescriptionAttributeType(arg *BaseSecurityGroupRuleGetDescriptionAttributeType, val BaseSecurityGroupRuleGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetDescriptionRetType = string - -/* - types and functions for direction -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetDirectionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(arg BaseSecurityGroupRuleGetDirectionAttributeType) (ret BaseSecurityGroupRuleGetDirectionRetType, 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 setBaseSecurityGroupRuleGetDirectionAttributeType(arg *BaseSecurityGroupRuleGetDirectionAttributeType, val BaseSecurityGroupRuleGetDirectionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetDirectionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetDirectionRetType = string - -/* - types and functions for ethertype -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetEthertypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(arg BaseSecurityGroupRuleGetEthertypeAttributeType) (ret BaseSecurityGroupRuleGetEthertypeRetType, 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 setBaseSecurityGroupRuleGetEthertypeAttributeType(arg *BaseSecurityGroupRuleGetEthertypeAttributeType, val BaseSecurityGroupRuleGetEthertypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetEthertypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetEthertypeRetType = string - -/* - types and functions for icmpParameters -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIcmpParametersAttributeType = *ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIcmpParametersArgType = ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIcmpParametersRetType = ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(arg BaseSecurityGroupRuleGetIcmpParametersAttributeType) (ret BaseSecurityGroupRuleGetIcmpParametersRetType, 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 setBaseSecurityGroupRuleGetIcmpParametersAttributeType(arg *BaseSecurityGroupRuleGetIcmpParametersAttributeType, val BaseSecurityGroupRuleGetIcmpParametersRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetIdAttributeTypeOk(arg BaseSecurityGroupRuleGetIdAttributeType) (ret BaseSecurityGroupRuleGetIdRetType, 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 setBaseSecurityGroupRuleGetIdAttributeType(arg *BaseSecurityGroupRuleGetIdAttributeType, val BaseSecurityGroupRuleGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIdRetType = string - -/* - types and functions for ipRange -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIpRangeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(arg BaseSecurityGroupRuleGetIpRangeAttributeType) (ret BaseSecurityGroupRuleGetIpRangeRetType, 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 setBaseSecurityGroupRuleGetIpRangeAttributeType(arg *BaseSecurityGroupRuleGetIpRangeAttributeType, val BaseSecurityGroupRuleGetIpRangeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIpRangeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetIpRangeRetType = string - -/* - types and functions for portRange -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetPortRangeAttributeType = *PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetPortRangeArgType = PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetPortRangeRetType = PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(arg BaseSecurityGroupRuleGetPortRangeAttributeType) (ret BaseSecurityGroupRuleGetPortRangeRetType, 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 setBaseSecurityGroupRuleGetPortRangeAttributeType(arg *BaseSecurityGroupRuleGetPortRangeAttributeType, val BaseSecurityGroupRuleGetPortRangeRetType) { - *arg = &val -} - -/* - types and functions for remoteSecurityGroupId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(arg BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType) (ret BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType, 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 setBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType(arg *BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType, val BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetRemoteSecurityGroupIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType = string - -/* - types and functions for securityGroupId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetSecurityGroupIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(arg BaseSecurityGroupRuleGetSecurityGroupIdAttributeType) (ret BaseSecurityGroupRuleGetSecurityGroupIdRetType, 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 setBaseSecurityGroupRuleGetSecurityGroupIdAttributeType(arg *BaseSecurityGroupRuleGetSecurityGroupIdAttributeType, val BaseSecurityGroupRuleGetSecurityGroupIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetSecurityGroupIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetSecurityGroupIdRetType = 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 BaseSecurityGroupRuleGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRuleGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(arg BaseSecurityGroupRuleGetUpdatedAtAttributeType) (ret BaseSecurityGroupRuleGetUpdatedAtRetType, 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 setBaseSecurityGroupRuleGetUpdatedAtAttributeType(arg *BaseSecurityGroupRuleGetUpdatedAtAttributeType, val BaseSecurityGroupRuleGetUpdatedAtRetType) { - *arg = &val -} - -// BaseSecurityGroupRule The base schema for a security group rule. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BaseSecurityGroupRule struct { - // Date-time when resource was created. - CreatedAt BaseSecurityGroupRuleGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description BaseSecurityGroupRuleGetDescriptionAttributeType `json:"description,omitempty"` - // The direction of the traffic which the rule should match. Possible values: `ingress`, `egress`. - // REQUIRED - Direction BaseSecurityGroupRuleGetDirectionAttributeType `json:"direction" required:"true"` - // The ethertype which the rule should match. Possible values: `IPv4`, `IPv6`. - Ethertype BaseSecurityGroupRuleGetEthertypeAttributeType `json:"ethertype,omitempty"` - IcmpParameters BaseSecurityGroupRuleGetIcmpParametersAttributeType `json:"icmpParameters,omitempty"` - // Universally Unique Identifier (UUID). - Id BaseSecurityGroupRuleGetIdAttributeType `json:"id,omitempty"` - // Classless Inter-Domain Routing (CIDR). - IpRange BaseSecurityGroupRuleGetIpRangeAttributeType `json:"ipRange,omitempty"` - PortRange BaseSecurityGroupRuleGetPortRangeAttributeType `json:"portRange,omitempty"` - // Universally Unique Identifier (UUID). - RemoteSecurityGroupId BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType `json:"remoteSecurityGroupId,omitempty"` - // Universally Unique Identifier (UUID). - SecurityGroupId BaseSecurityGroupRuleGetSecurityGroupIdAttributeType `json:"securityGroupId,omitempty"` - // Date-time when resource was last updated. - UpdatedAt BaseSecurityGroupRuleGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _BaseSecurityGroupRule BaseSecurityGroupRule - -// NewBaseSecurityGroupRule instantiates a new BaseSecurityGroupRule 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBaseSecurityGroupRule(direction BaseSecurityGroupRuleGetDirectionArgType) *BaseSecurityGroupRule { - this := BaseSecurityGroupRule{} - setBaseSecurityGroupRuleGetDirectionAttributeType(&this.Direction, direction) - return &this -} - -// NewBaseSecurityGroupRuleWithDefaults instantiates a new BaseSecurityGroupRule 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBaseSecurityGroupRuleWithDefaults() *BaseSecurityGroupRule { - this := BaseSecurityGroupRule{} - var ethertype string = "IPv4" - this.Ethertype = ðertype - 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 *BaseSecurityGroupRule) GetCreatedAt() (res BaseSecurityGroupRuleGetCreatedAtRetType) { - 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 *BaseSecurityGroupRule) GetCreatedAtOk() (ret BaseSecurityGroupRuleGetCreatedAtRetType, ok bool) { - return getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(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 *BaseSecurityGroupRule) 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 *BaseSecurityGroupRule) SetCreatedAt(v BaseSecurityGroupRuleGetCreatedAtRetType) { - setBaseSecurityGroupRuleGetCreatedAtAttributeType(&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 *BaseSecurityGroupRule) GetDescription() (res BaseSecurityGroupRuleGetDescriptionRetType) { - 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 *BaseSecurityGroupRule) GetDescriptionOk() (ret BaseSecurityGroupRuleGetDescriptionRetType, ok bool) { - return getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(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 *BaseSecurityGroupRule) 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 *BaseSecurityGroupRule) SetDescription(v BaseSecurityGroupRuleGetDescriptionRetType) { - setBaseSecurityGroupRuleGetDescriptionAttributeType(&o.Description, v) -} - -// GetDirection returns the Direction field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) GetDirection() (ret BaseSecurityGroupRuleGetDirectionRetType) { - ret, _ = o.GetDirectionOk() - return ret -} - -// GetDirectionOk returns a tuple with the Direction field value -// 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 *BaseSecurityGroupRule) GetDirectionOk() (ret BaseSecurityGroupRuleGetDirectionRetType, ok bool) { - return getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(o.Direction) -} - -// SetDirection sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) SetDirection(v BaseSecurityGroupRuleGetDirectionRetType) { - setBaseSecurityGroupRuleGetDirectionAttributeType(&o.Direction, v) -} - -// GetEthertype returns the Ethertype 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 *BaseSecurityGroupRule) GetEthertype() (res BaseSecurityGroupRuleGetEthertypeRetType) { - res, _ = o.GetEthertypeOk() - return -} - -// GetEthertypeOk returns a tuple with the Ethertype 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 *BaseSecurityGroupRule) GetEthertypeOk() (ret BaseSecurityGroupRuleGetEthertypeRetType, ok bool) { - return getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(o.Ethertype) -} - -// HasEthertype 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 *BaseSecurityGroupRule) HasEthertype() bool { - _, ok := o.GetEthertypeOk() - return ok -} - -// SetEthertype gets a reference to the given string and assigns it to the Ethertype field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) SetEthertype(v BaseSecurityGroupRuleGetEthertypeRetType) { - setBaseSecurityGroupRuleGetEthertypeAttributeType(&o.Ethertype, v) -} - -// GetIcmpParameters returns the IcmpParameters 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 *BaseSecurityGroupRule) GetIcmpParameters() (res BaseSecurityGroupRuleGetIcmpParametersRetType) { - res, _ = o.GetIcmpParametersOk() - return -} - -// GetIcmpParametersOk returns a tuple with the IcmpParameters 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 *BaseSecurityGroupRule) GetIcmpParametersOk() (ret BaseSecurityGroupRuleGetIcmpParametersRetType, ok bool) { - return getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(o.IcmpParameters) -} - -// HasIcmpParameters 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 *BaseSecurityGroupRule) HasIcmpParameters() bool { - _, ok := o.GetIcmpParametersOk() - return ok -} - -// SetIcmpParameters gets a reference to the given ICMPParameters and assigns it to the IcmpParameters field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) SetIcmpParameters(v BaseSecurityGroupRuleGetIcmpParametersRetType) { - setBaseSecurityGroupRuleGetIcmpParametersAttributeType(&o.IcmpParameters, 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 *BaseSecurityGroupRule) GetId() (res BaseSecurityGroupRuleGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *BaseSecurityGroupRule) GetIdOk() (ret BaseSecurityGroupRuleGetIdRetType, ok bool) { - return getBaseSecurityGroupRuleGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *BaseSecurityGroupRule) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) SetId(v BaseSecurityGroupRuleGetIdRetType) { - setBaseSecurityGroupRuleGetIdAttributeType(&o.Id, v) -} - -// GetIpRange returns the IpRange 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 *BaseSecurityGroupRule) GetIpRange() (res BaseSecurityGroupRuleGetIpRangeRetType) { - res, _ = o.GetIpRangeOk() - return -} - -// GetIpRangeOk returns a tuple with the IpRange 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 *BaseSecurityGroupRule) GetIpRangeOk() (ret BaseSecurityGroupRuleGetIpRangeRetType, ok bool) { - return getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(o.IpRange) -} - -// HasIpRange 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 *BaseSecurityGroupRule) HasIpRange() bool { - _, ok := o.GetIpRangeOk() - return ok -} - -// SetIpRange gets a reference to the given string and assigns it to the IpRange field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) SetIpRange(v BaseSecurityGroupRuleGetIpRangeRetType) { - setBaseSecurityGroupRuleGetIpRangeAttributeType(&o.IpRange, v) -} - -// GetPortRange returns the PortRange 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 *BaseSecurityGroupRule) GetPortRange() (res BaseSecurityGroupRuleGetPortRangeRetType) { - res, _ = o.GetPortRangeOk() - return -} - -// GetPortRangeOk returns a tuple with the PortRange 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 *BaseSecurityGroupRule) GetPortRangeOk() (ret BaseSecurityGroupRuleGetPortRangeRetType, ok bool) { - return getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(o.PortRange) -} - -// HasPortRange 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 *BaseSecurityGroupRule) HasPortRange() bool { - _, ok := o.GetPortRangeOk() - return ok -} - -// SetPortRange gets a reference to the given PortRange and assigns it to the PortRange field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) SetPortRange(v BaseSecurityGroupRuleGetPortRangeRetType) { - setBaseSecurityGroupRuleGetPortRangeAttributeType(&o.PortRange, v) -} - -// GetRemoteSecurityGroupId returns the RemoteSecurityGroupId 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 *BaseSecurityGroupRule) GetRemoteSecurityGroupId() (res BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) { - res, _ = o.GetRemoteSecurityGroupIdOk() - return -} - -// GetRemoteSecurityGroupIdOk returns a tuple with the RemoteSecurityGroupId 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 *BaseSecurityGroupRule) GetRemoteSecurityGroupIdOk() (ret BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType, ok bool) { - return getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId) -} - -// HasRemoteSecurityGroupId 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 *BaseSecurityGroupRule) HasRemoteSecurityGroupId() bool { - _, ok := o.GetRemoteSecurityGroupIdOk() - return ok -} - -// SetRemoteSecurityGroupId gets a reference to the given string and assigns it to the RemoteSecurityGroupId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) SetRemoteSecurityGroupId(v BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) { - setBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType(&o.RemoteSecurityGroupId, v) -} - -// GetSecurityGroupId returns the SecurityGroupId 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 *BaseSecurityGroupRule) GetSecurityGroupId() (res BaseSecurityGroupRuleGetSecurityGroupIdRetType) { - res, _ = o.GetSecurityGroupIdOk() - return -} - -// GetSecurityGroupIdOk returns a tuple with the SecurityGroupId 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 *BaseSecurityGroupRule) GetSecurityGroupIdOk() (ret BaseSecurityGroupRuleGetSecurityGroupIdRetType, ok bool) { - return getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId) -} - -// HasSecurityGroupId 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 *BaseSecurityGroupRule) HasSecurityGroupId() bool { - _, ok := o.GetSecurityGroupIdOk() - return ok -} - -// SetSecurityGroupId gets a reference to the given string and assigns it to the SecurityGroupId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BaseSecurityGroupRule) SetSecurityGroupId(v BaseSecurityGroupRuleGetSecurityGroupIdRetType) { - setBaseSecurityGroupRuleGetSecurityGroupIdAttributeType(&o.SecurityGroupId, 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 *BaseSecurityGroupRule) GetUpdatedAt() (res BaseSecurityGroupRuleGetUpdatedAtRetType) { - 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 *BaseSecurityGroupRule) GetUpdatedAtOk() (ret BaseSecurityGroupRuleGetUpdatedAtRetType, ok bool) { - return getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(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 *BaseSecurityGroupRule) 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 *BaseSecurityGroupRule) SetUpdatedAt(v BaseSecurityGroupRuleGetUpdatedAtRetType) { - setBaseSecurityGroupRuleGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o BaseSecurityGroupRule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(o.Direction); ok { - toSerialize["Direction"] = val - } - if val, ok := getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(o.Ethertype); ok { - toSerialize["Ethertype"] = val - } - if val, ok := getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(o.IcmpParameters); ok { - toSerialize["IcmpParameters"] = val - } - if val, ok := getBaseSecurityGroupRuleGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(o.IpRange); ok { - toSerialize["IpRange"] = val - } - if val, ok := getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(o.PortRange); ok { - toSerialize["PortRange"] = val - } - if val, ok := getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId); ok { - toSerialize["RemoteSecurityGroupId"] = val - } - if val, ok := getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId); ok { - toSerialize["SecurityGroupId"] = val - } - if val, ok := getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBaseSecurityGroupRule struct { - value *BaseSecurityGroupRule - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBaseSecurityGroupRule) Get() *BaseSecurityGroupRule { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBaseSecurityGroupRule) Set(val *BaseSecurityGroupRule) { - 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 NullableBaseSecurityGroupRule) 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 *NullableBaseSecurityGroupRule) 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 NewNullableBaseSecurityGroupRule(val *BaseSecurityGroupRule) *NullableBaseSecurityGroupRule { - return &NullableBaseSecurityGroupRule{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 NullableBaseSecurityGroupRule) 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 *NullableBaseSecurityGroupRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_base_security_group_rule_test.go b/services/iaas/model_base_security_group_rule_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_base_security_group_rule_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_boot_volume.go b/services/iaas/model_boot_volume.go deleted file mode 100644 index ad0feac6eb..0000000000 --- a/services/iaas/model_boot_volume.go +++ /dev/null @@ -1,387 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the BootVolume type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BootVolume{} - -/* - types and functions for deleteOnTermination -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumegetDeleteOnTerminationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumegetDeleteOnTerminationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumegetDeleteOnTerminationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBootVolumegetDeleteOnTerminationAttributeTypeOk(arg BootVolumegetDeleteOnTerminationAttributeType) (ret BootVolumegetDeleteOnTerminationRetType, 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 setBootVolumegetDeleteOnTerminationAttributeType(arg *BootVolumegetDeleteOnTerminationAttributeType, val BootVolumegetDeleteOnTerminationRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBootVolumeGetIdAttributeTypeOk(arg BootVolumeGetIdAttributeType) (ret BootVolumeGetIdRetType, 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 setBootVolumeGetIdAttributeType(arg *BootVolumeGetIdAttributeType, val BootVolumeGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetIdRetType = string - -/* - types and functions for performanceClass -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetPerformanceClassAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBootVolumeGetPerformanceClassAttributeTypeOk(arg BootVolumeGetPerformanceClassAttributeType) (ret BootVolumeGetPerformanceClassRetType, 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 setBootVolumeGetPerformanceClassAttributeType(arg *BootVolumeGetPerformanceClassAttributeType, val BootVolumeGetPerformanceClassRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetPerformanceClassArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetPerformanceClassRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBootVolumeGetSizeAttributeTypeOk(arg BootVolumeGetSizeAttributeType) (ret BootVolumeGetSizeRetType, 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 setBootVolumeGetSizeAttributeType(arg *BootVolumeGetSizeAttributeType, val BootVolumeGetSizeRetType) { - *arg = &val -} - -/* - types and functions for source -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetSourceAttributeType = *BootVolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetSourceArgType = BootVolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeGetSourceRetType = BootVolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBootVolumeGetSourceAttributeTypeOk(arg BootVolumeGetSourceAttributeType) (ret BootVolumeGetSourceRetType, 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 setBootVolumeGetSourceAttributeType(arg *BootVolumeGetSourceAttributeType, val BootVolumeGetSourceRetType) { - *arg = &val -} - -// BootVolume The boot device for the server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolume struct { - // Delete the volume during the termination of the server. Defaults to false. - DeleteOnTermination BootVolumegetDeleteOnTerminationAttributeType `json:"deleteOnTermination,omitempty"` - // Universally Unique Identifier (UUID). - Id BootVolumeGetIdAttributeType `json:"id,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass BootVolumeGetPerformanceClassAttributeType `json:"performanceClass,omitempty"` - // Size in Gigabyte. - Size BootVolumeGetSizeAttributeType `json:"size,omitempty"` - Source BootVolumeGetSourceAttributeType `json:"source,omitempty"` -} - -// NewBootVolume instantiates a new BootVolume 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBootVolume() *BootVolume { - this := BootVolume{} - return &this -} - -// NewBootVolumeWithDefaults instantiates a new BootVolume 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBootVolumeWithDefaults() *BootVolume { - this := BootVolume{} - return &this -} - -// GetDeleteOnTermination returns the DeleteOnTermination 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 *BootVolume) GetDeleteOnTermination() (res BootVolumegetDeleteOnTerminationRetType) { - res, _ = o.GetDeleteOnTerminationOk() - return -} - -// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination 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 *BootVolume) GetDeleteOnTerminationOk() (ret BootVolumegetDeleteOnTerminationRetType, ok bool) { - return getBootVolumegetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination) -} - -// HasDeleteOnTermination 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 *BootVolume) HasDeleteOnTermination() bool { - _, ok := o.GetDeleteOnTerminationOk() - return ok -} - -// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolume) SetDeleteOnTermination(v BootVolumegetDeleteOnTerminationRetType) { - setBootVolumegetDeleteOnTerminationAttributeType(&o.DeleteOnTermination, 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 *BootVolume) GetId() (res BootVolumeGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *BootVolume) GetIdOk() (ret BootVolumeGetIdRetType, ok bool) { - return getBootVolumeGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *BootVolume) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolume) SetId(v BootVolumeGetIdRetType) { - setBootVolumeGetIdAttributeType(&o.Id, v) -} - -// GetPerformanceClass returns the PerformanceClass 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 *BootVolume) GetPerformanceClass() (res BootVolumeGetPerformanceClassRetType) { - res, _ = o.GetPerformanceClassOk() - return -} - -// GetPerformanceClassOk returns a tuple with the PerformanceClass 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 *BootVolume) GetPerformanceClassOk() (ret BootVolumeGetPerformanceClassRetType, ok bool) { - return getBootVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass) -} - -// HasPerformanceClass 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 *BootVolume) HasPerformanceClass() bool { - _, ok := o.GetPerformanceClassOk() - return ok -} - -// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolume) SetPerformanceClass(v BootVolumeGetPerformanceClassRetType) { - setBootVolumeGetPerformanceClassAttributeType(&o.PerformanceClass, v) -} - -// GetSize returns the Size 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 *BootVolume) GetSize() (res BootVolumeGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *BootVolume) GetSizeOk() (ret BootVolumeGetSizeRetType, ok bool) { - return getBootVolumeGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *BootVolume) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolume) SetSize(v BootVolumeGetSizeRetType) { - setBootVolumeGetSizeAttributeType(&o.Size, v) -} - -// GetSource returns the Source 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 *BootVolume) GetSource() (res BootVolumeGetSourceRetType) { - res, _ = o.GetSourceOk() - return -} - -// GetSourceOk returns a tuple with the Source 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 *BootVolume) GetSourceOk() (ret BootVolumeGetSourceRetType, ok bool) { - return getBootVolumeGetSourceAttributeTypeOk(o.Source) -} - -// HasSource 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 *BootVolume) HasSource() bool { - _, ok := o.GetSourceOk() - return ok -} - -// SetSource gets a reference to the given BootVolumeSource and assigns it to the Source field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolume) SetSource(v BootVolumeGetSourceRetType) { - setBootVolumeGetSourceAttributeType(&o.Source, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o BootVolume) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBootVolumegetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination); ok { - toSerialize["DeleteOnTermination"] = val - } - if val, ok := getBootVolumeGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getBootVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok { - toSerialize["PerformanceClass"] = val - } - if val, ok := getBootVolumeGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getBootVolumeGetSourceAttributeTypeOk(o.Source); ok { - toSerialize["Source"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBootVolume struct { - value *BootVolume - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBootVolume) Get() *BootVolume { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBootVolume) Set(val *BootVolume) { - 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 NullableBootVolume) 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 *NullableBootVolume) 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 NewNullableBootVolume(val *BootVolume) *NullableBootVolume { - return &NullableBootVolume{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 NullableBootVolume) 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 *NullableBootVolume) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_boot_volume_source.go b/services/iaas/model_boot_volume_source.go deleted file mode 100644 index 93842aa4a9..0000000000 --- a/services/iaas/model_boot_volume_source.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the BootVolumeSource type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BootVolumeSource{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeSourceGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBootVolumeSourceGetIdAttributeTypeOk(arg BootVolumeSourceGetIdAttributeType) (ret BootVolumeSourceGetIdRetType, 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 setBootVolumeSourceGetIdAttributeType(arg *BootVolumeSourceGetIdAttributeType, val BootVolumeSourceGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeSourceGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeSourceGetIdRetType = string - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeSourceGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBootVolumeSourceGetTypeAttributeTypeOk(arg BootVolumeSourceGetTypeAttributeType) (ret BootVolumeSourceGetTypeRetType, 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 setBootVolumeSourceGetTypeAttributeType(arg *BootVolumeSourceGetTypeAttributeType, val BootVolumeSourceGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeSourceGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeSourceGetTypeRetType = string - -// BootVolumeSource struct for BootVolumeSource -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BootVolumeSource struct { - // Universally Unique Identifier (UUID). - // REQUIRED - Id BootVolumeSourceGetIdAttributeType `json:"id" required:"true"` - // The source types of a boot volume. Possible values: `image`, `volume`. - // REQUIRED - Type BootVolumeSourceGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _BootVolumeSource BootVolumeSource - -// NewBootVolumeSource instantiates a new BootVolumeSource 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBootVolumeSource(id BootVolumeSourceGetIdArgType, types BootVolumeSourceGetTypeArgType) *BootVolumeSource { - this := BootVolumeSource{} - setBootVolumeSourceGetIdAttributeType(&this.Id, id) - setBootVolumeSourceGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewBootVolumeSourceWithDefaults instantiates a new BootVolumeSource 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBootVolumeSourceWithDefaults() *BootVolumeSource { - this := BootVolumeSource{} - return &this -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolumeSource) GetId() (ret BootVolumeSourceGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// 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 *BootVolumeSource) GetIdOk() (ret BootVolumeSourceGetIdRetType, ok bool) { - return getBootVolumeSourceGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolumeSource) SetId(v BootVolumeSourceGetIdRetType) { - setBootVolumeSourceGetIdAttributeType(&o.Id, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolumeSource) GetType() (ret BootVolumeSourceGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *BootVolumeSource) GetTypeOk() (ret BootVolumeSourceGetTypeRetType, ok bool) { - return getBootVolumeSourceGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BootVolumeSource) SetType(v BootVolumeSourceGetTypeRetType) { - setBootVolumeSourceGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o BootVolumeSource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBootVolumeSourceGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getBootVolumeSourceGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBootVolumeSource struct { - value *BootVolumeSource - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBootVolumeSource) Get() *BootVolumeSource { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBootVolumeSource) Set(val *BootVolumeSource) { - 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 NullableBootVolumeSource) 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 *NullableBootVolumeSource) 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 NewNullableBootVolumeSource(val *BootVolumeSource) *NullableBootVolumeSource { - return &NullableBootVolumeSource{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 NullableBootVolumeSource) 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 *NullableBootVolumeSource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_boot_volume_source_test.go b/services/iaas/model_boot_volume_source_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_boot_volume_source_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_boot_volume_test.go b/services/iaas/model_boot_volume_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_boot_volume_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_affinity_group_payload.go b/services/iaas/model_create_affinity_group_payload.go deleted file mode 100644 index 8566558553..0000000000 --- a/services/iaas/model_create_affinity_group_payload.go +++ /dev/null @@ -1,322 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateAffinityGroupPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateAffinityGroupPayload{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAffinityGroupPayloadGetIdAttributeTypeOk(arg CreateAffinityGroupPayloadGetIdAttributeType) (ret CreateAffinityGroupPayloadGetIdRetType, 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 setCreateAffinityGroupPayloadGetIdAttributeType(arg *CreateAffinityGroupPayloadGetIdAttributeType, val CreateAffinityGroupPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetIdRetType = string - -/* - types and functions for members -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetMembersAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetMembersArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetMembersRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAffinityGroupPayloadGetMembersAttributeTypeOk(arg CreateAffinityGroupPayloadGetMembersAttributeType) (ret CreateAffinityGroupPayloadGetMembersRetType, 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 setCreateAffinityGroupPayloadGetMembersAttributeType(arg *CreateAffinityGroupPayloadGetMembersAttributeType, val CreateAffinityGroupPayloadGetMembersRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAffinityGroupPayloadGetNameAttributeTypeOk(arg CreateAffinityGroupPayloadGetNameAttributeType) (ret CreateAffinityGroupPayloadGetNameRetType, 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 setCreateAffinityGroupPayloadGetNameAttributeType(arg *CreateAffinityGroupPayloadGetNameAttributeType, val CreateAffinityGroupPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetNameRetType = string - -/* - types and functions for policy -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetPolicyAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAffinityGroupPayloadGetPolicyAttributeTypeOk(arg CreateAffinityGroupPayloadGetPolicyAttributeType) (ret CreateAffinityGroupPayloadGetPolicyRetType, 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 setCreateAffinityGroupPayloadGetPolicyAttributeType(arg *CreateAffinityGroupPayloadGetPolicyAttributeType, val CreateAffinityGroupPayloadGetPolicyRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetPolicyArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayloadGetPolicyRetType = string - -// CreateAffinityGroupPayload Definition of an affinity group. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAffinityGroupPayload struct { - // Universally Unique Identifier (UUID). - Id CreateAffinityGroupPayloadGetIdAttributeType `json:"id,omitempty"` - // The servers that are part of the affinity group. - Members CreateAffinityGroupPayloadGetMembersAttributeType `json:"members,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name CreateAffinityGroupPayloadGetNameAttributeType `json:"name" required:"true"` - // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. - // REQUIRED - Policy CreateAffinityGroupPayloadGetPolicyAttributeType `json:"policy" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateAffinityGroupPayload CreateAffinityGroupPayload - -// NewCreateAffinityGroupPayload instantiates a new CreateAffinityGroupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateAffinityGroupPayload(name CreateAffinityGroupPayloadGetNameArgType, policy CreateAffinityGroupPayloadGetPolicyArgType) *CreateAffinityGroupPayload { - this := CreateAffinityGroupPayload{} - setCreateAffinityGroupPayloadGetNameAttributeType(&this.Name, name) - setCreateAffinityGroupPayloadGetPolicyAttributeType(&this.Policy, policy) - return &this -} - -// NewCreateAffinityGroupPayloadWithDefaults instantiates a new CreateAffinityGroupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateAffinityGroupPayloadWithDefaults() *CreateAffinityGroupPayload { - this := CreateAffinityGroupPayload{} - return &this -} - -// 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 *CreateAffinityGroupPayload) GetId() (res CreateAffinityGroupPayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *CreateAffinityGroupPayload) GetIdOk() (ret CreateAffinityGroupPayloadGetIdRetType, ok bool) { - return getCreateAffinityGroupPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *CreateAffinityGroupPayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAffinityGroupPayload) SetId(v CreateAffinityGroupPayloadGetIdRetType) { - setCreateAffinityGroupPayloadGetIdAttributeType(&o.Id, v) -} - -// GetMembers returns the Members 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 *CreateAffinityGroupPayload) GetMembers() (res CreateAffinityGroupPayloadGetMembersRetType) { - res, _ = o.GetMembersOk() - return -} - -// GetMembersOk returns a tuple with the Members 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 *CreateAffinityGroupPayload) GetMembersOk() (ret CreateAffinityGroupPayloadGetMembersRetType, ok bool) { - return getCreateAffinityGroupPayloadGetMembersAttributeTypeOk(o.Members) -} - -// HasMembers 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 *CreateAffinityGroupPayload) HasMembers() bool { - _, ok := o.GetMembersOk() - return ok -} - -// SetMembers gets a reference to the given []string and assigns it to the Members field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAffinityGroupPayload) SetMembers(v CreateAffinityGroupPayloadGetMembersRetType) { - setCreateAffinityGroupPayloadGetMembersAttributeType(&o.Members, 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 *CreateAffinityGroupPayload) GetName() (ret CreateAffinityGroupPayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *CreateAffinityGroupPayload) GetNameOk() (ret CreateAffinityGroupPayloadGetNameRetType, ok bool) { - return getCreateAffinityGroupPayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAffinityGroupPayload) SetName(v CreateAffinityGroupPayloadGetNameRetType) { - setCreateAffinityGroupPayloadGetNameAttributeType(&o.Name, v) -} - -// GetPolicy returns the Policy field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAffinityGroupPayload) GetPolicy() (ret CreateAffinityGroupPayloadGetPolicyRetType) { - ret, _ = o.GetPolicyOk() - return ret -} - -// GetPolicyOk returns a tuple with the Policy field value -// 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 *CreateAffinityGroupPayload) GetPolicyOk() (ret CreateAffinityGroupPayloadGetPolicyRetType, ok bool) { - return getCreateAffinityGroupPayloadGetPolicyAttributeTypeOk(o.Policy) -} - -// SetPolicy sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAffinityGroupPayload) SetPolicy(v CreateAffinityGroupPayloadGetPolicyRetType) { - setCreateAffinityGroupPayloadGetPolicyAttributeType(&o.Policy, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateAffinityGroupPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateAffinityGroupPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateAffinityGroupPayloadGetMembersAttributeTypeOk(o.Members); ok { - toSerialize["Members"] = val - } - if val, ok := getCreateAffinityGroupPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateAffinityGroupPayloadGetPolicyAttributeTypeOk(o.Policy); ok { - toSerialize["Policy"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateAffinityGroupPayload struct { - value *CreateAffinityGroupPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateAffinityGroupPayload) Get() *CreateAffinityGroupPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateAffinityGroupPayload) Set(val *CreateAffinityGroupPayload) { - 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 NullableCreateAffinityGroupPayload) 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 *NullableCreateAffinityGroupPayload) 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 NewNullableCreateAffinityGroupPayload(val *CreateAffinityGroupPayload) *NullableCreateAffinityGroupPayload { - return &NullableCreateAffinityGroupPayload{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 NullableCreateAffinityGroupPayload) 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 *NullableCreateAffinityGroupPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_affinity_group_payload_test.go b/services/iaas/model_create_affinity_group_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_affinity_group_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_backup_payload.go b/services/iaas/model_create_backup_payload.go deleted file mode 100644 index 8f2f7c2599..0000000000 --- a/services/iaas/model_create_backup_payload.go +++ /dev/null @@ -1,326 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateBackupPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateBackupPayload{} - -/* - 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 CreateBackupPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateBackupPayloadGetDescriptionAttributeTypeOk(arg CreateBackupPayloadGetDescriptionAttributeType) (ret CreateBackupPayloadGetDescriptionRetType, 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 setCreateBackupPayloadGetDescriptionAttributeType(arg *CreateBackupPayloadGetDescriptionAttributeType, val CreateBackupPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetDescriptionRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateBackupPayloadGetLabelsAttributeTypeOk(arg CreateBackupPayloadGetLabelsAttributeType) (ret CreateBackupPayloadGetLabelsRetType, 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 setCreateBackupPayloadGetLabelsAttributeType(arg *CreateBackupPayloadGetLabelsAttributeType, val CreateBackupPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateBackupPayloadGetNameAttributeTypeOk(arg CreateBackupPayloadGetNameAttributeType) (ret CreateBackupPayloadGetNameRetType, 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 setCreateBackupPayloadGetNameAttributeType(arg *CreateBackupPayloadGetNameAttributeType, val CreateBackupPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetNameRetType = string - -/* - types and functions for source -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetSourceAttributeType = *BackupSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetSourceArgType = BackupSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateBackupPayloadGetSourceRetType = BackupSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateBackupPayloadGetSourceAttributeTypeOk(arg CreateBackupPayloadGetSourceAttributeType) (ret CreateBackupPayloadGetSourceRetType, 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 setCreateBackupPayloadGetSourceAttributeType(arg *CreateBackupPayloadGetSourceAttributeType, val CreateBackupPayloadGetSourceRetType) { - *arg = &val -} - -// CreateBackupPayload Object that represents a backup create request body. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. - Labels CreateBackupPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name CreateBackupPayloadGetNameAttributeType `json:"name,omitempty"` - // REQUIRED - Source CreateBackupPayloadGetSourceAttributeType `json:"source" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateBackupPayload CreateBackupPayload - -// NewCreateBackupPayload instantiates a new CreateBackupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateBackupPayload(source CreateBackupPayloadGetSourceArgType) *CreateBackupPayload { - this := CreateBackupPayload{} - setCreateBackupPayloadGetSourceAttributeType(&this.Source, source) - return &this -} - -// NewCreateBackupPayloadWithDefaults instantiates a new CreateBackupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateBackupPayloadWithDefaults() *CreateBackupPayload { - this := CreateBackupPayload{} - 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 *CreateBackupPayload) GetDescription() (res CreateBackupPayloadGetDescriptionRetType) { - 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 *CreateBackupPayload) GetDescriptionOk() (ret CreateBackupPayloadGetDescriptionRetType, ok bool) { - return getCreateBackupPayloadGetDescriptionAttributeTypeOk(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 *CreateBackupPayload) 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 *CreateBackupPayload) SetDescription(v CreateBackupPayloadGetDescriptionRetType) { - setCreateBackupPayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateBackupPayload) GetLabels() (res CreateBackupPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateBackupPayload) GetLabelsOk() (ret CreateBackupPayloadGetLabelsRetType, ok bool) { - return getCreateBackupPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateBackupPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateBackupPayload) SetLabels(v CreateBackupPayloadGetLabelsRetType) { - setCreateBackupPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateBackupPayload) GetName() (res CreateBackupPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *CreateBackupPayload) GetNameOk() (ret CreateBackupPayloadGetNameRetType, ok bool) { - return getCreateBackupPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *CreateBackupPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateBackupPayload) SetName(v CreateBackupPayloadGetNameRetType) { - setCreateBackupPayloadGetNameAttributeType(&o.Name, v) -} - -// GetSource returns the Source field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateBackupPayload) GetSource() (ret CreateBackupPayloadGetSourceRetType) { - ret, _ = o.GetSourceOk() - return ret -} - -// GetSourceOk returns a tuple with the Source field value -// 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 *CreateBackupPayload) GetSourceOk() (ret CreateBackupPayloadGetSourceRetType, ok bool) { - return getCreateBackupPayloadGetSourceAttributeTypeOk(o.Source) -} - -// SetSource sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateBackupPayload) SetSource(v CreateBackupPayloadGetSourceRetType) { - setCreateBackupPayloadGetSourceAttributeType(&o.Source, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateBackupPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateBackupPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCreateBackupPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateBackupPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateBackupPayloadGetSourceAttributeTypeOk(o.Source); ok { - toSerialize["Source"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateBackupPayload struct { - value *CreateBackupPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateBackupPayload) Get() *CreateBackupPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateBackupPayload) Set(val *CreateBackupPayload) { - 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 NullableCreateBackupPayload) 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 *NullableCreateBackupPayload) 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 NewNullableCreateBackupPayload(val *CreateBackupPayload) *NullableCreateBackupPayload { - return &NullableCreateBackupPayload{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 NullableCreateBackupPayload) 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 *NullableCreateBackupPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_backup_payload_test.go b/services/iaas/model_create_backup_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_backup_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_image_payload.go b/services/iaas/model_create_image_payload.go deleted file mode 100644 index 72143da246..0000000000 --- a/services/iaas/model_create_image_payload.go +++ /dev/null @@ -1,1087 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the CreateImagePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateImagePayload{} - -/* - types and functions for agent -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetAgentAttributeType = *ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetAgentArgType = ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetAgentRetType = ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetAgentAttributeTypeOk(arg CreateImagePayloadGetAgentAttributeType) (ret CreateImagePayloadGetAgentRetType, 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 setCreateImagePayloadGetAgentAttributeType(arg *CreateImagePayloadGetAgentAttributeType, val CreateImagePayloadGetAgentRetType) { - *arg = &val -} - -/* - types and functions for checksum -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetChecksumAttributeType = *ImageChecksum - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetChecksumArgType = ImageChecksum - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetChecksumRetType = ImageChecksum - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetChecksumAttributeTypeOk(arg CreateImagePayloadGetChecksumAttributeType) (ret CreateImagePayloadGetChecksumRetType, 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 setCreateImagePayloadGetChecksumAttributeType(arg *CreateImagePayloadGetChecksumAttributeType, val CreateImagePayloadGetChecksumRetType) { - *arg = &val -} - -/* - types and functions for config -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetConfigAttributeType = *ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetConfigArgType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetConfigRetType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetConfigAttributeTypeOk(arg CreateImagePayloadGetConfigAttributeType) (ret CreateImagePayloadGetConfigRetType, 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 setCreateImagePayloadGetConfigAttributeType(arg *CreateImagePayloadGetConfigAttributeType, val CreateImagePayloadGetConfigRetType) { - *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 CreateImagePayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetCreatedAtAttributeTypeOk(arg CreateImagePayloadGetCreatedAtAttributeType) (ret CreateImagePayloadGetCreatedAtRetType, 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 setCreateImagePayloadGetCreatedAtAttributeType(arg *CreateImagePayloadGetCreatedAtAttributeType, val CreateImagePayloadGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for diskFormat -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetDiskFormatAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetDiskFormatAttributeTypeOk(arg CreateImagePayloadGetDiskFormatAttributeType) (ret CreateImagePayloadGetDiskFormatRetType, 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 setCreateImagePayloadGetDiskFormatAttributeType(arg *CreateImagePayloadGetDiskFormatAttributeType, val CreateImagePayloadGetDiskFormatRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetDiskFormatArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetDiskFormatRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetIdAttributeTypeOk(arg CreateImagePayloadGetIdAttributeType) (ret CreateImagePayloadGetIdRetType, 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 setCreateImagePayloadGetIdAttributeType(arg *CreateImagePayloadGetIdAttributeType, val CreateImagePayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetIdRetType = string - -/* - types and functions for importProgress -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetImportProgressAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetImportProgressArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetImportProgressRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetImportProgressAttributeTypeOk(arg CreateImagePayloadGetImportProgressAttributeType) (ret CreateImagePayloadGetImportProgressRetType, 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 setCreateImagePayloadGetImportProgressAttributeType(arg *CreateImagePayloadGetImportProgressAttributeType, val CreateImagePayloadGetImportProgressRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetLabelsAttributeTypeOk(arg CreateImagePayloadGetLabelsAttributeType) (ret CreateImagePayloadGetLabelsRetType, 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 setCreateImagePayloadGetLabelsAttributeType(arg *CreateImagePayloadGetLabelsAttributeType, val CreateImagePayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for minDiskSize -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetMinDiskSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetMinDiskSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetMinDiskSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(arg CreateImagePayloadGetMinDiskSizeAttributeType) (ret CreateImagePayloadGetMinDiskSizeRetType, 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 setCreateImagePayloadGetMinDiskSizeAttributeType(arg *CreateImagePayloadGetMinDiskSizeAttributeType, val CreateImagePayloadGetMinDiskSizeRetType) { - *arg = &val -} - -/* - types and functions for minRam -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetMinRamAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetMinRamArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetMinRamRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetMinRamAttributeTypeOk(arg CreateImagePayloadGetMinRamAttributeType) (ret CreateImagePayloadGetMinRamRetType, 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 setCreateImagePayloadGetMinRamAttributeType(arg *CreateImagePayloadGetMinRamAttributeType, val CreateImagePayloadGetMinRamRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetNameAttributeTypeOk(arg CreateImagePayloadGetNameAttributeType) (ret CreateImagePayloadGetNameRetType, 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 setCreateImagePayloadGetNameAttributeType(arg *CreateImagePayloadGetNameAttributeType, val CreateImagePayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetNameRetType = string - -/* - types and functions for owner -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetOwnerAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetOwnerAttributeTypeOk(arg CreateImagePayloadGetOwnerAttributeType) (ret CreateImagePayloadGetOwnerRetType, 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 setCreateImagePayloadGetOwnerAttributeType(arg *CreateImagePayloadGetOwnerAttributeType, val CreateImagePayloadGetOwnerRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetOwnerArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetOwnerRetType = string - -/* - types and functions for protected -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadgetProtectedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadgetProtectedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadgetProtectedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadgetProtectedAttributeTypeOk(arg CreateImagePayloadgetProtectedAttributeType) (ret CreateImagePayloadgetProtectedRetType, 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 setCreateImagePayloadgetProtectedAttributeType(arg *CreateImagePayloadgetProtectedAttributeType, val CreateImagePayloadgetProtectedRetType) { - *arg = &val -} - -/* - types and functions for scope -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetScopeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetScopeAttributeTypeOk(arg CreateImagePayloadGetScopeAttributeType) (ret CreateImagePayloadGetScopeRetType, 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 setCreateImagePayloadGetScopeAttributeType(arg *CreateImagePayloadGetScopeAttributeType, val CreateImagePayloadGetScopeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetScopeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetScopeRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetSizeAttributeTypeOk(arg CreateImagePayloadGetSizeAttributeType) (ret CreateImagePayloadGetSizeRetType, 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 setCreateImagePayloadGetSizeAttributeType(arg *CreateImagePayloadGetSizeAttributeType, val CreateImagePayloadGetSizeRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetStatusAttributeTypeOk(arg CreateImagePayloadGetStatusAttributeType) (ret CreateImagePayloadGetStatusRetType, 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 setCreateImagePayloadGetStatusAttributeType(arg *CreateImagePayloadGetStatusAttributeType, val CreateImagePayloadGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetStatusRetType = 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 CreateImagePayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateImagePayloadGetUpdatedAtAttributeTypeOk(arg CreateImagePayloadGetUpdatedAtAttributeType) (ret CreateImagePayloadGetUpdatedAtRetType, 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 setCreateImagePayloadGetUpdatedAtAttributeType(arg *CreateImagePayloadGetUpdatedAtAttributeType, val CreateImagePayloadGetUpdatedAtRetType) { - *arg = &val -} - -// CreateImagePayload Object that represents an Image and its parameters. Used for Creating and returning (get/list). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateImagePayload struct { - Agent CreateImagePayloadGetAgentAttributeType `json:"agent,omitempty"` - Checksum CreateImagePayloadGetChecksumAttributeType `json:"checksum,omitempty"` - Config CreateImagePayloadGetConfigAttributeType `json:"config,omitempty"` - // Date-time when resource was created. - CreatedAt CreateImagePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. - // REQUIRED - DiskFormat CreateImagePayloadGetDiskFormatAttributeType `json:"diskFormat" required:"true"` - // Universally Unique Identifier (UUID). - 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. - Labels CreateImagePayloadGetLabelsAttributeType `json:"labels,omitempty"` - // Size in Gigabyte. - MinDiskSize CreateImagePayloadGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"` - // Size in Megabyte. - MinRam CreateImagePayloadGetMinRamAttributeType `json:"minRam,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name CreateImagePayloadGetNameAttributeType `json:"name" required:"true"` - // Universally Unique Identifier (UUID). - Owner CreateImagePayloadGetOwnerAttributeType `json:"owner,omitempty"` - // When true the image is prevented from being deleted. - Protected CreateImagePayloadgetProtectedAttributeType `json:"protected,omitempty"` - // Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`. - Scope CreateImagePayloadGetScopeAttributeType `json:"scope,omitempty"` - // Size in bytes. - Size CreateImagePayloadGetSizeAttributeType `json:"size,omitempty"` - // The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`. - Status CreateImagePayloadGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt CreateImagePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateImagePayload CreateImagePayload - -// NewCreateImagePayload instantiates a new CreateImagePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateImagePayload(diskFormat CreateImagePayloadGetDiskFormatArgType, name CreateImagePayloadGetNameArgType) *CreateImagePayload { - this := CreateImagePayload{} - setCreateImagePayloadGetDiskFormatAttributeType(&this.DiskFormat, diskFormat) - setCreateImagePayloadGetNameAttributeType(&this.Name, name) - return &this -} - -// NewCreateImagePayloadWithDefaults instantiates a new CreateImagePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateImagePayloadWithDefaults() *CreateImagePayload { - this := CreateImagePayload{} - return &this -} - -// GetAgent returns the Agent 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 *CreateImagePayload) GetAgent() (res CreateImagePayloadGetAgentRetType) { - res, _ = o.GetAgentOk() - return -} - -// GetAgentOk returns a tuple with the Agent 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 *CreateImagePayload) GetAgentOk() (ret CreateImagePayloadGetAgentRetType, ok bool) { - return getCreateImagePayloadGetAgentAttributeTypeOk(o.Agent) -} - -// HasAgent 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 *CreateImagePayload) HasAgent() bool { - _, ok := o.GetAgentOk() - return ok -} - -// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetAgent(v CreateImagePayloadGetAgentRetType) { - setCreateImagePayloadGetAgentAttributeType(&o.Agent, v) -} - -// GetChecksum returns the Checksum 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 *CreateImagePayload) GetChecksum() (res CreateImagePayloadGetChecksumRetType) { - res, _ = o.GetChecksumOk() - return -} - -// GetChecksumOk returns a tuple with the Checksum 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 *CreateImagePayload) GetChecksumOk() (ret CreateImagePayloadGetChecksumRetType, ok bool) { - return getCreateImagePayloadGetChecksumAttributeTypeOk(o.Checksum) -} - -// HasChecksum 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 *CreateImagePayload) HasChecksum() bool { - _, ok := o.GetChecksumOk() - return ok -} - -// SetChecksum gets a reference to the given ImageChecksum and assigns it to the Checksum field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetChecksum(v CreateImagePayloadGetChecksumRetType) { - setCreateImagePayloadGetChecksumAttributeType(&o.Checksum, v) -} - -// GetConfig returns the Config 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 *CreateImagePayload) GetConfig() (res CreateImagePayloadGetConfigRetType) { - res, _ = o.GetConfigOk() - return -} - -// GetConfigOk returns a tuple with the Config 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 *CreateImagePayload) GetConfigOk() (ret CreateImagePayloadGetConfigRetType, ok bool) { - return getCreateImagePayloadGetConfigAttributeTypeOk(o.Config) -} - -// HasConfig 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 *CreateImagePayload) HasConfig() bool { - _, ok := o.GetConfigOk() - return ok -} - -// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetConfig(v CreateImagePayloadGetConfigRetType) { - setCreateImagePayloadGetConfigAttributeType(&o.Config, 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 *CreateImagePayload) GetCreatedAt() (res CreateImagePayloadGetCreatedAtRetType) { - 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 *CreateImagePayload) GetCreatedAtOk() (ret CreateImagePayloadGetCreatedAtRetType, ok bool) { - return getCreateImagePayloadGetCreatedAtAttributeTypeOk(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 *CreateImagePayload) 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 *CreateImagePayload) SetCreatedAt(v CreateImagePayloadGetCreatedAtRetType) { - setCreateImagePayloadGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetDiskFormat returns the DiskFormat field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) GetDiskFormat() (ret CreateImagePayloadGetDiskFormatRetType) { - ret, _ = o.GetDiskFormatOk() - return ret -} - -// GetDiskFormatOk returns a tuple with the DiskFormat field value -// 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 *CreateImagePayload) GetDiskFormatOk() (ret CreateImagePayloadGetDiskFormatRetType, ok bool) { - return getCreateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat) -} - -// SetDiskFormat sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetDiskFormat(v CreateImagePayloadGetDiskFormatRetType) { - setCreateImagePayloadGetDiskFormatAttributeType(&o.DiskFormat, 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 *CreateImagePayload) GetId() (res CreateImagePayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *CreateImagePayload) GetIdOk() (ret CreateImagePayloadGetIdRetType, ok bool) { - return getCreateImagePayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *CreateImagePayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetId(v CreateImagePayloadGetIdRetType) { - setCreateImagePayloadGetIdAttributeType(&o.Id, v) -} - -// GetImportProgress returns the ImportProgress 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 *CreateImagePayload) GetImportProgress() (res CreateImagePayloadGetImportProgressRetType) { - res, _ = o.GetImportProgressOk() - return -} - -// GetImportProgressOk returns a tuple with the ImportProgress 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 *CreateImagePayload) GetImportProgressOk() (ret CreateImagePayloadGetImportProgressRetType, ok bool) { - return getCreateImagePayloadGetImportProgressAttributeTypeOk(o.ImportProgress) -} - -// HasImportProgress 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 *CreateImagePayload) HasImportProgress() bool { - _, ok := o.GetImportProgressOk() - return ok -} - -// SetImportProgress gets a reference to the given int64 and assigns it to the ImportProgress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetImportProgress(v CreateImagePayloadGetImportProgressRetType) { - setCreateImagePayloadGetImportProgressAttributeType(&o.ImportProgress, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) GetLabels() (res CreateImagePayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) GetLabelsOk() (ret CreateImagePayloadGetLabelsRetType, ok bool) { - return getCreateImagePayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetLabels(v CreateImagePayloadGetLabelsRetType) { - setCreateImagePayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetMinDiskSize returns the MinDiskSize 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 *CreateImagePayload) GetMinDiskSize() (res CreateImagePayloadGetMinDiskSizeRetType) { - res, _ = o.GetMinDiskSizeOk() - return -} - -// GetMinDiskSizeOk returns a tuple with the MinDiskSize 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 *CreateImagePayload) GetMinDiskSizeOk() (ret CreateImagePayloadGetMinDiskSizeRetType, ok bool) { - return getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize) -} - -// HasMinDiskSize 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 *CreateImagePayload) HasMinDiskSize() bool { - _, ok := o.GetMinDiskSizeOk() - return ok -} - -// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetMinDiskSize(v CreateImagePayloadGetMinDiskSizeRetType) { - setCreateImagePayloadGetMinDiskSizeAttributeType(&o.MinDiskSize, v) -} - -// GetMinRam returns the MinRam 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 *CreateImagePayload) GetMinRam() (res CreateImagePayloadGetMinRamRetType) { - res, _ = o.GetMinRamOk() - return -} - -// GetMinRamOk returns a tuple with the MinRam 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 *CreateImagePayload) GetMinRamOk() (ret CreateImagePayloadGetMinRamRetType, ok bool) { - return getCreateImagePayloadGetMinRamAttributeTypeOk(o.MinRam) -} - -// HasMinRam 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 *CreateImagePayload) HasMinRam() bool { - _, ok := o.GetMinRamOk() - return ok -} - -// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetMinRam(v CreateImagePayloadGetMinRamRetType) { - setCreateImagePayloadGetMinRamAttributeType(&o.MinRam, 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 *CreateImagePayload) GetName() (ret CreateImagePayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *CreateImagePayload) GetNameOk() (ret CreateImagePayloadGetNameRetType, ok bool) { - return getCreateImagePayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetName(v CreateImagePayloadGetNameRetType) { - setCreateImagePayloadGetNameAttributeType(&o.Name, v) -} - -// GetOwner returns the Owner 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 *CreateImagePayload) GetOwner() (res CreateImagePayloadGetOwnerRetType) { - res, _ = o.GetOwnerOk() - return -} - -// GetOwnerOk returns a tuple with the Owner 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 *CreateImagePayload) GetOwnerOk() (ret CreateImagePayloadGetOwnerRetType, ok bool) { - return getCreateImagePayloadGetOwnerAttributeTypeOk(o.Owner) -} - -// HasOwner 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 *CreateImagePayload) HasOwner() bool { - _, ok := o.GetOwnerOk() - return ok -} - -// SetOwner gets a reference to the given string and assigns it to the Owner field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetOwner(v CreateImagePayloadGetOwnerRetType) { - setCreateImagePayloadGetOwnerAttributeType(&o.Owner, v) -} - -// GetProtected returns the Protected 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 *CreateImagePayload) GetProtected() (res CreateImagePayloadgetProtectedRetType) { - res, _ = o.GetProtectedOk() - return -} - -// GetProtectedOk returns a tuple with the Protected 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 *CreateImagePayload) GetProtectedOk() (ret CreateImagePayloadgetProtectedRetType, ok bool) { - return getCreateImagePayloadgetProtectedAttributeTypeOk(o.Protected) -} - -// HasProtected 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 *CreateImagePayload) HasProtected() bool { - _, ok := o.GetProtectedOk() - return ok -} - -// SetProtected gets a reference to the given bool and assigns it to the Protected field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetProtected(v CreateImagePayloadgetProtectedRetType) { - setCreateImagePayloadgetProtectedAttributeType(&o.Protected, v) -} - -// GetScope returns the Scope 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 *CreateImagePayload) GetScope() (res CreateImagePayloadGetScopeRetType) { - res, _ = o.GetScopeOk() - return -} - -// GetScopeOk returns a tuple with the Scope 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 *CreateImagePayload) GetScopeOk() (ret CreateImagePayloadGetScopeRetType, ok bool) { - return getCreateImagePayloadGetScopeAttributeTypeOk(o.Scope) -} - -// HasScope 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 *CreateImagePayload) HasScope() bool { - _, ok := o.GetScopeOk() - return ok -} - -// SetScope gets a reference to the given string and assigns it to the Scope field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetScope(v CreateImagePayloadGetScopeRetType) { - setCreateImagePayloadGetScopeAttributeType(&o.Scope, v) -} - -// GetSize returns the Size 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 *CreateImagePayload) GetSize() (res CreateImagePayloadGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *CreateImagePayload) GetSizeOk() (ret CreateImagePayloadGetSizeRetType, ok bool) { - return getCreateImagePayloadGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *CreateImagePayload) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetSize(v CreateImagePayloadGetSizeRetType) { - setCreateImagePayloadGetSizeAttributeType(&o.Size, v) -} - -// GetStatus returns the Status 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 *CreateImagePayload) GetStatus() (res CreateImagePayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *CreateImagePayload) GetStatusOk() (ret CreateImagePayloadGetStatusRetType, ok bool) { - return getCreateImagePayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *CreateImagePayload) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateImagePayload) SetStatus(v CreateImagePayloadGetStatusRetType) { - setCreateImagePayloadGetStatusAttributeType(&o.Status, 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 *CreateImagePayload) GetUpdatedAt() (res CreateImagePayloadGetUpdatedAtRetType) { - 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 *CreateImagePayload) GetUpdatedAtOk() (ret CreateImagePayloadGetUpdatedAtRetType, ok bool) { - return getCreateImagePayloadGetUpdatedAtAttributeTypeOk(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 *CreateImagePayload) 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 *CreateImagePayload) SetUpdatedAt(v CreateImagePayloadGetUpdatedAtRetType) { - setCreateImagePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateImagePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateImagePayloadGetAgentAttributeTypeOk(o.Agent); ok { - toSerialize["Agent"] = val - } - if val, ok := getCreateImagePayloadGetChecksumAttributeTypeOk(o.Checksum); ok { - toSerialize["Checksum"] = val - } - if val, ok := getCreateImagePayloadGetConfigAttributeTypeOk(o.Config); ok { - toSerialize["Config"] = val - } - if val, ok := getCreateImagePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getCreateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat); ok { - toSerialize["DiskFormat"] = val - } - if val, ok := getCreateImagePayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateImagePayloadGetImportProgressAttributeTypeOk(o.ImportProgress); ok { - toSerialize["ImportProgress"] = val - } - if val, ok := getCreateImagePayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok { - toSerialize["MinDiskSize"] = val - } - if val, ok := getCreateImagePayloadGetMinRamAttributeTypeOk(o.MinRam); ok { - toSerialize["MinRam"] = val - } - if val, ok := getCreateImagePayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateImagePayloadGetOwnerAttributeTypeOk(o.Owner); ok { - toSerialize["Owner"] = val - } - if val, ok := getCreateImagePayloadgetProtectedAttributeTypeOk(o.Protected); ok { - toSerialize["Protected"] = val - } - if val, ok := getCreateImagePayloadGetScopeAttributeTypeOk(o.Scope); ok { - toSerialize["Scope"] = val - } - if val, ok := getCreateImagePayloadGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getCreateImagePayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getCreateImagePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateImagePayload struct { - value *CreateImagePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateImagePayload) Get() *CreateImagePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateImagePayload) Set(val *CreateImagePayload) { - 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 NullableCreateImagePayload) 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 *NullableCreateImagePayload) 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 NewNullableCreateImagePayload(val *CreateImagePayload) *NullableCreateImagePayload { - return &NullableCreateImagePayload{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 NullableCreateImagePayload) 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 *NullableCreateImagePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_image_payload_test.go b/services/iaas/model_create_image_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_image_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_isolated_network_payload.go b/services/iaas/model_create_isolated_network_payload.go deleted file mode 100644 index cc6a8cad48..0000000000 --- a/services/iaas/model_create_isolated_network_payload.go +++ /dev/null @@ -1,328 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateIsolatedNetworkPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateIsolatedNetworkPayload{} - -/* - types and functions for dhcp -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadgetDhcpAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadgetDhcpArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadgetDhcpRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(arg CreateIsolatedNetworkPayloadgetDhcpAttributeType) (ret CreateIsolatedNetworkPayloadgetDhcpRetType, 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 setCreateIsolatedNetworkPayloadgetDhcpAttributeType(arg *CreateIsolatedNetworkPayloadgetDhcpAttributeType, val CreateIsolatedNetworkPayloadgetDhcpRetType) { - *arg = &val -} - -/* - types and functions for ipv4 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetIpv4AttributeType = *CreateNetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetIpv4ArgType = CreateNetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetIpv4RetType = CreateNetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(arg CreateIsolatedNetworkPayloadGetIpv4AttributeType) (ret CreateIsolatedNetworkPayloadGetIpv4RetType, 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 setCreateIsolatedNetworkPayloadGetIpv4AttributeType(arg *CreateIsolatedNetworkPayloadGetIpv4AttributeType, val CreateIsolatedNetworkPayloadGetIpv4RetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(arg CreateIsolatedNetworkPayloadGetLabelsAttributeType) (ret CreateIsolatedNetworkPayloadGetLabelsRetType, 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 setCreateIsolatedNetworkPayloadGetLabelsAttributeType(arg *CreateIsolatedNetworkPayloadGetLabelsAttributeType, val CreateIsolatedNetworkPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(arg CreateIsolatedNetworkPayloadGetNameAttributeType) (ret CreateIsolatedNetworkPayloadGetNameRetType, 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 setCreateIsolatedNetworkPayloadGetNameAttributeType(arg *CreateIsolatedNetworkPayloadGetNameAttributeType, val CreateIsolatedNetworkPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateIsolatedNetworkPayloadGetNameRetType = string - -// CreateIsolatedNetworkPayload Object that represents the request body for a single isolated network create. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. - Labels CreateIsolatedNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name CreateIsolatedNetworkPayloadGetNameAttributeType `json:"name" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateIsolatedNetworkPayload CreateIsolatedNetworkPayload - -// NewCreateIsolatedNetworkPayload instantiates a new CreateIsolatedNetworkPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateIsolatedNetworkPayload(name CreateIsolatedNetworkPayloadGetNameArgType) *CreateIsolatedNetworkPayload { - this := CreateIsolatedNetworkPayload{} - setCreateIsolatedNetworkPayloadGetNameAttributeType(&this.Name, name) - return &this -} - -// NewCreateIsolatedNetworkPayloadWithDefaults instantiates a new CreateIsolatedNetworkPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateIsolatedNetworkPayloadWithDefaults() *CreateIsolatedNetworkPayload { - this := CreateIsolatedNetworkPayload{} - var dhcp bool = true - this.Dhcp = &dhcp - return &this -} - -// 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 *CreateIsolatedNetworkPayload) GetDhcp() (res CreateIsolatedNetworkPayloadgetDhcpRetType) { - res, _ = o.GetDhcpOk() - return -} - -// GetDhcpOk returns a tuple with the Dhcp 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 *CreateIsolatedNetworkPayload) GetDhcpOk() (ret CreateIsolatedNetworkPayloadgetDhcpRetType, ok bool) { - return getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp) -} - -// HasDhcp 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 *CreateIsolatedNetworkPayload) HasDhcp() bool { - _, ok := o.GetDhcpOk() - return ok -} - -// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateIsolatedNetworkPayload) SetDhcp(v CreateIsolatedNetworkPayloadgetDhcpRetType) { - setCreateIsolatedNetworkPayloadgetDhcpAttributeType(&o.Dhcp, 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 *CreateIsolatedNetworkPayload) GetIpv4() (res CreateIsolatedNetworkPayloadGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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 *CreateIsolatedNetworkPayload) GetIpv4Ok() (ret CreateIsolatedNetworkPayloadGetIpv4RetType, ok bool) { - return getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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 *CreateIsolatedNetworkPayload) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given CreateNetworkIPv4 and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateIsolatedNetworkPayload) SetIpv4(v CreateIsolatedNetworkPayloadGetIpv4RetType) { - setCreateIsolatedNetworkPayloadGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateIsolatedNetworkPayload) GetLabels() (res CreateIsolatedNetworkPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateIsolatedNetworkPayload) GetLabelsOk() (ret CreateIsolatedNetworkPayloadGetLabelsRetType, ok bool) { - return getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateIsolatedNetworkPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateIsolatedNetworkPayload) SetLabels(v CreateIsolatedNetworkPayloadGetLabelsRetType) { - setCreateIsolatedNetworkPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateIsolatedNetworkPayload) GetName() (ret CreateIsolatedNetworkPayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *CreateIsolatedNetworkPayload) GetNameOk() (ret CreateIsolatedNetworkPayloadGetNameRetType, ok bool) { - return getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateIsolatedNetworkPayload) SetName(v CreateIsolatedNetworkPayloadGetNameRetType) { - setCreateIsolatedNetworkPayloadGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateIsolatedNetworkPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok { - toSerialize["Dhcp"] = val - } - if val, ok := getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateIsolatedNetworkPayload struct { - value *CreateIsolatedNetworkPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateIsolatedNetworkPayload) Get() *CreateIsolatedNetworkPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateIsolatedNetworkPayload) Set(val *CreateIsolatedNetworkPayload) { - 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 NullableCreateIsolatedNetworkPayload) 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 *NullableCreateIsolatedNetworkPayload) 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 NewNullableCreateIsolatedNetworkPayload(val *CreateIsolatedNetworkPayload) *NullableCreateIsolatedNetworkPayload { - return &NullableCreateIsolatedNetworkPayload{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 NullableCreateIsolatedNetworkPayload) 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 *NullableCreateIsolatedNetworkPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_isolated_network_payload_test.go b/services/iaas/model_create_isolated_network_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_isolated_network_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_key_pair_payload.go b/services/iaas/model_create_key_pair_payload.go deleted file mode 100644 index e51c6fe716..0000000000 --- a/services/iaas/model_create_key_pair_payload.go +++ /dev/null @@ -1,446 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the CreateKeyPairPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateKeyPairPayload{} - -/* - 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 CreateKeyPairPayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateKeyPairPayloadGetCreatedAtAttributeTypeOk(arg CreateKeyPairPayloadGetCreatedAtAttributeType) (ret CreateKeyPairPayloadGetCreatedAtRetType, 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 setCreateKeyPairPayloadGetCreatedAtAttributeType(arg *CreateKeyPairPayloadGetCreatedAtAttributeType, val CreateKeyPairPayloadGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for fingerprint -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetFingerprintAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateKeyPairPayloadGetFingerprintAttributeTypeOk(arg CreateKeyPairPayloadGetFingerprintAttributeType) (ret CreateKeyPairPayloadGetFingerprintRetType, 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 setCreateKeyPairPayloadGetFingerprintAttributeType(arg *CreateKeyPairPayloadGetFingerprintAttributeType, val CreateKeyPairPayloadGetFingerprintRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetFingerprintArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetFingerprintRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateKeyPairPayloadGetLabelsAttributeTypeOk(arg CreateKeyPairPayloadGetLabelsAttributeType) (ret CreateKeyPairPayloadGetLabelsRetType, 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 setCreateKeyPairPayloadGetLabelsAttributeType(arg *CreateKeyPairPayloadGetLabelsAttributeType, val CreateKeyPairPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateKeyPairPayloadGetNameAttributeTypeOk(arg CreateKeyPairPayloadGetNameAttributeType) (ret CreateKeyPairPayloadGetNameRetType, 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 setCreateKeyPairPayloadGetNameAttributeType(arg *CreateKeyPairPayloadGetNameAttributeType, val CreateKeyPairPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetNameRetType = string - -/* - types and functions for publicKey -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetPublicKeyAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateKeyPairPayloadGetPublicKeyAttributeTypeOk(arg CreateKeyPairPayloadGetPublicKeyAttributeType) (ret CreateKeyPairPayloadGetPublicKeyRetType, 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 setCreateKeyPairPayloadGetPublicKeyAttributeType(arg *CreateKeyPairPayloadGetPublicKeyAttributeType, val CreateKeyPairPayloadGetPublicKeyRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetPublicKeyArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetPublicKeyRetType = 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 CreateKeyPairPayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateKeyPairPayloadGetUpdatedAtAttributeTypeOk(arg CreateKeyPairPayloadGetUpdatedAtAttributeType) (ret CreateKeyPairPayloadGetUpdatedAtRetType, 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 setCreateKeyPairPayloadGetUpdatedAtAttributeType(arg *CreateKeyPairPayloadGetUpdatedAtAttributeType, val CreateKeyPairPayloadGetUpdatedAtRetType) { - *arg = &val -} - -// CreateKeyPairPayload Object that represents the public key of an SSH keypair and its name. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateKeyPairPayload struct { - // Date-time when resource was created. - 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. - 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"` - // Object that represents a public SSH key. - // REQUIRED - PublicKey CreateKeyPairPayloadGetPublicKeyAttributeType `json:"publicKey" required:"true"` - // Date-time when resource was last updated. - UpdatedAt CreateKeyPairPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateKeyPairPayload CreateKeyPairPayload - -// NewCreateKeyPairPayload instantiates a new CreateKeyPairPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateKeyPairPayload(publicKey CreateKeyPairPayloadGetPublicKeyArgType) *CreateKeyPairPayload { - this := CreateKeyPairPayload{} - setCreateKeyPairPayloadGetPublicKeyAttributeType(&this.PublicKey, publicKey) - return &this -} - -// NewCreateKeyPairPayloadWithDefaults instantiates a new CreateKeyPairPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateKeyPairPayloadWithDefaults() *CreateKeyPairPayload { - this := CreateKeyPairPayload{} - 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 *CreateKeyPairPayload) GetCreatedAt() (res CreateKeyPairPayloadGetCreatedAtRetType) { - 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 *CreateKeyPairPayload) GetCreatedAtOk() (ret CreateKeyPairPayloadGetCreatedAtRetType, ok bool) { - return getCreateKeyPairPayloadGetCreatedAtAttributeTypeOk(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 *CreateKeyPairPayload) 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 *CreateKeyPairPayload) SetCreatedAt(v CreateKeyPairPayloadGetCreatedAtRetType) { - setCreateKeyPairPayloadGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetFingerprint returns the Fingerprint 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 *CreateKeyPairPayload) GetFingerprint() (res CreateKeyPairPayloadGetFingerprintRetType) { - res, _ = o.GetFingerprintOk() - return -} - -// GetFingerprintOk returns a tuple with the Fingerprint 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 *CreateKeyPairPayload) GetFingerprintOk() (ret CreateKeyPairPayloadGetFingerprintRetType, ok bool) { - return getCreateKeyPairPayloadGetFingerprintAttributeTypeOk(o.Fingerprint) -} - -// HasFingerprint 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 *CreateKeyPairPayload) HasFingerprint() bool { - _, ok := o.GetFingerprintOk() - return ok -} - -// SetFingerprint gets a reference to the given string and assigns it to the Fingerprint field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) SetFingerprint(v CreateKeyPairPayloadGetFingerprintRetType) { - setCreateKeyPairPayloadGetFingerprintAttributeType(&o.Fingerprint, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) GetLabels() (res CreateKeyPairPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) GetLabelsOk() (ret CreateKeyPairPayloadGetLabelsRetType, ok bool) { - return getCreateKeyPairPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) SetLabels(v CreateKeyPairPayloadGetLabelsRetType) { - setCreateKeyPairPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) GetName() (res CreateKeyPairPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *CreateKeyPairPayload) GetNameOk() (ret CreateKeyPairPayloadGetNameRetType, ok bool) { - return getCreateKeyPairPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *CreateKeyPairPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) SetName(v CreateKeyPairPayloadGetNameRetType) { - setCreateKeyPairPayloadGetNameAttributeType(&o.Name, v) -} - -// GetPublicKey returns the PublicKey field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) GetPublicKey() (ret CreateKeyPairPayloadGetPublicKeyRetType) { - ret, _ = o.GetPublicKeyOk() - return ret -} - -// GetPublicKeyOk returns a tuple with the PublicKey field value -// 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 *CreateKeyPairPayload) GetPublicKeyOk() (ret CreateKeyPairPayloadGetPublicKeyRetType, ok bool) { - return getCreateKeyPairPayloadGetPublicKeyAttributeTypeOk(o.PublicKey) -} - -// SetPublicKey sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateKeyPairPayload) SetPublicKey(v CreateKeyPairPayloadGetPublicKeyRetType) { - setCreateKeyPairPayloadGetPublicKeyAttributeType(&o.PublicKey, 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 *CreateKeyPairPayload) GetUpdatedAt() (res CreateKeyPairPayloadGetUpdatedAtRetType) { - 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 *CreateKeyPairPayload) GetUpdatedAtOk() (ret CreateKeyPairPayloadGetUpdatedAtRetType, ok bool) { - return getCreateKeyPairPayloadGetUpdatedAtAttributeTypeOk(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 *CreateKeyPairPayload) 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 *CreateKeyPairPayload) SetUpdatedAt(v CreateKeyPairPayloadGetUpdatedAtRetType) { - setCreateKeyPairPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateKeyPairPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateKeyPairPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getCreateKeyPairPayloadGetFingerprintAttributeTypeOk(o.Fingerprint); ok { - toSerialize["Fingerprint"] = val - } - if val, ok := getCreateKeyPairPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateKeyPairPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateKeyPairPayloadGetPublicKeyAttributeTypeOk(o.PublicKey); ok { - toSerialize["PublicKey"] = val - } - if val, ok := getCreateKeyPairPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateKeyPairPayload struct { - value *CreateKeyPairPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateKeyPairPayload) Get() *CreateKeyPairPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateKeyPairPayload) Set(val *CreateKeyPairPayload) { - 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 NullableCreateKeyPairPayload) 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 *NullableCreateKeyPairPayload) 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 NewNullableCreateKeyPairPayload(val *CreateKeyPairPayload) *NullableCreateKeyPairPayload { - return &NullableCreateKeyPairPayload{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 NullableCreateKeyPairPayload) 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 *NullableCreateKeyPairPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_key_pair_payload_test.go b/services/iaas/model_create_key_pair_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_key_pair_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_area_payload.go b/services/iaas/model_create_network_area_payload.go deleted file mode 100644 index 35bb9473d6..0000000000 --- a/services/iaas/model_create_network_area_payload.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkAreaPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkAreaPayload{} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkAreaPayloadGetLabelsAttributeTypeOk(arg CreateNetworkAreaPayloadGetLabelsAttributeType) (ret CreateNetworkAreaPayloadGetLabelsRetType, 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 setCreateNetworkAreaPayloadGetLabelsAttributeType(arg *CreateNetworkAreaPayloadGetLabelsAttributeType, val CreateNetworkAreaPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkAreaPayloadGetNameAttributeTypeOk(arg CreateNetworkAreaPayloadGetNameAttributeType) (ret CreateNetworkAreaPayloadGetNameRetType, 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 setCreateNetworkAreaPayloadGetNameAttributeType(arg *CreateNetworkAreaPayloadGetNameAttributeType, val CreateNetworkAreaPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. - Labels CreateNetworkAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // REQUIRED - Name CreateNetworkAreaPayloadGetNameAttributeType `json:"name" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateNetworkAreaPayload CreateNetworkAreaPayload - -// NewCreateNetworkAreaPayload instantiates a new CreateNetworkAreaPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkAreaPayload(name CreateNetworkAreaPayloadGetNameArgType) *CreateNetworkAreaPayload { - this := CreateNetworkAreaPayload{} - setCreateNetworkAreaPayloadGetNameAttributeType(&this.Name, name) - return &this -} - -// NewCreateNetworkAreaPayloadWithDefaults instantiates a new CreateNetworkAreaPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkAreaPayloadWithDefaults() *CreateNetworkAreaPayload { - this := CreateNetworkAreaPayload{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaPayload) GetLabels() (res CreateNetworkAreaPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaPayload) GetLabelsOk() (ret CreateNetworkAreaPayloadGetLabelsRetType, ok bool) { - return getCreateNetworkAreaPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaPayload) SetLabels(v CreateNetworkAreaPayloadGetLabelsRetType) { - setCreateNetworkAreaPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaPayload) GetName() (ret CreateNetworkAreaPayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *CreateNetworkAreaPayload) GetNameOk() (ret CreateNetworkAreaPayloadGetNameRetType, ok bool) { - return getCreateNetworkAreaPayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaPayload) SetName(v CreateNetworkAreaPayloadGetNameRetType) { - setCreateNetworkAreaPayloadGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateNetworkAreaPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateNetworkAreaPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateNetworkAreaPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkAreaPayload struct { - value *CreateNetworkAreaPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkAreaPayload) Get() *CreateNetworkAreaPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkAreaPayload) Set(val *CreateNetworkAreaPayload) { - 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 NullableCreateNetworkAreaPayload) 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 *NullableCreateNetworkAreaPayload) 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 NewNullableCreateNetworkAreaPayload(val *CreateNetworkAreaPayload) *NullableCreateNetworkAreaPayload { - return &NullableCreateNetworkAreaPayload{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 NullableCreateNetworkAreaPayload) 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 *NullableCreateNetworkAreaPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_area_payload_test.go b/services/iaas/model_create_network_area_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_area_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_area_range_payload.go b/services/iaas/model_create_network_area_range_payload.go deleted file mode 100644 index 177f45a832..0000000000 --- a/services/iaas/model_create_network_area_range_payload.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkAreaRangePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkAreaRangePayload{} - -/* - types and functions for ipv4 -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRangePayloadGetIpv4AttributeType = *[]NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRangePayloadGetIpv4ArgType = []NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRangePayloadGetIpv4RetType = []NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkAreaRangePayloadGetIpv4AttributeTypeOk(arg CreateNetworkAreaRangePayloadGetIpv4AttributeType) (ret CreateNetworkAreaRangePayloadGetIpv4RetType, 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 setCreateNetworkAreaRangePayloadGetIpv4AttributeType(arg *CreateNetworkAreaRangePayloadGetIpv4AttributeType, val CreateNetworkAreaRangePayloadGetIpv4RetType) { - *arg = &val -} - -// CreateNetworkAreaRangePayload struct for CreateNetworkAreaRangePayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRangePayload struct { - // A list of network area network ranges. - Ipv4 CreateNetworkAreaRangePayloadGetIpv4AttributeType `json:"ipv4,omitempty"` -} - -// NewCreateNetworkAreaRangePayload instantiates a new CreateNetworkAreaRangePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkAreaRangePayload() *CreateNetworkAreaRangePayload { - this := CreateNetworkAreaRangePayload{} - return &this -} - -// NewCreateNetworkAreaRangePayloadWithDefaults instantiates a new CreateNetworkAreaRangePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkAreaRangePayloadWithDefaults() *CreateNetworkAreaRangePayload { - this := CreateNetworkAreaRangePayload{} - return &this -} - -// 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 *CreateNetworkAreaRangePayload) GetIpv4() (res CreateNetworkAreaRangePayloadGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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 *CreateNetworkAreaRangePayload) GetIpv4Ok() (ret CreateNetworkAreaRangePayloadGetIpv4RetType, ok bool) { - return getCreateNetworkAreaRangePayloadGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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 *CreateNetworkAreaRangePayload) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given []NetworkRange and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaRangePayload) SetIpv4(v CreateNetworkAreaRangePayloadGetIpv4RetType) { - setCreateNetworkAreaRangePayloadGetIpv4AttributeType(&o.Ipv4, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateNetworkAreaRangePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateNetworkAreaRangePayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkAreaRangePayload struct { - value *CreateNetworkAreaRangePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkAreaRangePayload) Get() *CreateNetworkAreaRangePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkAreaRangePayload) Set(val *CreateNetworkAreaRangePayload) { - 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 NullableCreateNetworkAreaRangePayload) 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 *NullableCreateNetworkAreaRangePayload) 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 NewNullableCreateNetworkAreaRangePayload(val *CreateNetworkAreaRangePayload) *NullableCreateNetworkAreaRangePayload { - return &NullableCreateNetworkAreaRangePayload{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 NullableCreateNetworkAreaRangePayload) 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 *NullableCreateNetworkAreaRangePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_area_range_payload_test.go b/services/iaas/model_create_network_area_range_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_area_range_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_area_region_payload.go b/services/iaas/model_create_network_area_region_payload.go deleted file mode 100644 index 031037b75f..0000000000 --- a/services/iaas/model_create_network_area_region_payload.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkAreaRegionPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkAreaRegionPayload{} - -/* - types and functions for ipv4 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRegionPayloadGetIpv4AttributeType = *RegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRegionPayloadGetIpv4ArgType = RegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRegionPayloadGetIpv4RetType = RegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkAreaRegionPayloadGetIpv4AttributeTypeOk(arg CreateNetworkAreaRegionPayloadGetIpv4AttributeType) (ret CreateNetworkAreaRegionPayloadGetIpv4RetType, 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 setCreateNetworkAreaRegionPayloadGetIpv4AttributeType(arg *CreateNetworkAreaRegionPayloadGetIpv4AttributeType, val CreateNetworkAreaRegionPayloadGetIpv4RetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRegionPayloadGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkAreaRegionPayloadGetStatusAttributeTypeOk(arg CreateNetworkAreaRegionPayloadGetStatusAttributeType) (ret CreateNetworkAreaRegionPayloadGetStatusRetType, 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 setCreateNetworkAreaRegionPayloadGetStatusAttributeType(arg *CreateNetworkAreaRegionPayloadGetStatusAttributeType, val CreateNetworkAreaRegionPayloadGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRegionPayloadGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRegionPayloadGetStatusRetType = string - -// CreateNetworkAreaRegionPayload The basic properties of a regional network area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRegionPayload struct { - Ipv4 CreateNetworkAreaRegionPayloadGetIpv4AttributeType `json:"ipv4,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status CreateNetworkAreaRegionPayloadGetStatusAttributeType `json:"status,omitempty"` -} - -// NewCreateNetworkAreaRegionPayload instantiates a new CreateNetworkAreaRegionPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkAreaRegionPayload() *CreateNetworkAreaRegionPayload { - this := CreateNetworkAreaRegionPayload{} - return &this -} - -// NewCreateNetworkAreaRegionPayloadWithDefaults instantiates a new CreateNetworkAreaRegionPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkAreaRegionPayloadWithDefaults() *CreateNetworkAreaRegionPayload { - this := CreateNetworkAreaRegionPayload{} - return &this -} - -// 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 *CreateNetworkAreaRegionPayload) GetIpv4() (res CreateNetworkAreaRegionPayloadGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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 *CreateNetworkAreaRegionPayload) GetIpv4Ok() (ret CreateNetworkAreaRegionPayloadGetIpv4RetType, ok bool) { - return getCreateNetworkAreaRegionPayloadGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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 *CreateNetworkAreaRegionPayload) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given RegionalAreaIPv4 and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaRegionPayload) SetIpv4(v CreateNetworkAreaRegionPayloadGetIpv4RetType) { - setCreateNetworkAreaRegionPayloadGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetStatus returns the Status 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 *CreateNetworkAreaRegionPayload) GetStatus() (res CreateNetworkAreaRegionPayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *CreateNetworkAreaRegionPayload) GetStatusOk() (ret CreateNetworkAreaRegionPayloadGetStatusRetType, ok bool) { - return getCreateNetworkAreaRegionPayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *CreateNetworkAreaRegionPayload) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaRegionPayload) SetStatus(v CreateNetworkAreaRegionPayloadGetStatusRetType) { - setCreateNetworkAreaRegionPayloadGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateNetworkAreaRegionPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateNetworkAreaRegionPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getCreateNetworkAreaRegionPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkAreaRegionPayload struct { - value *CreateNetworkAreaRegionPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkAreaRegionPayload) Get() *CreateNetworkAreaRegionPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkAreaRegionPayload) Set(val *CreateNetworkAreaRegionPayload) { - 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 NullableCreateNetworkAreaRegionPayload) 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 *NullableCreateNetworkAreaRegionPayload) 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 NewNullableCreateNetworkAreaRegionPayload(val *CreateNetworkAreaRegionPayload) *NullableCreateNetworkAreaRegionPayload { - return &NullableCreateNetworkAreaRegionPayload{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 NullableCreateNetworkAreaRegionPayload) 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 *NullableCreateNetworkAreaRegionPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_area_region_payload_test.go b/services/iaas/model_create_network_area_region_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_area_region_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_area_route_payload.go b/services/iaas/model_create_network_area_route_payload.go deleted file mode 100644 index 0442634f8a..0000000000 --- a/services/iaas/model_create_network_area_route_payload.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkAreaRoutePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkAreaRoutePayload{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRoutePayloadGetItemsAttributeType = *[]Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRoutePayloadGetItemsArgType = []Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRoutePayloadGetItemsRetType = []Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkAreaRoutePayloadGetItemsAttributeTypeOk(arg CreateNetworkAreaRoutePayloadGetItemsAttributeType) (ret CreateNetworkAreaRoutePayloadGetItemsRetType, 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 setCreateNetworkAreaRoutePayloadGetItemsAttributeType(arg *CreateNetworkAreaRoutePayloadGetItemsAttributeType, val CreateNetworkAreaRoutePayloadGetItemsRetType) { - *arg = &val -} - -// CreateNetworkAreaRoutePayload Object represents a request to add network routes. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkAreaRoutePayload struct { - // A list of routes. - // REQUIRED - Items CreateNetworkAreaRoutePayloadGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateNetworkAreaRoutePayload CreateNetworkAreaRoutePayload - -// NewCreateNetworkAreaRoutePayload instantiates a new CreateNetworkAreaRoutePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkAreaRoutePayload(items CreateNetworkAreaRoutePayloadGetItemsArgType) *CreateNetworkAreaRoutePayload { - this := CreateNetworkAreaRoutePayload{} - setCreateNetworkAreaRoutePayloadGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewCreateNetworkAreaRoutePayloadWithDefaults instantiates a new CreateNetworkAreaRoutePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkAreaRoutePayloadWithDefaults() *CreateNetworkAreaRoutePayload { - this := CreateNetworkAreaRoutePayload{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaRoutePayload) GetItems() (ret CreateNetworkAreaRoutePayloadGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *CreateNetworkAreaRoutePayload) GetItemsOk() (ret CreateNetworkAreaRoutePayloadGetItemsRetType, ok bool) { - return getCreateNetworkAreaRoutePayloadGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkAreaRoutePayload) SetItems(v CreateNetworkAreaRoutePayloadGetItemsRetType) { - setCreateNetworkAreaRoutePayloadGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateNetworkAreaRoutePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateNetworkAreaRoutePayloadGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkAreaRoutePayload struct { - value *CreateNetworkAreaRoutePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkAreaRoutePayload) Get() *CreateNetworkAreaRoutePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkAreaRoutePayload) Set(val *CreateNetworkAreaRoutePayload) { - 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 NullableCreateNetworkAreaRoutePayload) 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 *NullableCreateNetworkAreaRoutePayload) 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 NewNullableCreateNetworkAreaRoutePayload(val *CreateNetworkAreaRoutePayload) *NullableCreateNetworkAreaRoutePayload { - return &NullableCreateNetworkAreaRoutePayload{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 NullableCreateNetworkAreaRoutePayload) 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 *NullableCreateNetworkAreaRoutePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_area_route_payload_test.go b/services/iaas/model_create_network_area_route_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_area_route_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_ipv4.go b/services/iaas/model_create_network_ipv4.go deleted file mode 100644 index 2e62fd4ac5..0000000000 --- a/services/iaas/model_create_network_ipv4.go +++ /dev/null @@ -1,159 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" -) - -// CreateNetworkIPv4 - The create request for an IPv4 network. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4 struct { - CreateNetworkIPv4WithPrefix *CreateNetworkIPv4WithPrefix - CreateNetworkIPv4WithPrefixLength *CreateNetworkIPv4WithPrefixLength -} - -// CreateNetworkIPv4WithPrefixAsCreateNetworkIPv4 is a convenience function that returns CreateNetworkIPv4WithPrefix wrapped in CreateNetworkIPv4 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateNetworkIPv4WithPrefixAsCreateNetworkIPv4(v *CreateNetworkIPv4WithPrefix) CreateNetworkIPv4 { - return CreateNetworkIPv4{ - CreateNetworkIPv4WithPrefix: v, - } -} - -// CreateNetworkIPv4WithPrefixLengthAsCreateNetworkIPv4 is a convenience function that returns CreateNetworkIPv4WithPrefixLength wrapped in CreateNetworkIPv4 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateNetworkIPv4WithPrefixLengthAsCreateNetworkIPv4(v *CreateNetworkIPv4WithPrefixLength) CreateNetworkIPv4 { - return CreateNetworkIPv4{ - CreateNetworkIPv4WithPrefixLength: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *CreateNetworkIPv4) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // Workaround until upstream issue is fixed: - // https://github.com/OpenAPITools/openapi-generator/issues/21751 - // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226 - // try to unmarshal data into CreateNetworkIPv4WithPrefix - dstCreateNetworkIPv41 := &CreateNetworkIPv4{} - err = json.Unmarshal(data, &dstCreateNetworkIPv41.CreateNetworkIPv4WithPrefix) - if err == nil { - jsonCreateNetworkIPv4WithPrefix, _ := json.Marshal(&dstCreateNetworkIPv41.CreateNetworkIPv4WithPrefix) - if string(jsonCreateNetworkIPv4WithPrefix) != "{}" { // empty struct - dst.CreateNetworkIPv4WithPrefix = dstCreateNetworkIPv41.CreateNetworkIPv4WithPrefix - match++ - } - } - - // try to unmarshal data into CreateNetworkIPv4WithPrefixLength - dstCreateNetworkIPv42 := &CreateNetworkIPv4{} - err = json.Unmarshal(data, &dstCreateNetworkIPv42.CreateNetworkIPv4WithPrefixLength) - if err == nil { - jsonCreateNetworkIPv4WithPrefixLength, _ := json.Marshal(&dstCreateNetworkIPv42.CreateNetworkIPv4WithPrefixLength) - if string(jsonCreateNetworkIPv4WithPrefixLength) != "{}" { // empty struct - dst.CreateNetworkIPv4WithPrefixLength = dstCreateNetworkIPv42.CreateNetworkIPv4WithPrefixLength - match++ - } - } - - 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 - 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) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.CreateNetworkIPv4WithPrefix != nil { - return json.Marshal(&src.CreateNetworkIPv4WithPrefix) - } - - if src.CreateNetworkIPv4WithPrefixLength != nil { - return json.Marshal(&src.CreateNetworkIPv4WithPrefixLength) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkIPv4 struct { - value *CreateNetworkIPv4 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkIPv4) Get() *CreateNetworkIPv4 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkIPv4) Set(val *CreateNetworkIPv4) { - 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 NullableCreateNetworkIPv4) 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 *NullableCreateNetworkIPv4) 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 NewNullableCreateNetworkIPv4(val *CreateNetworkIPv4) *NullableCreateNetworkIPv4 { - return &NullableCreateNetworkIPv4{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 NullableCreateNetworkIPv4) 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 *NullableCreateNetworkIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_ipv4_test.go b/services/iaas/model_create_network_ipv4_test.go deleted file mode 100644 index 2db2834432..0000000000 --- a/services/iaas/model_create_network_ipv4_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas - -import ( - "testing" -) - -// isOneOf - -func TestCreateNetworkIPv4_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{} - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := &CreateNetworkIPv4{} - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - marshalJson, err := v.MarshalJSON() - if err != nil { - t.Fatalf("failed marshalling CreateNetworkIPv4: %v", err) - } - if string(marshalJson) != string(tt.args.src) { - t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson) - } - }) - } -} diff --git a/services/iaas/model_create_network_ipv4_with_prefix.go b/services/iaas/model_create_network_ipv4_with_prefix.go deleted file mode 100644 index 02118df74a..0000000000 --- a/services/iaas/model_create_network_ipv4_with_prefix.go +++ /dev/null @@ -1,344 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkIPv4WithPrefix type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkIPv4WithPrefix{} - -/* - types and functions for gateway -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetGatewayAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv4WithPrefixGetGatewayAttributeTypeOk(arg CreateNetworkIPv4WithPrefixGetGatewayAttributeType) (ret CreateNetworkIPv4WithPrefixGetGatewayRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateNetworkIPv4WithPrefixGetGatewayAttributeType(arg *CreateNetworkIPv4WithPrefixGetGatewayAttributeType, val CreateNetworkIPv4WithPrefixGetGatewayRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetGatewayArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetGatewayRetType = *string - -/* - types and functions for nameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv4WithPrefixGetNameserversAttributeTypeOk(arg CreateNetworkIPv4WithPrefixGetNameserversAttributeType) (ret CreateNetworkIPv4WithPrefixGetNameserversRetType, 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 setCreateNetworkIPv4WithPrefixGetNameserversAttributeType(arg *CreateNetworkIPv4WithPrefixGetNameserversAttributeType, val CreateNetworkIPv4WithPrefixGetNameserversRetType) { - *arg = &val -} - -/* - types and functions for prefix -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetPrefixAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv4WithPrefixGetPrefixAttributeTypeOk(arg CreateNetworkIPv4WithPrefixGetPrefixAttributeType) (ret CreateNetworkIPv4WithPrefixGetPrefixRetType, 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 setCreateNetworkIPv4WithPrefixGetPrefixAttributeType(arg *CreateNetworkIPv4WithPrefixGetPrefixAttributeType, val CreateNetworkIPv4WithPrefixGetPrefixRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetPrefixArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetPrefixRetType = string - -/* - types and functions for vpcNetworkRangeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeTypeOk(arg CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeType) (ret CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdRetType, 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 setCreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeType(arg *CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeType, val CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdRetType = string - -// CreateNetworkIPv4WithPrefix The create request for an IPv4 network with a specified prefix. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 CreateNetworkIPv4WithPrefixGetGatewayAttributeType `json:"gateway,omitempty"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers CreateNetworkIPv4WithPrefixGetNameserversAttributeType `json:"nameservers,omitempty"` - // IPv4 Classless Inter-Domain Routing (CIDR). - // REQUIRED - Prefix CreateNetworkIPv4WithPrefixGetPrefixAttributeType `json:"prefix" required:"true"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeType `json:"vpcNetworkRangeId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkIPv4WithPrefix(prefix CreateNetworkIPv4WithPrefixGetPrefixArgType) *CreateNetworkIPv4WithPrefix { - this := CreateNetworkIPv4WithPrefix{} - setCreateNetworkIPv4WithPrefixGetPrefixAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) GetGateway() (res CreateNetworkIPv4WithPrefixGetGatewayRetType) { - res, _ = o.GetGatewayOk() - return -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) GetGatewayOk() (ret CreateNetworkIPv4WithPrefixGetGatewayRetType, ok bool) { - return getCreateNetworkIPv4WithPrefixGetGatewayAttributeTypeOk(o.Gateway) -} - -// HasGateway 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 *CreateNetworkIPv4WithPrefix) HasGateway() bool { - _, ok := o.GetGatewayOk() - return ok -} - -// SetGateway gets a reference to the given string and assigns it to the Gateway field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) SetGateway(v CreateNetworkIPv4WithPrefixGetGatewayRetType) { - setCreateNetworkIPv4WithPrefixGetGatewayAttributeType(&o.Gateway, v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) SetGatewayNil() { - o.Gateway = nil -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) UnsetGateway() { - o.Gateway = nil -} - -// GetNameservers returns the Nameservers 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 *CreateNetworkIPv4WithPrefix) GetNameservers() (res CreateNetworkIPv4WithPrefixGetNameserversRetType) { - res, _ = o.GetNameserversOk() - return -} - -// GetNameserversOk returns a tuple with the Nameservers 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 *CreateNetworkIPv4WithPrefix) GetNameserversOk() (ret CreateNetworkIPv4WithPrefixGetNameserversRetType, ok bool) { - return getCreateNetworkIPv4WithPrefixGetNameserversAttributeTypeOk(o.Nameservers) -} - -// HasNameservers 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 *CreateNetworkIPv4WithPrefix) HasNameservers() bool { - _, ok := o.GetNameserversOk() - return ok -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) SetNameservers(v CreateNetworkIPv4WithPrefixGetNameserversRetType) { - setCreateNetworkIPv4WithPrefixGetNameserversAttributeType(&o.Nameservers, v) -} - -// GetPrefix returns the Prefix field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) GetPrefix() (ret CreateNetworkIPv4WithPrefixGetPrefixRetType) { - ret, _ = o.GetPrefixOk() - return ret -} - -// GetPrefixOk returns a tuple with the Prefix field value -// 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 *CreateNetworkIPv4WithPrefix) GetPrefixOk() (ret CreateNetworkIPv4WithPrefixGetPrefixRetType, ok bool) { - return getCreateNetworkIPv4WithPrefixGetPrefixAttributeTypeOk(o.Prefix) -} - -// SetPrefix sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) SetPrefix(v CreateNetworkIPv4WithPrefixGetPrefixRetType) { - setCreateNetworkIPv4WithPrefixGetPrefixAttributeType(&o.Prefix, v) -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId 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 *CreateNetworkIPv4WithPrefix) GetVpcNetworkRangeId() (res CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdRetType) { - res, _ = o.GetVpcNetworkRangeIdOk() - return -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId 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 *CreateNetworkIPv4WithPrefix) GetVpcNetworkRangeIdOk() (ret CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdRetType, ok bool) { - return getCreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId) -} - -// HasVpcNetworkRangeId 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 *CreateNetworkIPv4WithPrefix) HasVpcNetworkRangeId() bool { - _, ok := o.GetVpcNetworkRangeIdOk() - return ok -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefix) SetVpcNetworkRangeId(v CreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdRetType) { - setCreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeType(&o.VpcNetworkRangeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateNetworkIPv4WithPrefix) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateNetworkIPv4WithPrefixGetGatewayAttributeTypeOk(o.Gateway); ok { - toSerialize["Gateway"] = val - } - if val, ok := getCreateNetworkIPv4WithPrefixGetNameserversAttributeTypeOk(o.Nameservers); ok { - toSerialize["Nameservers"] = val - } - if val, ok := getCreateNetworkIPv4WithPrefixGetPrefixAttributeTypeOk(o.Prefix); ok { - toSerialize["Prefix"] = val - } - if val, ok := getCreateNetworkIPv4WithPrefixGetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId); ok { - toSerialize["VpcNetworkRangeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkIPv4WithPrefix struct { - value *CreateNetworkIPv4WithPrefix - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkIPv4WithPrefix) Get() *CreateNetworkIPv4WithPrefix { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkIPv4WithPrefix) Set(val *CreateNetworkIPv4WithPrefix) { - 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 NullableCreateNetworkIPv4WithPrefix) 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 *NullableCreateNetworkIPv4WithPrefix) 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 NewNullableCreateNetworkIPv4WithPrefix(val *CreateNetworkIPv4WithPrefix) *NullableCreateNetworkIPv4WithPrefix { - return &NullableCreateNetworkIPv4WithPrefix{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 NullableCreateNetworkIPv4WithPrefix) 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 *NullableCreateNetworkIPv4WithPrefix) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_ipv4_with_prefix_length.go b/services/iaas/model_create_network_ipv4_with_prefix_length.go deleted file mode 100644 index b1fd694fbf..0000000000 --- a/services/iaas/model_create_network_ipv4_with_prefix_length.go +++ /dev/null @@ -1,267 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkIPv4WithPrefixLength type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkIPv4WithPrefixLength{} - -/* - types and functions for nameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeTypeOk(arg CreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType) (ret CreateNetworkIPv4WithPrefixLengthGetNameserversRetType, 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 setCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType(arg *CreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType, val CreateNetworkIPv4WithPrefixLengthGetNameserversRetType) { - *arg = &val -} - -/* - types and functions for prefixLength -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetPrefixLengthArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeTypeOk(arg CreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType) (ret CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType, 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 setCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType(arg *CreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType, val CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType) { - *arg = &val -} - -/* - types and functions for vpcNetworkRangeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeTypeOk(arg CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeType) (ret CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdRetType, 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 setCreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeType(arg *CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeType, val CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdRetType = string - -// CreateNetworkIPv4WithPrefixLength The create request for an IPv4 network with a wanted prefix length. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv4WithPrefixLength struct { - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers CreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType `json:"nameservers,omitempty"` - // REQUIRED - PrefixLength CreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType `json:"prefixLength" required:"true"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeType `json:"vpcNetworkRangeId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkIPv4WithPrefixLength(prefixLength CreateNetworkIPv4WithPrefixLengthGetPrefixLengthArgType) *CreateNetworkIPv4WithPrefixLength { - this := CreateNetworkIPv4WithPrefixLength{} - setCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkIPv4WithPrefixLengthWithDefaults() *CreateNetworkIPv4WithPrefixLength { - this := CreateNetworkIPv4WithPrefixLength{} - return &this -} - -// GetNameservers returns the Nameservers 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 *CreateNetworkIPv4WithPrefixLength) GetNameservers() (res CreateNetworkIPv4WithPrefixLengthGetNameserversRetType) { - res, _ = o.GetNameserversOk() - return -} - -// GetNameserversOk returns a tuple with the Nameservers 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 *CreateNetworkIPv4WithPrefixLength) GetNameserversOk() (ret CreateNetworkIPv4WithPrefixLengthGetNameserversRetType, ok bool) { - return getCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeTypeOk(o.Nameservers) -} - -// HasNameservers 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 *CreateNetworkIPv4WithPrefixLength) HasNameservers() bool { - _, ok := o.GetNameserversOk() - return ok -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefixLength) SetNameservers(v CreateNetworkIPv4WithPrefixLengthGetNameserversRetType) { - setCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType(&o.Nameservers, v) -} - -// GetPrefixLength returns the PrefixLength field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefixLength) GetPrefixLength() (ret CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType) { - ret, _ = o.GetPrefixLengthOk() - return ret -} - -// GetPrefixLengthOk returns a tuple with the PrefixLength field value -// 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 *CreateNetworkIPv4WithPrefixLength) GetPrefixLengthOk() (ret CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType, ok bool) { - return getCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeTypeOk(o.PrefixLength) -} - -// SetPrefixLength sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefixLength) SetPrefixLength(v CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType) { - setCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType(&o.PrefixLength, v) -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId 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 *CreateNetworkIPv4WithPrefixLength) GetVpcNetworkRangeId() (res CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdRetType) { - res, _ = o.GetVpcNetworkRangeIdOk() - return -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId 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 *CreateNetworkIPv4WithPrefixLength) GetVpcNetworkRangeIdOk() (ret CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdRetType, ok bool) { - return getCreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId) -} - -// HasVpcNetworkRangeId 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 *CreateNetworkIPv4WithPrefixLength) HasVpcNetworkRangeId() bool { - _, ok := o.GetVpcNetworkRangeIdOk() - return ok -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv4WithPrefixLength) SetVpcNetworkRangeId(v CreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdRetType) { - setCreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeType(&o.VpcNetworkRangeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateNetworkIPv4WithPrefixLength) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeTypeOk(o.Nameservers); ok { - toSerialize["Nameservers"] = val - } - if val, ok := getCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeTypeOk(o.PrefixLength); ok { - toSerialize["PrefixLength"] = val - } - if val, ok := getCreateNetworkIPv4WithPrefixLengthGetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId); ok { - toSerialize["VpcNetworkRangeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkIPv4WithPrefixLength struct { - value *CreateNetworkIPv4WithPrefixLength - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkIPv4WithPrefixLength) Get() *CreateNetworkIPv4WithPrefixLength { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkIPv4WithPrefixLength) Set(val *CreateNetworkIPv4WithPrefixLength) { - 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 NullableCreateNetworkIPv4WithPrefixLength) 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 *NullableCreateNetworkIPv4WithPrefixLength) 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 NewNullableCreateNetworkIPv4WithPrefixLength(val *CreateNetworkIPv4WithPrefixLength) *NullableCreateNetworkIPv4WithPrefixLength { - return &NullableCreateNetworkIPv4WithPrefixLength{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 NullableCreateNetworkIPv4WithPrefixLength) 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 *NullableCreateNetworkIPv4WithPrefixLength) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_ipv4_with_prefix_length_test.go b/services/iaas/model_create_network_ipv4_with_prefix_length_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_ipv4_with_prefix_length_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_ipv4_with_prefix_test.go b/services/iaas/model_create_network_ipv4_with_prefix_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_ipv4_with_prefix_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_ipv6.go b/services/iaas/model_create_network_ipv6.go deleted file mode 100644 index 3caf063be4..0000000000 --- a/services/iaas/model_create_network_ipv6.go +++ /dev/null @@ -1,159 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" -) - -// CreateNetworkIPv6 - The create request for an IPv6 network. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6 struct { - CreateNetworkIPv6WithPrefix *CreateNetworkIPv6WithPrefix - CreateNetworkIPv6WithPrefixLength *CreateNetworkIPv6WithPrefixLength -} - -// CreateNetworkIPv6WithPrefixAsCreateNetworkIPv6 is a convenience function that returns CreateNetworkIPv6WithPrefix wrapped in CreateNetworkIPv6 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateNetworkIPv6WithPrefixAsCreateNetworkIPv6(v *CreateNetworkIPv6WithPrefix) CreateNetworkIPv6 { - return CreateNetworkIPv6{ - CreateNetworkIPv6WithPrefix: v, - } -} - -// CreateNetworkIPv6WithPrefixLengthAsCreateNetworkIPv6 is a convenience function that returns CreateNetworkIPv6WithPrefixLength wrapped in CreateNetworkIPv6 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateNetworkIPv6WithPrefixLengthAsCreateNetworkIPv6(v *CreateNetworkIPv6WithPrefixLength) CreateNetworkIPv6 { - return CreateNetworkIPv6{ - CreateNetworkIPv6WithPrefixLength: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *CreateNetworkIPv6) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // Workaround until upstream issue is fixed: - // https://github.com/OpenAPITools/openapi-generator/issues/21751 - // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226 - // try to unmarshal data into CreateNetworkIPv6WithPrefix - dstCreateNetworkIPv61 := &CreateNetworkIPv6{} - err = json.Unmarshal(data, &dstCreateNetworkIPv61.CreateNetworkIPv6WithPrefix) - if err == nil { - jsonCreateNetworkIPv6WithPrefix, _ := json.Marshal(&dstCreateNetworkIPv61.CreateNetworkIPv6WithPrefix) - if string(jsonCreateNetworkIPv6WithPrefix) != "{}" { // empty struct - dst.CreateNetworkIPv6WithPrefix = dstCreateNetworkIPv61.CreateNetworkIPv6WithPrefix - match++ - } - } - - // try to unmarshal data into CreateNetworkIPv6WithPrefixLength - dstCreateNetworkIPv62 := &CreateNetworkIPv6{} - err = json.Unmarshal(data, &dstCreateNetworkIPv62.CreateNetworkIPv6WithPrefixLength) - if err == nil { - jsonCreateNetworkIPv6WithPrefixLength, _ := json.Marshal(&dstCreateNetworkIPv62.CreateNetworkIPv6WithPrefixLength) - if string(jsonCreateNetworkIPv6WithPrefixLength) != "{}" { // empty struct - dst.CreateNetworkIPv6WithPrefixLength = dstCreateNetworkIPv62.CreateNetworkIPv6WithPrefixLength - match++ - } - } - - 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 - 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) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.CreateNetworkIPv6WithPrefix != nil { - return json.Marshal(&src.CreateNetworkIPv6WithPrefix) - } - - if src.CreateNetworkIPv6WithPrefixLength != nil { - return json.Marshal(&src.CreateNetworkIPv6WithPrefixLength) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkIPv6 struct { - value *CreateNetworkIPv6 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkIPv6) Get() *CreateNetworkIPv6 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkIPv6) Set(val *CreateNetworkIPv6) { - 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 NullableCreateNetworkIPv6) 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 *NullableCreateNetworkIPv6) 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 NewNullableCreateNetworkIPv6(val *CreateNetworkIPv6) *NullableCreateNetworkIPv6 { - return &NullableCreateNetworkIPv6{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 NullableCreateNetworkIPv6) 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 *NullableCreateNetworkIPv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_ipv6_test.go b/services/iaas/model_create_network_ipv6_test.go deleted file mode 100644 index b1a5a15720..0000000000 --- a/services/iaas/model_create_network_ipv6_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas - -import ( - "testing" -) - -// isOneOf - -func TestCreateNetworkIPv6_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{} - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := &CreateNetworkIPv6{} - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - marshalJson, err := v.MarshalJSON() - if err != nil { - t.Fatalf("failed marshalling CreateNetworkIPv6: %v", err) - } - if string(marshalJson) != string(tt.args.src) { - t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson) - } - }) - } -} diff --git a/services/iaas/model_create_network_ipv6_with_prefix.go b/services/iaas/model_create_network_ipv6_with_prefix.go deleted file mode 100644 index b64cf38279..0000000000 --- a/services/iaas/model_create_network_ipv6_with_prefix.go +++ /dev/null @@ -1,344 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkIPv6WithPrefix type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkIPv6WithPrefix{} - -/* - types and functions for gateway -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetGatewayAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv6WithPrefixGetGatewayAttributeTypeOk(arg CreateNetworkIPv6WithPrefixGetGatewayAttributeType) (ret CreateNetworkIPv6WithPrefixGetGatewayRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateNetworkIPv6WithPrefixGetGatewayAttributeType(arg *CreateNetworkIPv6WithPrefixGetGatewayAttributeType, val CreateNetworkIPv6WithPrefixGetGatewayRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetGatewayArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetGatewayRetType = *string - -/* - types and functions for nameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv6WithPrefixGetNameserversAttributeTypeOk(arg CreateNetworkIPv6WithPrefixGetNameserversAttributeType) (ret CreateNetworkIPv6WithPrefixGetNameserversRetType, 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 setCreateNetworkIPv6WithPrefixGetNameserversAttributeType(arg *CreateNetworkIPv6WithPrefixGetNameserversAttributeType, val CreateNetworkIPv6WithPrefixGetNameserversRetType) { - *arg = &val -} - -/* - types and functions for prefix -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetPrefixAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv6WithPrefixGetPrefixAttributeTypeOk(arg CreateNetworkIPv6WithPrefixGetPrefixAttributeType) (ret CreateNetworkIPv6WithPrefixGetPrefixRetType, 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 setCreateNetworkIPv6WithPrefixGetPrefixAttributeType(arg *CreateNetworkIPv6WithPrefixGetPrefixAttributeType, val CreateNetworkIPv6WithPrefixGetPrefixRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetPrefixArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetPrefixRetType = string - -/* - types and functions for vpcNetworkRangeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeTypeOk(arg CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeType) (ret CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdRetType, 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 setCreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeType(arg *CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeType, val CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdRetType = string - -// CreateNetworkIPv6WithPrefix The create request for an IPv6 network with a specified prefix. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 CreateNetworkIPv6WithPrefixGetGatewayAttributeType `json:"gateway,omitempty"` - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers CreateNetworkIPv6WithPrefixGetNameserversAttributeType `json:"nameservers,omitempty"` - // Classless Inter-Domain Routing (CIDR) for IPv6. - // REQUIRED - Prefix CreateNetworkIPv6WithPrefixGetPrefixAttributeType `json:"prefix" required:"true"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeType `json:"vpcNetworkRangeId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkIPv6WithPrefix(prefix CreateNetworkIPv6WithPrefixGetPrefixArgType) *CreateNetworkIPv6WithPrefix { - this := CreateNetworkIPv6WithPrefix{} - setCreateNetworkIPv6WithPrefixGetPrefixAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) GetGateway() (res CreateNetworkIPv6WithPrefixGetGatewayRetType) { - res, _ = o.GetGatewayOk() - return -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) GetGatewayOk() (ret CreateNetworkIPv6WithPrefixGetGatewayRetType, ok bool) { - return getCreateNetworkIPv6WithPrefixGetGatewayAttributeTypeOk(o.Gateway) -} - -// HasGateway 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 *CreateNetworkIPv6WithPrefix) HasGateway() bool { - _, ok := o.GetGatewayOk() - return ok -} - -// SetGateway gets a reference to the given string and assigns it to the Gateway field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) SetGateway(v CreateNetworkIPv6WithPrefixGetGatewayRetType) { - setCreateNetworkIPv6WithPrefixGetGatewayAttributeType(&o.Gateway, v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) SetGatewayNil() { - o.Gateway = nil -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) UnsetGateway() { - o.Gateway = nil -} - -// GetNameservers returns the Nameservers 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 *CreateNetworkIPv6WithPrefix) GetNameservers() (res CreateNetworkIPv6WithPrefixGetNameserversRetType) { - res, _ = o.GetNameserversOk() - return -} - -// GetNameserversOk returns a tuple with the Nameservers 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 *CreateNetworkIPv6WithPrefix) GetNameserversOk() (ret CreateNetworkIPv6WithPrefixGetNameserversRetType, ok bool) { - return getCreateNetworkIPv6WithPrefixGetNameserversAttributeTypeOk(o.Nameservers) -} - -// HasNameservers 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 *CreateNetworkIPv6WithPrefix) HasNameservers() bool { - _, ok := o.GetNameserversOk() - return ok -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) SetNameservers(v CreateNetworkIPv6WithPrefixGetNameserversRetType) { - setCreateNetworkIPv6WithPrefixGetNameserversAttributeType(&o.Nameservers, v) -} - -// GetPrefix returns the Prefix field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) GetPrefix() (ret CreateNetworkIPv6WithPrefixGetPrefixRetType) { - ret, _ = o.GetPrefixOk() - return ret -} - -// GetPrefixOk returns a tuple with the Prefix field value -// 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 *CreateNetworkIPv6WithPrefix) GetPrefixOk() (ret CreateNetworkIPv6WithPrefixGetPrefixRetType, ok bool) { - return getCreateNetworkIPv6WithPrefixGetPrefixAttributeTypeOk(o.Prefix) -} - -// SetPrefix sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) SetPrefix(v CreateNetworkIPv6WithPrefixGetPrefixRetType) { - setCreateNetworkIPv6WithPrefixGetPrefixAttributeType(&o.Prefix, v) -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId 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 *CreateNetworkIPv6WithPrefix) GetVpcNetworkRangeId() (res CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdRetType) { - res, _ = o.GetVpcNetworkRangeIdOk() - return -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId 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 *CreateNetworkIPv6WithPrefix) GetVpcNetworkRangeIdOk() (ret CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdRetType, ok bool) { - return getCreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId) -} - -// HasVpcNetworkRangeId 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 *CreateNetworkIPv6WithPrefix) HasVpcNetworkRangeId() bool { - _, ok := o.GetVpcNetworkRangeIdOk() - return ok -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefix) SetVpcNetworkRangeId(v CreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdRetType) { - setCreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeType(&o.VpcNetworkRangeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateNetworkIPv6WithPrefix) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateNetworkIPv6WithPrefixGetGatewayAttributeTypeOk(o.Gateway); ok { - toSerialize["Gateway"] = val - } - if val, ok := getCreateNetworkIPv6WithPrefixGetNameserversAttributeTypeOk(o.Nameservers); ok { - toSerialize["Nameservers"] = val - } - if val, ok := getCreateNetworkIPv6WithPrefixGetPrefixAttributeTypeOk(o.Prefix); ok { - toSerialize["Prefix"] = val - } - if val, ok := getCreateNetworkIPv6WithPrefixGetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId); ok { - toSerialize["VpcNetworkRangeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkIPv6WithPrefix struct { - value *CreateNetworkIPv6WithPrefix - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkIPv6WithPrefix) Get() *CreateNetworkIPv6WithPrefix { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkIPv6WithPrefix) Set(val *CreateNetworkIPv6WithPrefix) { - 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 NullableCreateNetworkIPv6WithPrefix) 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 *NullableCreateNetworkIPv6WithPrefix) 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 NewNullableCreateNetworkIPv6WithPrefix(val *CreateNetworkIPv6WithPrefix) *NullableCreateNetworkIPv6WithPrefix { - return &NullableCreateNetworkIPv6WithPrefix{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 NullableCreateNetworkIPv6WithPrefix) 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 *NullableCreateNetworkIPv6WithPrefix) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_ipv6_with_prefix_length.go b/services/iaas/model_create_network_ipv6_with_prefix_length.go deleted file mode 100644 index 0c66ad2a13..0000000000 --- a/services/iaas/model_create_network_ipv6_with_prefix_length.go +++ /dev/null @@ -1,267 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkIPv6WithPrefixLength type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkIPv6WithPrefixLength{} - -/* - types and functions for nameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeTypeOk(arg CreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType) (ret CreateNetworkIPv6WithPrefixLengthGetNameserversRetType, 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 setCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType(arg *CreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType, val CreateNetworkIPv6WithPrefixLengthGetNameserversRetType) { - *arg = &val -} - -/* - types and functions for prefixLength -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetPrefixLengthArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeTypeOk(arg CreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType) (ret CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType, 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 setCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType(arg *CreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType, val CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType) { - *arg = &val -} - -/* - types and functions for vpcNetworkRangeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeTypeOk(arg CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeType) (ret CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdRetType, 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 setCreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeType(arg *CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeType, val CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdRetType = string - -// CreateNetworkIPv6WithPrefixLength The create request for an IPv6 network with a wanted prefix length. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkIPv6WithPrefixLength struct { - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers CreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType `json:"nameservers,omitempty"` - // REQUIRED - PrefixLength CreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType `json:"prefixLength" required:"true"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeType `json:"vpcNetworkRangeId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkIPv6WithPrefixLength(prefixLength CreateNetworkIPv6WithPrefixLengthGetPrefixLengthArgType) *CreateNetworkIPv6WithPrefixLength { - this := CreateNetworkIPv6WithPrefixLength{} - setCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkIPv6WithPrefixLengthWithDefaults() *CreateNetworkIPv6WithPrefixLength { - this := CreateNetworkIPv6WithPrefixLength{} - return &this -} - -// GetNameservers returns the Nameservers 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 *CreateNetworkIPv6WithPrefixLength) GetNameservers() (res CreateNetworkIPv6WithPrefixLengthGetNameserversRetType) { - res, _ = o.GetNameserversOk() - return -} - -// GetNameserversOk returns a tuple with the Nameservers 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 *CreateNetworkIPv6WithPrefixLength) GetNameserversOk() (ret CreateNetworkIPv6WithPrefixLengthGetNameserversRetType, ok bool) { - return getCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeTypeOk(o.Nameservers) -} - -// HasNameservers 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 *CreateNetworkIPv6WithPrefixLength) HasNameservers() bool { - _, ok := o.GetNameserversOk() - return ok -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefixLength) SetNameservers(v CreateNetworkIPv6WithPrefixLengthGetNameserversRetType) { - setCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType(&o.Nameservers, v) -} - -// GetPrefixLength returns the PrefixLength field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefixLength) GetPrefixLength() (ret CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType) { - ret, _ = o.GetPrefixLengthOk() - return ret -} - -// GetPrefixLengthOk returns a tuple with the PrefixLength field value -// 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 *CreateNetworkIPv6WithPrefixLength) GetPrefixLengthOk() (ret CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType, ok bool) { - return getCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeTypeOk(o.PrefixLength) -} - -// SetPrefixLength sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefixLength) SetPrefixLength(v CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType) { - setCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType(&o.PrefixLength, v) -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId 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 *CreateNetworkIPv6WithPrefixLength) GetVpcNetworkRangeId() (res CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdRetType) { - res, _ = o.GetVpcNetworkRangeIdOk() - return -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId 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 *CreateNetworkIPv6WithPrefixLength) GetVpcNetworkRangeIdOk() (ret CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdRetType, ok bool) { - return getCreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId) -} - -// HasVpcNetworkRangeId 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 *CreateNetworkIPv6WithPrefixLength) HasVpcNetworkRangeId() bool { - _, ok := o.GetVpcNetworkRangeIdOk() - return ok -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkIPv6WithPrefixLength) SetVpcNetworkRangeId(v CreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdRetType) { - setCreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeType(&o.VpcNetworkRangeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateNetworkIPv6WithPrefixLength) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeTypeOk(o.Nameservers); ok { - toSerialize["Nameservers"] = val - } - if val, ok := getCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeTypeOk(o.PrefixLength); ok { - toSerialize["PrefixLength"] = val - } - if val, ok := getCreateNetworkIPv6WithPrefixLengthGetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId); ok { - toSerialize["VpcNetworkRangeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkIPv6WithPrefixLength struct { - value *CreateNetworkIPv6WithPrefixLength - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkIPv6WithPrefixLength) Get() *CreateNetworkIPv6WithPrefixLength { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkIPv6WithPrefixLength) Set(val *CreateNetworkIPv6WithPrefixLength) { - 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 NullableCreateNetworkIPv6WithPrefixLength) 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 *NullableCreateNetworkIPv6WithPrefixLength) 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 NewNullableCreateNetworkIPv6WithPrefixLength(val *CreateNetworkIPv6WithPrefixLength) *NullableCreateNetworkIPv6WithPrefixLength { - return &NullableCreateNetworkIPv6WithPrefixLength{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 NullableCreateNetworkIPv6WithPrefixLength) 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 *NullableCreateNetworkIPv6WithPrefixLength) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_ipv6_with_prefix_length_test.go b/services/iaas/model_create_network_ipv6_with_prefix_length_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_ipv6_with_prefix_length_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_ipv6_with_prefix_test.go b/services/iaas/model_create_network_ipv6_with_prefix_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_ipv6_with_prefix_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_network_payload.go b/services/iaas/model_create_network_payload.go deleted file mode 100644 index 7feccbedfa..0000000000 --- a/services/iaas/model_create_network_payload.go +++ /dev/null @@ -1,563 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNetworkPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNetworkPayload{} - -/* - types and functions for dhcp -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadgetDhcpAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadgetDhcpArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadgetDhcpRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkPayloadgetDhcpAttributeTypeOk(arg CreateNetworkPayloadgetDhcpAttributeType) (ret CreateNetworkPayloadgetDhcpRetType, 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 setCreateNetworkPayloadgetDhcpAttributeType(arg *CreateNetworkPayloadgetDhcpAttributeType, val CreateNetworkPayloadgetDhcpRetType) { - *arg = &val -} - -/* - types and functions for ipv4 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetIpv4AttributeType = *CreateNetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetIpv4ArgType = CreateNetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetIpv4RetType = CreateNetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkPayloadGetIpv4AttributeTypeOk(arg CreateNetworkPayloadGetIpv4AttributeType) (ret CreateNetworkPayloadGetIpv4RetType, 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 setCreateNetworkPayloadGetIpv4AttributeType(arg *CreateNetworkPayloadGetIpv4AttributeType, val CreateNetworkPayloadGetIpv4RetType) { - *arg = &val -} - -/* - types and functions for ipv6 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetIpv6AttributeType = *CreateNetworkIPv6 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetIpv6ArgType = CreateNetworkIPv6 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetIpv6RetType = CreateNetworkIPv6 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkPayloadGetIpv6AttributeTypeOk(arg CreateNetworkPayloadGetIpv6AttributeType) (ret CreateNetworkPayloadGetIpv6RetType, 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 setCreateNetworkPayloadGetIpv6AttributeType(arg *CreateNetworkPayloadGetIpv6AttributeType, val CreateNetworkPayloadGetIpv6RetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkPayloadGetLabelsAttributeTypeOk(arg CreateNetworkPayloadGetLabelsAttributeType) (ret CreateNetworkPayloadGetLabelsRetType, 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 setCreateNetworkPayloadGetLabelsAttributeType(arg *CreateNetworkPayloadGetLabelsAttributeType, val CreateNetworkPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkPayloadGetNameAttributeTypeOk(arg CreateNetworkPayloadGetNameAttributeType) (ret CreateNetworkPayloadGetNameRetType, 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 setCreateNetworkPayloadGetNameAttributeType(arg *CreateNetworkPayloadGetNameAttributeType, val CreateNetworkPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetNameRetType = string - -/* - types and functions for routed -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadgetRoutedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadgetRoutedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadgetRoutedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkPayloadgetRoutedAttributeTypeOk(arg CreateNetworkPayloadgetRoutedAttributeType) (ret CreateNetworkPayloadgetRoutedRetType, 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 setCreateNetworkPayloadgetRoutedAttributeType(arg *CreateNetworkPayloadgetRoutedAttributeType, val CreateNetworkPayloadgetRoutedRetType) { - *arg = &val -} - -/* - types and functions for routingTableId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetRoutingTableIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkPayloadGetRoutingTableIdAttributeTypeOk(arg CreateNetworkPayloadGetRoutingTableIdAttributeType) (ret CreateNetworkPayloadGetRoutingTableIdRetType, 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 setCreateNetworkPayloadGetRoutingTableIdAttributeType(arg *CreateNetworkPayloadGetRoutingTableIdAttributeType, val CreateNetworkPayloadGetRoutingTableIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetRoutingTableIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetRoutingTableIdRetType = string - -/* - 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 CreateNetworkPayloadGetVpcIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNetworkPayloadGetVpcIdAttributeTypeOk(arg CreateNetworkPayloadGetVpcIdAttributeType) (ret CreateNetworkPayloadGetVpcIdRetType, 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 setCreateNetworkPayloadGetVpcIdAttributeType(arg *CreateNetworkPayloadGetVpcIdAttributeType, val CreateNetworkPayloadGetVpcIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNetworkPayloadGetVpcIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 { - // 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. - Labels CreateNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name CreateNetworkPayloadGetNameAttributeType `json:"name" required:"true"` - // Shows if the network is routed and therefore accessible from other networks. - Routed CreateNetworkPayloadgetRoutedAttributeType `json:"routed,omitempty"` - // Universally Unique Identifier (UUID). - RoutingTableId CreateNetworkPayloadGetRoutingTableIdAttributeType `json:"routingTableId,omitempty"` - // Universally Unique Identifier (UUID). - VpcId CreateNetworkPayloadGetVpcIdAttributeType `json:"vpcId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNetworkPayload(name CreateNetworkPayloadGetNameArgType) *CreateNetworkPayload { - this := CreateNetworkPayload{} - setCreateNetworkPayloadGetNameAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// 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) { - res, _ = o.GetDhcpOk() - return -} - -// GetDhcpOk returns a tuple with the Dhcp 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) GetDhcpOk() (ret CreateNetworkPayloadgetDhcpRetType, ok bool) { - return getCreateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp) -} - -// HasDhcp 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) HasDhcp() bool { - _, ok := o.GetDhcpOk() - return ok -} - -// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) SetDhcp(v CreateNetworkPayloadgetDhcpRetType) { - setCreateNetworkPayloadgetDhcpAttributeType(&o.Dhcp, 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 *CreateNetworkPayload) GetIpv4() (res CreateNetworkPayloadGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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) GetIpv4Ok() (ret CreateNetworkPayloadGetIpv4RetType, ok bool) { - return getCreateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given CreateNetworkIPv4 and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) SetIpv4(v CreateNetworkPayloadGetIpv4RetType) { - setCreateNetworkPayloadGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetIpv6 returns the Ipv6 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) GetIpv6() (res CreateNetworkPayloadGetIpv6RetType) { - res, _ = o.GetIpv6Ok() - return -} - -// GetIpv6Ok returns a tuple with the Ipv6 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) GetIpv6Ok() (ret CreateNetworkPayloadGetIpv6RetType, ok bool) { - return getCreateNetworkPayloadGetIpv6AttributeTypeOk(o.Ipv6) -} - -// HasIpv6 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) HasIpv6() bool { - _, ok := o.GetIpv6Ok() - return ok -} - -// SetIpv6 gets a reference to the given CreateNetworkIPv6 and assigns it to the Ipv6 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) SetIpv6(v CreateNetworkPayloadGetIpv6RetType) { - setCreateNetworkPayloadGetIpv6AttributeType(&o.Ipv6, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) GetLabels() (res CreateNetworkPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) GetLabelsOk() (ret CreateNetworkPayloadGetLabelsRetType, ok bool) { - return getCreateNetworkPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) SetLabels(v CreateNetworkPayloadGetLabelsRetType) { - setCreateNetworkPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) GetName() (ret CreateNetworkPayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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) GetNameOk() (ret CreateNetworkPayloadGetNameRetType, ok bool) { - return getCreateNetworkPayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) SetName(v CreateNetworkPayloadGetNameRetType) { - setCreateNetworkPayloadGetNameAttributeType(&o.Name, v) -} - -// GetRouted returns the Routed 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) GetRouted() (res CreateNetworkPayloadgetRoutedRetType) { - res, _ = o.GetRoutedOk() - return -} - -// GetRoutedOk returns a tuple with the Routed 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) GetRoutedOk() (ret CreateNetworkPayloadgetRoutedRetType, ok bool) { - return getCreateNetworkPayloadgetRoutedAttributeTypeOk(o.Routed) -} - -// HasRouted 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) HasRouted() bool { - _, ok := o.GetRoutedOk() - return ok -} - -// SetRouted gets a reference to the given bool and assigns it to the Routed field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) SetRouted(v CreateNetworkPayloadgetRoutedRetType) { - setCreateNetworkPayloadgetRoutedAttributeType(&o.Routed, v) -} - -// GetRoutingTableId returns the RoutingTableId 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) GetRoutingTableId() (res CreateNetworkPayloadGetRoutingTableIdRetType) { - res, _ = o.GetRoutingTableIdOk() - return -} - -// GetRoutingTableIdOk returns a tuple with the RoutingTableId 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) GetRoutingTableIdOk() (ret CreateNetworkPayloadGetRoutingTableIdRetType, ok bool) { - return getCreateNetworkPayloadGetRoutingTableIdAttributeTypeOk(o.RoutingTableId) -} - -// HasRoutingTableId 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) HasRoutingTableId() bool { - _, ok := o.GetRoutingTableIdOk() - return ok -} - -// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNetworkPayload) SetRoutingTableId(v CreateNetworkPayloadGetRoutingTableIdRetType) { - setCreateNetworkPayloadGetRoutingTableIdAttributeType(&o.RoutingTableId, 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 *CreateNetworkPayload) GetVpcId() (res CreateNetworkPayloadGetVpcIdRetType) { - 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 *CreateNetworkPayload) GetVpcIdOk() (ret CreateNetworkPayloadGetVpcIdRetType, ok bool) { - return getCreateNetworkPayloadGetVpcIdAttributeTypeOk(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 *CreateNetworkPayload) 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 *CreateNetworkPayload) SetVpcId(v CreateNetworkPayloadGetVpcIdRetType) { - setCreateNetworkPayloadGetVpcIdAttributeType(&o.VpcId, v) -} - -// 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 := getCreateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok { - toSerialize["Dhcp"] = val - } - if val, ok := getCreateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getCreateNetworkPayloadGetIpv6AttributeTypeOk(o.Ipv6); ok { - toSerialize["Ipv6"] = val - } - if val, ok := getCreateNetworkPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateNetworkPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateNetworkPayloadgetRoutedAttributeTypeOk(o.Routed); ok { - toSerialize["Routed"] = val - } - if val, ok := getCreateNetworkPayloadGetRoutingTableIdAttributeTypeOk(o.RoutingTableId); ok { - toSerialize["RoutingTableId"] = val - } - if val, ok := getCreateNetworkPayloadGetVpcIdAttributeTypeOk(o.VpcId); ok { - toSerialize["VpcId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNetworkPayload struct { - value *CreateNetworkPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNetworkPayload) Get() *CreateNetworkPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNetworkPayload) Set(val *CreateNetworkPayload) { - 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 NullableCreateNetworkPayload) 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 *NullableCreateNetworkPayload) 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 NewNullableCreateNetworkPayload(val *CreateNetworkPayload) *NullableCreateNetworkPayload { - return &NullableCreateNetworkPayload{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 NullableCreateNetworkPayload) 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 *NullableCreateNetworkPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_network_payload_test.go b/services/iaas/model_create_network_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_network_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_nic_payload.go b/services/iaas/model_create_nic_payload.go deleted file mode 100644 index 35285e7f17..0000000000 --- a/services/iaas/model_create_nic_payload.go +++ /dev/null @@ -1,921 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateNicPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNicPayload{} - -/* - types and functions for allowedAddresses -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetAllowedAddressesAttributeType = *[]AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetAllowedAddressesArgType = []AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetAllowedAddressesRetType = []AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(arg CreateNicPayloadGetAllowedAddressesAttributeType) (ret CreateNicPayloadGetAllowedAddressesRetType, 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 setCreateNicPayloadGetAllowedAddressesAttributeType(arg *CreateNicPayloadGetAllowedAddressesAttributeType, val CreateNicPayloadGetAllowedAddressesRetType) { - *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 CreateNicPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetDescriptionAttributeTypeOk(arg CreateNicPayloadGetDescriptionAttributeType) (ret CreateNicPayloadGetDescriptionRetType, 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 setCreateNicPayloadGetDescriptionAttributeType(arg *CreateNicPayloadGetDescriptionAttributeType, val CreateNicPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetDescriptionRetType = string - -/* - types and functions for device -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetDeviceAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetDeviceAttributeTypeOk(arg CreateNicPayloadGetDeviceAttributeType) (ret CreateNicPayloadGetDeviceRetType, 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 setCreateNicPayloadGetDeviceAttributeType(arg *CreateNicPayloadGetDeviceAttributeType, val CreateNicPayloadGetDeviceRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetDeviceArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetDeviceRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetIdAttributeTypeOk(arg CreateNicPayloadGetIdAttributeType) (ret CreateNicPayloadGetIdRetType, 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 setCreateNicPayloadGetIdAttributeType(arg *CreateNicPayloadGetIdAttributeType, val CreateNicPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIdRetType = string - -/* - types and functions for ipv4 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIpv4AttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetIpv4AttributeTypeOk(arg CreateNicPayloadGetIpv4AttributeType) (ret CreateNicPayloadGetIpv4RetType, 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 setCreateNicPayloadGetIpv4AttributeType(arg *CreateNicPayloadGetIpv4AttributeType, val CreateNicPayloadGetIpv4RetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIpv4ArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIpv4RetType = string - -/* - types and functions for ipv6 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIpv6AttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetIpv6AttributeTypeOk(arg CreateNicPayloadGetIpv6AttributeType) (ret CreateNicPayloadGetIpv6RetType, 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 setCreateNicPayloadGetIpv6AttributeType(arg *CreateNicPayloadGetIpv6AttributeType, val CreateNicPayloadGetIpv6RetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIpv6ArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetIpv6RetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetLabelsAttributeTypeOk(arg CreateNicPayloadGetLabelsAttributeType) (ret CreateNicPayloadGetLabelsRetType, 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 setCreateNicPayloadGetLabelsAttributeType(arg *CreateNicPayloadGetLabelsAttributeType, val CreateNicPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for mac -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetMacAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetMacAttributeTypeOk(arg CreateNicPayloadGetMacAttributeType) (ret CreateNicPayloadGetMacRetType, 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 setCreateNicPayloadGetMacAttributeType(arg *CreateNicPayloadGetMacAttributeType, val CreateNicPayloadGetMacRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetMacArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetMacRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetNameAttributeTypeOk(arg CreateNicPayloadGetNameAttributeType) (ret CreateNicPayloadGetNameRetType, 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 setCreateNicPayloadGetNameAttributeType(arg *CreateNicPayloadGetNameAttributeType, val CreateNicPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetNameRetType = string - -/* - types and functions for networkId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetNetworkIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetNetworkIdAttributeTypeOk(arg CreateNicPayloadGetNetworkIdAttributeType) (ret CreateNicPayloadGetNetworkIdRetType, 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 setCreateNicPayloadGetNetworkIdAttributeType(arg *CreateNicPayloadGetNetworkIdAttributeType, val CreateNicPayloadGetNetworkIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetNetworkIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetNetworkIdRetType = string - -/* - types and functions for nicSecurity -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadgetNicSecurityAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadgetNicSecurityArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadgetNicSecurityRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadgetNicSecurityAttributeTypeOk(arg CreateNicPayloadgetNicSecurityAttributeType) (ret CreateNicPayloadgetNicSecurityRetType, 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 setCreateNicPayloadgetNicSecurityAttributeType(arg *CreateNicPayloadgetNicSecurityAttributeType, val CreateNicPayloadgetNicSecurityRetType) { - *arg = &val -} - -/* - types and functions for securityGroups -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetSecurityGroupsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetSecurityGroupsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetSecurityGroupsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(arg CreateNicPayloadGetSecurityGroupsAttributeType) (ret CreateNicPayloadGetSecurityGroupsRetType, 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 setCreateNicPayloadGetSecurityGroupsAttributeType(arg *CreateNicPayloadGetSecurityGroupsAttributeType, val CreateNicPayloadGetSecurityGroupsRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetStatusAttributeTypeOk(arg CreateNicPayloadGetStatusAttributeType) (ret CreateNicPayloadGetStatusRetType, 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 setCreateNicPayloadGetStatusAttributeType(arg *CreateNicPayloadGetStatusAttributeType, val CreateNicPayloadGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetStatusRetType = string - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateNicPayloadGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateNicPayloadGetTypeAttributeTypeOk(arg CreateNicPayloadGetTypeAttributeType) (ret CreateNicPayloadGetTypeRetType, 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 setCreateNicPayloadGetTypeAttributeType(arg *CreateNicPayloadGetTypeAttributeType, val CreateNicPayloadGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 - -// 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"` - // Description Object. Allows string up to 255 Characters. - Description CreateNicPayloadGetDescriptionAttributeType `json:"description,omitempty"` - // Universally Unique Identifier (UUID). - Device CreateNicPayloadGetDeviceAttributeType `json:"device,omitempty"` - // Universally Unique Identifier (UUID). - Id CreateNicPayloadGetIdAttributeType `json:"id,omitempty"` - // Object that represents an IP address. - 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. - Labels CreateNicPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // Object that represents an MAC address. - Mac CreateNicPayloadGetMacAttributeType `json:"mac,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name CreateNicPayloadGetNameAttributeType `json:"name,omitempty"` - // Universally Unique Identifier (UUID). - NetworkId CreateNicPayloadGetNetworkIdAttributeType `json:"networkId,omitempty"` - // If this is set to false, then no security groups will apply to this network interface. - NicSecurity CreateNicPayloadgetNicSecurityAttributeType `json:"nicSecurity,omitempty"` - // A list of UUIDs. - SecurityGroups CreateNicPayloadGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"` - // Possible values: `ACTIVE`, `DOWN`. - Status CreateNicPayloadGetStatusAttributeType `json:"status,omitempty"` - // Possible values: `server`, `metadata`, `gateway`, `none`. - Type CreateNicPayloadGetTypeAttributeType `json:"type,omitempty"` -} - -// NewCreateNicPayload instantiates a new CreateNicPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNicPayload() *CreateNicPayload { - this := CreateNicPayload{} - return &this -} - -// NewCreateNicPayloadWithDefaults instantiates a new CreateNicPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateNicPayloadWithDefaults() *CreateNicPayload { - this := CreateNicPayload{} - var nicSecurity bool = true - this.NicSecurity = &nicSecurity - return &this -} - -// GetAllowedAddresses returns the AllowedAddresses 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) GetAllowedAddresses() (res CreateNicPayloadGetAllowedAddressesRetType) { - res, _ = o.GetAllowedAddressesOk() - return -} - -// GetAllowedAddressesOk returns a tuple with the AllowedAddresses 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) GetAllowedAddressesOk() (ret CreateNicPayloadGetAllowedAddressesRetType, ok bool) { - return getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses) -} - -// HasAllowedAddresses 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) HasAllowedAddresses() bool { - _, ok := o.GetAllowedAddressesOk() - return ok -} - -// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetAllowedAddresses(v CreateNicPayloadGetAllowedAddressesRetType) { - setCreateNicPayloadGetAllowedAddressesAttributeType(&o.AllowedAddresses, 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) { - 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 *CreateNicPayload) GetDescriptionOk() (ret CreateNicPayloadGetDescriptionRetType, ok bool) { - return getCreateNicPayloadGetDescriptionAttributeTypeOk(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 *CreateNicPayload) 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 *CreateNicPayload) SetDescription(v CreateNicPayloadGetDescriptionRetType) { - setCreateNicPayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetDevice returns the Device 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) GetDevice() (res CreateNicPayloadGetDeviceRetType) { - res, _ = o.GetDeviceOk() - return -} - -// GetDeviceOk returns a tuple with the Device 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) GetDeviceOk() (ret CreateNicPayloadGetDeviceRetType, ok bool) { - return getCreateNicPayloadGetDeviceAttributeTypeOk(o.Device) -} - -// HasDevice 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) HasDevice() bool { - _, ok := o.GetDeviceOk() - return ok -} - -// SetDevice gets a reference to the given string and assigns it to the Device field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetDevice(v CreateNicPayloadGetDeviceRetType) { - setCreateNicPayloadGetDeviceAttributeType(&o.Device, 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 *CreateNicPayload) GetId() (res CreateNicPayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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) GetIdOk() (ret CreateNicPayloadGetIdRetType, ok bool) { - return getCreateNicPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetId(v CreateNicPayloadGetIdRetType) { - setCreateNicPayloadGetIdAttributeType(&o.Id, 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 *CreateNicPayload) GetIpv4() (res CreateNicPayloadGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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) GetIpv4Ok() (ret CreateNicPayloadGetIpv4RetType, ok bool) { - return getCreateNicPayloadGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given string and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetIpv4(v CreateNicPayloadGetIpv4RetType) { - setCreateNicPayloadGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetIpv6 returns the Ipv6 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) GetIpv6() (res CreateNicPayloadGetIpv6RetType) { - res, _ = o.GetIpv6Ok() - return -} - -// GetIpv6Ok returns a tuple with the Ipv6 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) GetIpv6Ok() (ret CreateNicPayloadGetIpv6RetType, ok bool) { - return getCreateNicPayloadGetIpv6AttributeTypeOk(o.Ipv6) -} - -// HasIpv6 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) HasIpv6() bool { - _, ok := o.GetIpv6Ok() - return ok -} - -// SetIpv6 gets a reference to the given string and assigns it to the Ipv6 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetIpv6(v CreateNicPayloadGetIpv6RetType) { - setCreateNicPayloadGetIpv6AttributeType(&o.Ipv6, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) GetLabels() (res CreateNicPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) GetLabelsOk() (ret CreateNicPayloadGetLabelsRetType, ok bool) { - return getCreateNicPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetLabels(v CreateNicPayloadGetLabelsRetType) { - setCreateNicPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetMac returns the Mac 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) GetMac() (res CreateNicPayloadGetMacRetType) { - res, _ = o.GetMacOk() - return -} - -// GetMacOk returns a tuple with the Mac 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) GetMacOk() (ret CreateNicPayloadGetMacRetType, ok bool) { - return getCreateNicPayloadGetMacAttributeTypeOk(o.Mac) -} - -// HasMac 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) HasMac() bool { - _, ok := o.GetMacOk() - return ok -} - -// SetMac gets a reference to the given string and assigns it to the Mac field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetMac(v CreateNicPayloadGetMacRetType) { - setCreateNicPayloadGetMacAttributeType(&o.Mac, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) GetName() (res CreateNicPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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) GetNameOk() (ret CreateNicPayloadGetNameRetType, ok bool) { - return getCreateNicPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetName(v CreateNicPayloadGetNameRetType) { - setCreateNicPayloadGetNameAttributeType(&o.Name, v) -} - -// GetNetworkId returns the NetworkId 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) GetNetworkId() (res CreateNicPayloadGetNetworkIdRetType) { - res, _ = o.GetNetworkIdOk() - return -} - -// GetNetworkIdOk returns a tuple with the NetworkId 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) GetNetworkIdOk() (ret CreateNicPayloadGetNetworkIdRetType, ok bool) { - return getCreateNicPayloadGetNetworkIdAttributeTypeOk(o.NetworkId) -} - -// HasNetworkId 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) HasNetworkId() bool { - _, ok := o.GetNetworkIdOk() - return ok -} - -// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetNetworkId(v CreateNicPayloadGetNetworkIdRetType) { - setCreateNicPayloadGetNetworkIdAttributeType(&o.NetworkId, v) -} - -// GetNicSecurity returns the NicSecurity 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) GetNicSecurity() (res CreateNicPayloadgetNicSecurityRetType) { - res, _ = o.GetNicSecurityOk() - return -} - -// GetNicSecurityOk returns a tuple with the NicSecurity 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) GetNicSecurityOk() (ret CreateNicPayloadgetNicSecurityRetType, ok bool) { - return getCreateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity) -} - -// HasNicSecurity 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) HasNicSecurity() bool { - _, ok := o.GetNicSecurityOk() - return ok -} - -// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetNicSecurity(v CreateNicPayloadgetNicSecurityRetType) { - setCreateNicPayloadgetNicSecurityAttributeType(&o.NicSecurity, v) -} - -// GetSecurityGroups returns the SecurityGroups 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) GetSecurityGroups() (res CreateNicPayloadGetSecurityGroupsRetType) { - res, _ = o.GetSecurityGroupsOk() - return -} - -// GetSecurityGroupsOk returns a tuple with the SecurityGroups 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) GetSecurityGroupsOk() (ret CreateNicPayloadGetSecurityGroupsRetType, ok bool) { - return getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups) -} - -// HasSecurityGroups 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) HasSecurityGroups() bool { - _, ok := o.GetSecurityGroupsOk() - return ok -} - -// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetSecurityGroups(v CreateNicPayloadGetSecurityGroupsRetType) { - setCreateNicPayloadGetSecurityGroupsAttributeType(&o.SecurityGroups, v) -} - -// GetStatus returns the Status 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) GetStatus() (res CreateNicPayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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) GetStatusOk() (ret CreateNicPayloadGetStatusRetType, ok bool) { - return getCreateNicPayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetStatus(v CreateNicPayloadGetStatusRetType) { - setCreateNicPayloadGetStatusAttributeType(&o.Status, v) -} - -// GetType returns the Type 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) GetType() (res CreateNicPayloadGetTypeRetType) { - res, _ = o.GetTypeOk() - return -} - -// GetTypeOk returns a tuple with the Type 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) GetTypeOk() (ret CreateNicPayloadGetTypeRetType, ok bool) { - return getCreateNicPayloadGetTypeAttributeTypeOk(o.Type) -} - -// HasType 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) HasType() bool { - _, ok := o.GetTypeOk() - return ok -} - -// SetType gets a reference to the given string and assigns it to the Type field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateNicPayload) SetType(v CreateNicPayloadGetTypeRetType) { - setCreateNicPayloadGetTypeAttributeType(&o.Type, 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 := getCreateNicPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCreateNicPayloadGetDeviceAttributeTypeOk(o.Device); ok { - toSerialize["Device"] = val - } - if val, ok := getCreateNicPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateNicPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getCreateNicPayloadGetIpv6AttributeTypeOk(o.Ipv6); ok { - toSerialize["Ipv6"] = val - } - if val, ok := getCreateNicPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateNicPayloadGetMacAttributeTypeOk(o.Mac); ok { - toSerialize["Mac"] = val - } - if val, ok := getCreateNicPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateNicPayloadGetNetworkIdAttributeTypeOk(o.NetworkId); ok { - toSerialize["NetworkId"] = val - } - if val, ok := getCreateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity); ok { - toSerialize["NicSecurity"] = val - } - if val, ok := getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok { - toSerialize["SecurityGroups"] = val - } - if val, ok := getCreateNicPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getCreateNicPayloadGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateNicPayload struct { - value *CreateNicPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateNicPayload) Get() *CreateNicPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateNicPayload) Set(val *CreateNicPayload) { - 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 NullableCreateNicPayload) 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 *NullableCreateNicPayload) 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 NewNullableCreateNicPayload(val *CreateNicPayload) *NullableCreateNicPayload { - return &NullableCreateNicPayload{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 NullableCreateNicPayload) 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 *NullableCreateNicPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_nic_payload_test.go b/services/iaas/model_create_nic_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_nic_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_protocol.go b/services/iaas/model_create_protocol.go deleted file mode 100644 index ea75bcc1dd..0000000000 --- a/services/iaas/model_create_protocol.go +++ /dev/null @@ -1,159 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" -) - -// CreateProtocol - The schema for a protocol when creating a security group rule. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateProtocol struct { - Int64 *int64 - String *string -} - -// int64AsCreateProtocol is a convenience function that returns int64 wrapped in CreateProtocol -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func Int64AsCreateProtocol(v *int64) CreateProtocol { - return CreateProtocol{ - Int64: v, - } -} - -// stringAsCreateProtocol is a convenience function that returns string wrapped in CreateProtocol -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func StringAsCreateProtocol(v *string) CreateProtocol { - return CreateProtocol{ - String: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *CreateProtocol) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // Workaround until upstream issue is fixed: - // https://github.com/OpenAPITools/openapi-generator/issues/21751 - // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226 - // try to unmarshal data into Int64 - dstCreateProtocol1 := &CreateProtocol{} - err = json.Unmarshal(data, &dstCreateProtocol1.Int64) - if err == nil { - jsonInt64, _ := json.Marshal(&dstCreateProtocol1.Int64) - if string(jsonInt64) != "{}" { // empty struct - dst.Int64 = dstCreateProtocol1.Int64 - match++ - } - } - - // try to unmarshal data into String - dstCreateProtocol2 := &CreateProtocol{} - err = json.Unmarshal(data, &dstCreateProtocol2.String) - if err == nil { - jsonString, _ := json.Marshal(&dstCreateProtocol2.String) - if string(jsonString) != "{}" { // empty struct - dst.String = dstCreateProtocol2.String - match++ - } - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Int64 = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(CreateProtocol)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateProtocol) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.Int64 != nil { - return json.Marshal(&src.Int64) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *CreateProtocol) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.Int64 != nil { - return obj.Int64 - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateProtocol struct { - value *CreateProtocol - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateProtocol) Get() *CreateProtocol { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateProtocol) Set(val *CreateProtocol) { - 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 NullableCreateProtocol) 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 *NullableCreateProtocol) 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 NewNullableCreateProtocol(val *CreateProtocol) *NullableCreateProtocol { - return &NullableCreateProtocol{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 NullableCreateProtocol) 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 *NullableCreateProtocol) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_protocol_test.go b/services/iaas/model_create_protocol_test.go deleted file mode 100644 index 8b6faab8f2..0000000000 --- a/services/iaas/model_create_protocol_test.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas - -import ( - "testing" -) - -// isOneOf - -func TestCreateProtocol_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - - { - name: "success - int64 1", - args: args{ - src: []byte(`"1"`), - }, - wantErr: false, - }, - - { - name: "success - string null", - args: args{ - src: []byte(`"null"`), - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := &CreateProtocol{} - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - marshalJson, err := v.MarshalJSON() - if err != nil { - t.Fatalf("failed marshalling CreateProtocol: %v", err) - } - if string(marshalJson) != string(tt.args.src) { - t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson) - } - }) - } -} diff --git a/services/iaas/model_create_public_ip_payload.go b/services/iaas/model_create_public_ip_payload.go deleted file mode 100644 index 87682b9097..0000000000 --- a/services/iaas/model_create_public_ip_payload.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreatePublicIPPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreatePublicIPPayload{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreatePublicIPPayloadGetIdAttributeTypeOk(arg CreatePublicIPPayloadGetIdAttributeType) (ret CreatePublicIPPayloadGetIdRetType, 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 setCreatePublicIPPayloadGetIdAttributeType(arg *CreatePublicIPPayloadGetIdAttributeType, val CreatePublicIPPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetIdRetType = string - -/* - types and functions for ip -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetIpAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreatePublicIPPayloadGetIpAttributeTypeOk(arg CreatePublicIPPayloadGetIpAttributeType) (ret CreatePublicIPPayloadGetIpRetType, 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 setCreatePublicIPPayloadGetIpAttributeType(arg *CreatePublicIPPayloadGetIpAttributeType, val CreatePublicIPPayloadGetIpRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetIpArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetIpRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreatePublicIPPayloadGetLabelsAttributeTypeOk(arg CreatePublicIPPayloadGetLabelsAttributeType) (ret CreatePublicIPPayloadGetLabelsRetType, 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 setCreatePublicIPPayloadGetLabelsAttributeType(arg *CreatePublicIPPayloadGetLabelsAttributeType, val CreatePublicIPPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for networkInterface -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreatePublicIPPayloadGetNetworkInterfaceAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(arg CreatePublicIPPayloadGetNetworkInterfaceAttributeType) (ret CreatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreatePublicIPPayloadGetNetworkInterfaceAttributeType(arg *CreatePublicIPPayloadGetNetworkInterfaceAttributeType, val CreatePublicIPPayloadGetNetworkInterfaceRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 - -// 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 { - // 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. - Labels CreatePublicIPPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // Universally Unique Identifier (UUID). - NetworkInterface CreatePublicIPPayloadGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"` -} - -// NewCreatePublicIPPayload instantiates a new CreatePublicIPPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreatePublicIPPayload() *CreatePublicIPPayload { - this := CreatePublicIPPayload{} - return &this -} - -// NewCreatePublicIPPayloadWithDefaults instantiates a new CreatePublicIPPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreatePublicIPPayloadWithDefaults() *CreatePublicIPPayload { - this := CreatePublicIPPayload{} - return &this -} - -// 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) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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) GetIdOk() (ret CreatePublicIPPayloadGetIdRetType, ok bool) { - return getCreatePublicIPPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) SetId(v CreatePublicIPPayloadGetIdRetType) { - setCreatePublicIPPayloadGetIdAttributeType(&o.Id, v) -} - -// GetIp returns the Ip 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) GetIp() (res CreatePublicIPPayloadGetIpRetType) { - res, _ = o.GetIpOk() - return -} - -// GetIpOk returns a tuple with the Ip 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) GetIpOk() (ret CreatePublicIPPayloadGetIpRetType, ok bool) { - return getCreatePublicIPPayloadGetIpAttributeTypeOk(o.Ip) -} - -// HasIp 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) HasIp() bool { - _, ok := o.GetIpOk() - return ok -} - -// SetIp gets a reference to the given string and assigns it to the Ip field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) SetIp(v CreatePublicIPPayloadGetIpRetType) { - setCreatePublicIPPayloadGetIpAttributeType(&o.Ip, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) GetLabels() (res CreatePublicIPPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) GetLabelsOk() (ret CreatePublicIPPayloadGetLabelsRetType, ok bool) { - return getCreatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) SetLabels(v CreatePublicIPPayloadGetLabelsRetType) { - setCreatePublicIPPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetNetworkInterface returns the NetworkInterface field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) GetNetworkInterface() (res CreatePublicIPPayloadGetNetworkInterfaceRetType) { - res, _ = o.GetNetworkInterfaceOk() - return -} - -// GetNetworkInterfaceOk returns a tuple with the NetworkInterface 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) GetNetworkInterfaceOk() (ret CreatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) { - return getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface) -} - -// HasNetworkInterface 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) HasNetworkInterface() bool { - _, ok := o.GetNetworkInterfaceOk() - return ok -} - -// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) SetNetworkInterface(v CreatePublicIPPayloadGetNetworkInterfaceRetType) { - setCreatePublicIPPayloadGetNetworkInterfaceAttributeType(&o.NetworkInterface, v) -} - -// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) SetNetworkInterfaceNil() { - o.NetworkInterface = nil -} - -// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreatePublicIPPayload) UnsetNetworkInterface() { - o.NetworkInterface = nil -} - -// 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 := getCreatePublicIPPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreatePublicIPPayloadGetIpAttributeTypeOk(o.Ip); ok { - toSerialize["Ip"] = val - } - if val, ok := getCreatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok { - toSerialize["NetworkInterface"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreatePublicIPPayload struct { - value *CreatePublicIPPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreatePublicIPPayload) Get() *CreatePublicIPPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreatePublicIPPayload) Set(val *CreatePublicIPPayload) { - 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 NullableCreatePublicIPPayload) 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 *NullableCreatePublicIPPayload) 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 NewNullableCreatePublicIPPayload(val *CreatePublicIPPayload) *NullableCreatePublicIPPayload { - return &NullableCreatePublicIPPayload{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 NullableCreatePublicIPPayload) 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 *NullableCreatePublicIPPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_public_ip_payload_test.go b/services/iaas/model_create_public_ip_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_public_ip_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_security_group_payload.go b/services/iaas/model_create_security_group_payload.go deleted file mode 100644 index a77fe60993..0000000000 --- a/services/iaas/model_create_security_group_payload.go +++ /dev/null @@ -1,566 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the CreateSecurityGroupPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateSecurityGroupPayload{} - -/* - 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 CreateSecurityGroupPayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupPayloadGetCreatedAtAttributeTypeOk(arg CreateSecurityGroupPayloadGetCreatedAtAttributeType) (ret CreateSecurityGroupPayloadGetCreatedAtRetType, 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 setCreateSecurityGroupPayloadGetCreatedAtAttributeType(arg *CreateSecurityGroupPayloadGetCreatedAtAttributeType, val CreateSecurityGroupPayloadGetCreatedAtRetType) { - *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 CreateSecurityGroupPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupPayloadGetDescriptionAttributeTypeOk(arg CreateSecurityGroupPayloadGetDescriptionAttributeType) (ret CreateSecurityGroupPayloadGetDescriptionRetType, 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 setCreateSecurityGroupPayloadGetDescriptionAttributeType(arg *CreateSecurityGroupPayloadGetDescriptionAttributeType, val CreateSecurityGroupPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetDescriptionRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupPayloadGetIdAttributeTypeOk(arg CreateSecurityGroupPayloadGetIdAttributeType) (ret CreateSecurityGroupPayloadGetIdRetType, 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 setCreateSecurityGroupPayloadGetIdAttributeType(arg *CreateSecurityGroupPayloadGetIdAttributeType, val CreateSecurityGroupPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupPayloadGetLabelsAttributeTypeOk(arg CreateSecurityGroupPayloadGetLabelsAttributeType) (ret CreateSecurityGroupPayloadGetLabelsRetType, 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 setCreateSecurityGroupPayloadGetLabelsAttributeType(arg *CreateSecurityGroupPayloadGetLabelsAttributeType, val CreateSecurityGroupPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupPayloadGetNameAttributeTypeOk(arg CreateSecurityGroupPayloadGetNameAttributeType) (ret CreateSecurityGroupPayloadGetNameRetType, 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 setCreateSecurityGroupPayloadGetNameAttributeType(arg *CreateSecurityGroupPayloadGetNameAttributeType, val CreateSecurityGroupPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetNameRetType = string - -/* - types and functions for rules -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetRulesAttributeType = *[]SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetRulesArgType = []SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetRulesRetType = []SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupPayloadGetRulesAttributeTypeOk(arg CreateSecurityGroupPayloadGetRulesAttributeType) (ret CreateSecurityGroupPayloadGetRulesRetType, 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 setCreateSecurityGroupPayloadGetRulesAttributeType(arg *CreateSecurityGroupPayloadGetRulesAttributeType, val CreateSecurityGroupPayloadGetRulesRetType) { - *arg = &val -} - -/* - types and functions for stateful -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadgetStatefulAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadgetStatefulArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadgetStatefulRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupPayloadgetStatefulAttributeTypeOk(arg CreateSecurityGroupPayloadgetStatefulAttributeType) (ret CreateSecurityGroupPayloadgetStatefulRetType, 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 setCreateSecurityGroupPayloadgetStatefulAttributeType(arg *CreateSecurityGroupPayloadgetStatefulAttributeType, val CreateSecurityGroupPayloadgetStatefulRetType) { - *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 CreateSecurityGroupPayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupPayloadGetUpdatedAtAttributeTypeOk(arg CreateSecurityGroupPayloadGetUpdatedAtAttributeType) (ret CreateSecurityGroupPayloadGetUpdatedAtRetType, 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 setCreateSecurityGroupPayloadGetUpdatedAtAttributeType(arg *CreateSecurityGroupPayloadGetUpdatedAtAttributeType, val CreateSecurityGroupPayloadGetUpdatedAtRetType) { - *arg = &val -} - -// CreateSecurityGroupPayload Object that represents a security group. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupPayload struct { - // Date-time when resource was created. - CreatedAt CreateSecurityGroupPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - 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. - Labels CreateSecurityGroupPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name CreateSecurityGroupPayloadGetNameAttributeType `json:"name" required:"true"` - // A list containing security group rule objects. - Rules CreateSecurityGroupPayloadGetRulesAttributeType `json:"rules,omitempty"` - // Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server. - Stateful CreateSecurityGroupPayloadgetStatefulAttributeType `json:"stateful,omitempty"` - // Date-time when resource was last updated. - UpdatedAt CreateSecurityGroupPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateSecurityGroupPayload CreateSecurityGroupPayload - -// NewCreateSecurityGroupPayload instantiates a new CreateSecurityGroupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateSecurityGroupPayload(name CreateSecurityGroupPayloadGetNameArgType) *CreateSecurityGroupPayload { - this := CreateSecurityGroupPayload{} - setCreateSecurityGroupPayloadGetNameAttributeType(&this.Name, name) - return &this -} - -// NewCreateSecurityGroupPayloadWithDefaults instantiates a new CreateSecurityGroupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateSecurityGroupPayloadWithDefaults() *CreateSecurityGroupPayload { - this := CreateSecurityGroupPayload{} - var stateful bool = true - this.Stateful = &stateful - 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 *CreateSecurityGroupPayload) GetCreatedAt() (res CreateSecurityGroupPayloadGetCreatedAtRetType) { - 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 *CreateSecurityGroupPayload) GetCreatedAtOk() (ret CreateSecurityGroupPayloadGetCreatedAtRetType, ok bool) { - return getCreateSecurityGroupPayloadGetCreatedAtAttributeTypeOk(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 *CreateSecurityGroupPayload) 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 *CreateSecurityGroupPayload) SetCreatedAt(v CreateSecurityGroupPayloadGetCreatedAtRetType) { - setCreateSecurityGroupPayloadGetCreatedAtAttributeType(&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 *CreateSecurityGroupPayload) GetDescription() (res CreateSecurityGroupPayloadGetDescriptionRetType) { - 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 *CreateSecurityGroupPayload) GetDescriptionOk() (ret CreateSecurityGroupPayloadGetDescriptionRetType, ok bool) { - return getCreateSecurityGroupPayloadGetDescriptionAttributeTypeOk(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 *CreateSecurityGroupPayload) 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 *CreateSecurityGroupPayload) SetDescription(v CreateSecurityGroupPayloadGetDescriptionRetType) { - setCreateSecurityGroupPayloadGetDescriptionAttributeType(&o.Description, 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 *CreateSecurityGroupPayload) GetId() (res CreateSecurityGroupPayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *CreateSecurityGroupPayload) GetIdOk() (ret CreateSecurityGroupPayloadGetIdRetType, ok bool) { - return getCreateSecurityGroupPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *CreateSecurityGroupPayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) SetId(v CreateSecurityGroupPayloadGetIdRetType) { - setCreateSecurityGroupPayloadGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) GetLabels() (res CreateSecurityGroupPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) GetLabelsOk() (ret CreateSecurityGroupPayloadGetLabelsRetType, ok bool) { - return getCreateSecurityGroupPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) SetLabels(v CreateSecurityGroupPayloadGetLabelsRetType) { - setCreateSecurityGroupPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) GetName() (ret CreateSecurityGroupPayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *CreateSecurityGroupPayload) GetNameOk() (ret CreateSecurityGroupPayloadGetNameRetType, ok bool) { - return getCreateSecurityGroupPayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) SetName(v CreateSecurityGroupPayloadGetNameRetType) { - setCreateSecurityGroupPayloadGetNameAttributeType(&o.Name, v) -} - -// GetRules returns the Rules 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 *CreateSecurityGroupPayload) GetRules() (res CreateSecurityGroupPayloadGetRulesRetType) { - res, _ = o.GetRulesOk() - return -} - -// GetRulesOk returns a tuple with the Rules 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 *CreateSecurityGroupPayload) GetRulesOk() (ret CreateSecurityGroupPayloadGetRulesRetType, ok bool) { - return getCreateSecurityGroupPayloadGetRulesAttributeTypeOk(o.Rules) -} - -// HasRules 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 *CreateSecurityGroupPayload) HasRules() bool { - _, ok := o.GetRulesOk() - return ok -} - -// SetRules gets a reference to the given []SecurityGroupRule and assigns it to the Rules field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) SetRules(v CreateSecurityGroupPayloadGetRulesRetType) { - setCreateSecurityGroupPayloadGetRulesAttributeType(&o.Rules, v) -} - -// GetStateful returns the Stateful 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 *CreateSecurityGroupPayload) GetStateful() (res CreateSecurityGroupPayloadgetStatefulRetType) { - res, _ = o.GetStatefulOk() - return -} - -// GetStatefulOk returns a tuple with the Stateful 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 *CreateSecurityGroupPayload) GetStatefulOk() (ret CreateSecurityGroupPayloadgetStatefulRetType, ok bool) { - return getCreateSecurityGroupPayloadgetStatefulAttributeTypeOk(o.Stateful) -} - -// HasStateful 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 *CreateSecurityGroupPayload) HasStateful() bool { - _, ok := o.GetStatefulOk() - return ok -} - -// SetStateful gets a reference to the given bool and assigns it to the Stateful field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupPayload) SetStateful(v CreateSecurityGroupPayloadgetStatefulRetType) { - setCreateSecurityGroupPayloadgetStatefulAttributeType(&o.Stateful, 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 *CreateSecurityGroupPayload) GetUpdatedAt() (res CreateSecurityGroupPayloadGetUpdatedAtRetType) { - 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 *CreateSecurityGroupPayload) GetUpdatedAtOk() (ret CreateSecurityGroupPayloadGetUpdatedAtRetType, ok bool) { - return getCreateSecurityGroupPayloadGetUpdatedAtAttributeTypeOk(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 *CreateSecurityGroupPayload) 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 *CreateSecurityGroupPayload) SetUpdatedAt(v CreateSecurityGroupPayloadGetUpdatedAtRetType) { - setCreateSecurityGroupPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateSecurityGroupPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateSecurityGroupPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getCreateSecurityGroupPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCreateSecurityGroupPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateSecurityGroupPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateSecurityGroupPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateSecurityGroupPayloadGetRulesAttributeTypeOk(o.Rules); ok { - toSerialize["Rules"] = val - } - if val, ok := getCreateSecurityGroupPayloadgetStatefulAttributeTypeOk(o.Stateful); ok { - toSerialize["Stateful"] = val - } - if val, ok := getCreateSecurityGroupPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateSecurityGroupPayload struct { - value *CreateSecurityGroupPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateSecurityGroupPayload) Get() *CreateSecurityGroupPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateSecurityGroupPayload) Set(val *CreateSecurityGroupPayload) { - 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 NullableCreateSecurityGroupPayload) 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 *NullableCreateSecurityGroupPayload) 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 NewNullableCreateSecurityGroupPayload(val *CreateSecurityGroupPayload) *NullableCreateSecurityGroupPayload { - return &NullableCreateSecurityGroupPayload{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 NullableCreateSecurityGroupPayload) 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 *NullableCreateSecurityGroupPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_security_group_payload_test.go b/services/iaas/model_create_security_group_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_security_group_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_security_group_rule_payload.go b/services/iaas/model_create_security_group_rule_payload.go deleted file mode 100644 index 4488dc5ebd..0000000000 --- a/services/iaas/model_create_security_group_rule_payload.go +++ /dev/null @@ -1,799 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the CreateSecurityGroupRulePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateSecurityGroupRulePayload{} - -/* - 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 CreateSecurityGroupRulePayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetCreatedAtAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetCreatedAtAttributeType) (ret CreateSecurityGroupRulePayloadGetCreatedAtRetType, 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 setCreateSecurityGroupRulePayloadGetCreatedAtAttributeType(arg *CreateSecurityGroupRulePayloadGetCreatedAtAttributeType, val CreateSecurityGroupRulePayloadGetCreatedAtRetType) { - *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 CreateSecurityGroupRulePayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetDescriptionAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetDescriptionAttributeType) (ret CreateSecurityGroupRulePayloadGetDescriptionRetType, 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 setCreateSecurityGroupRulePayloadGetDescriptionAttributeType(arg *CreateSecurityGroupRulePayloadGetDescriptionAttributeType, val CreateSecurityGroupRulePayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetDescriptionRetType = string - -/* - types and functions for direction -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetDirectionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetDirectionAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetDirectionAttributeType) (ret CreateSecurityGroupRulePayloadGetDirectionRetType, 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 setCreateSecurityGroupRulePayloadGetDirectionAttributeType(arg *CreateSecurityGroupRulePayloadGetDirectionAttributeType, val CreateSecurityGroupRulePayloadGetDirectionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetDirectionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetDirectionRetType = string - -/* - types and functions for ethertype -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetEthertypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetEthertypeAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetEthertypeAttributeType) (ret CreateSecurityGroupRulePayloadGetEthertypeRetType, 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 setCreateSecurityGroupRulePayloadGetEthertypeAttributeType(arg *CreateSecurityGroupRulePayloadGetEthertypeAttributeType, val CreateSecurityGroupRulePayloadGetEthertypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetEthertypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetEthertypeRetType = string - -/* - types and functions for icmpParameters -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIcmpParametersAttributeType = *ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIcmpParametersArgType = ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIcmpParametersRetType = ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetIcmpParametersAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetIcmpParametersAttributeType) (ret CreateSecurityGroupRulePayloadGetIcmpParametersRetType, 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 setCreateSecurityGroupRulePayloadGetIcmpParametersAttributeType(arg *CreateSecurityGroupRulePayloadGetIcmpParametersAttributeType, val CreateSecurityGroupRulePayloadGetIcmpParametersRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetIdAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetIdAttributeType) (ret CreateSecurityGroupRulePayloadGetIdRetType, 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 setCreateSecurityGroupRulePayloadGetIdAttributeType(arg *CreateSecurityGroupRulePayloadGetIdAttributeType, val CreateSecurityGroupRulePayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIdRetType = string - -/* - types and functions for ipRange -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIpRangeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetIpRangeAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetIpRangeAttributeType) (ret CreateSecurityGroupRulePayloadGetIpRangeRetType, 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 setCreateSecurityGroupRulePayloadGetIpRangeAttributeType(arg *CreateSecurityGroupRulePayloadGetIpRangeAttributeType, val CreateSecurityGroupRulePayloadGetIpRangeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIpRangeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetIpRangeRetType = string - -/* - types and functions for portRange -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetPortRangeAttributeType = *PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetPortRangeArgType = PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetPortRangeRetType = PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetPortRangeAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetPortRangeAttributeType) (ret CreateSecurityGroupRulePayloadGetPortRangeRetType, 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 setCreateSecurityGroupRulePayloadGetPortRangeAttributeType(arg *CreateSecurityGroupRulePayloadGetPortRangeAttributeType, val CreateSecurityGroupRulePayloadGetPortRangeRetType) { - *arg = &val -} - -/* - types and functions for remoteSecurityGroupId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType) (ret CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType, 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 setCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType(arg *CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType, val CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType = string - -/* - types and functions for securityGroupId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType) (ret CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType, 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 setCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType(arg *CreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType, val CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetSecurityGroupIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType = 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 CreateSecurityGroupRulePayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetUpdatedAtAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetUpdatedAtAttributeType) (ret CreateSecurityGroupRulePayloadGetUpdatedAtRetType, 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 setCreateSecurityGroupRulePayloadGetUpdatedAtAttributeType(arg *CreateSecurityGroupRulePayloadGetUpdatedAtAttributeType, val CreateSecurityGroupRulePayloadGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for protocol -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetProtocolAttributeType = *CreateProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetProtocolArgType = CreateProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayloadGetProtocolRetType = CreateProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRulePayloadGetProtocolAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetProtocolAttributeType) (ret CreateSecurityGroupRulePayloadGetProtocolRetType, 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 setCreateSecurityGroupRulePayloadGetProtocolAttributeType(arg *CreateSecurityGroupRulePayloadGetProtocolAttributeType, val CreateSecurityGroupRulePayloadGetProtocolRetType) { - *arg = &val -} - -// CreateSecurityGroupRulePayload Object that represents a request body for security group rule creation. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRulePayload struct { - // Date-time when resource was created. - CreatedAt CreateSecurityGroupRulePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description CreateSecurityGroupRulePayloadGetDescriptionAttributeType `json:"description,omitempty"` - // The direction of the traffic which the rule should match. Possible values: `ingress`, `egress`. - // REQUIRED - Direction CreateSecurityGroupRulePayloadGetDirectionAttributeType `json:"direction" required:"true"` - // The ethertype which the rule should match. Possible values: `IPv4`, `IPv6`. - Ethertype CreateSecurityGroupRulePayloadGetEthertypeAttributeType `json:"ethertype,omitempty"` - IcmpParameters CreateSecurityGroupRulePayloadGetIcmpParametersAttributeType `json:"icmpParameters,omitempty"` - // Universally Unique Identifier (UUID). - Id CreateSecurityGroupRulePayloadGetIdAttributeType `json:"id,omitempty"` - // Classless Inter-Domain Routing (CIDR). - IpRange CreateSecurityGroupRulePayloadGetIpRangeAttributeType `json:"ipRange,omitempty"` - PortRange CreateSecurityGroupRulePayloadGetPortRangeAttributeType `json:"portRange,omitempty"` - // Universally Unique Identifier (UUID). - RemoteSecurityGroupId CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType `json:"remoteSecurityGroupId,omitempty"` - // Universally Unique Identifier (UUID). - SecurityGroupId CreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType `json:"securityGroupId,omitempty"` - // Date-time when resource was last updated. - UpdatedAt CreateSecurityGroupRulePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - Protocol CreateSecurityGroupRulePayloadGetProtocolAttributeType `json:"protocol,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateSecurityGroupRulePayload CreateSecurityGroupRulePayload - -// NewCreateSecurityGroupRulePayload instantiates a new CreateSecurityGroupRulePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateSecurityGroupRulePayload(direction CreateSecurityGroupRulePayloadGetDirectionArgType) *CreateSecurityGroupRulePayload { - this := CreateSecurityGroupRulePayload{} - setCreateSecurityGroupRulePayloadGetDirectionAttributeType(&this.Direction, direction) - return &this -} - -// NewCreateSecurityGroupRulePayloadWithDefaults instantiates a new CreateSecurityGroupRulePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateSecurityGroupRulePayloadWithDefaults() *CreateSecurityGroupRulePayload { - this := CreateSecurityGroupRulePayload{} - var ethertype string = "IPv4" - this.Ethertype = ðertype - 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 *CreateSecurityGroupRulePayload) GetCreatedAt() (res CreateSecurityGroupRulePayloadGetCreatedAtRetType) { - 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 *CreateSecurityGroupRulePayload) GetCreatedAtOk() (ret CreateSecurityGroupRulePayloadGetCreatedAtRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetCreatedAtAttributeTypeOk(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 *CreateSecurityGroupRulePayload) 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 *CreateSecurityGroupRulePayload) SetCreatedAt(v CreateSecurityGroupRulePayloadGetCreatedAtRetType) { - setCreateSecurityGroupRulePayloadGetCreatedAtAttributeType(&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 *CreateSecurityGroupRulePayload) GetDescription() (res CreateSecurityGroupRulePayloadGetDescriptionRetType) { - 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 *CreateSecurityGroupRulePayload) GetDescriptionOk() (ret CreateSecurityGroupRulePayloadGetDescriptionRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetDescriptionAttributeTypeOk(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 *CreateSecurityGroupRulePayload) 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 *CreateSecurityGroupRulePayload) SetDescription(v CreateSecurityGroupRulePayloadGetDescriptionRetType) { - setCreateSecurityGroupRulePayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetDirection returns the Direction field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) GetDirection() (ret CreateSecurityGroupRulePayloadGetDirectionRetType) { - ret, _ = o.GetDirectionOk() - return ret -} - -// GetDirectionOk returns a tuple with the Direction field value -// 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 *CreateSecurityGroupRulePayload) GetDirectionOk() (ret CreateSecurityGroupRulePayloadGetDirectionRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetDirectionAttributeTypeOk(o.Direction) -} - -// SetDirection sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetDirection(v CreateSecurityGroupRulePayloadGetDirectionRetType) { - setCreateSecurityGroupRulePayloadGetDirectionAttributeType(&o.Direction, v) -} - -// GetEthertype returns the Ethertype 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 *CreateSecurityGroupRulePayload) GetEthertype() (res CreateSecurityGroupRulePayloadGetEthertypeRetType) { - res, _ = o.GetEthertypeOk() - return -} - -// GetEthertypeOk returns a tuple with the Ethertype 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 *CreateSecurityGroupRulePayload) GetEthertypeOk() (ret CreateSecurityGroupRulePayloadGetEthertypeRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetEthertypeAttributeTypeOk(o.Ethertype) -} - -// HasEthertype 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 *CreateSecurityGroupRulePayload) HasEthertype() bool { - _, ok := o.GetEthertypeOk() - return ok -} - -// SetEthertype gets a reference to the given string and assigns it to the Ethertype field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetEthertype(v CreateSecurityGroupRulePayloadGetEthertypeRetType) { - setCreateSecurityGroupRulePayloadGetEthertypeAttributeType(&o.Ethertype, v) -} - -// GetIcmpParameters returns the IcmpParameters 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 *CreateSecurityGroupRulePayload) GetIcmpParameters() (res CreateSecurityGroupRulePayloadGetIcmpParametersRetType) { - res, _ = o.GetIcmpParametersOk() - return -} - -// GetIcmpParametersOk returns a tuple with the IcmpParameters 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 *CreateSecurityGroupRulePayload) GetIcmpParametersOk() (ret CreateSecurityGroupRulePayloadGetIcmpParametersRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetIcmpParametersAttributeTypeOk(o.IcmpParameters) -} - -// HasIcmpParameters 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 *CreateSecurityGroupRulePayload) HasIcmpParameters() bool { - _, ok := o.GetIcmpParametersOk() - return ok -} - -// SetIcmpParameters gets a reference to the given ICMPParameters and assigns it to the IcmpParameters field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetIcmpParameters(v CreateSecurityGroupRulePayloadGetIcmpParametersRetType) { - setCreateSecurityGroupRulePayloadGetIcmpParametersAttributeType(&o.IcmpParameters, 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 *CreateSecurityGroupRulePayload) GetId() (res CreateSecurityGroupRulePayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *CreateSecurityGroupRulePayload) GetIdOk() (ret CreateSecurityGroupRulePayloadGetIdRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *CreateSecurityGroupRulePayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetId(v CreateSecurityGroupRulePayloadGetIdRetType) { - setCreateSecurityGroupRulePayloadGetIdAttributeType(&o.Id, v) -} - -// GetIpRange returns the IpRange 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 *CreateSecurityGroupRulePayload) GetIpRange() (res CreateSecurityGroupRulePayloadGetIpRangeRetType) { - res, _ = o.GetIpRangeOk() - return -} - -// GetIpRangeOk returns a tuple with the IpRange 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 *CreateSecurityGroupRulePayload) GetIpRangeOk() (ret CreateSecurityGroupRulePayloadGetIpRangeRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetIpRangeAttributeTypeOk(o.IpRange) -} - -// HasIpRange 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 *CreateSecurityGroupRulePayload) HasIpRange() bool { - _, ok := o.GetIpRangeOk() - return ok -} - -// SetIpRange gets a reference to the given string and assigns it to the IpRange field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetIpRange(v CreateSecurityGroupRulePayloadGetIpRangeRetType) { - setCreateSecurityGroupRulePayloadGetIpRangeAttributeType(&o.IpRange, v) -} - -// GetPortRange returns the PortRange 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 *CreateSecurityGroupRulePayload) GetPortRange() (res CreateSecurityGroupRulePayloadGetPortRangeRetType) { - res, _ = o.GetPortRangeOk() - return -} - -// GetPortRangeOk returns a tuple with the PortRange 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 *CreateSecurityGroupRulePayload) GetPortRangeOk() (ret CreateSecurityGroupRulePayloadGetPortRangeRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetPortRangeAttributeTypeOk(o.PortRange) -} - -// HasPortRange 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 *CreateSecurityGroupRulePayload) HasPortRange() bool { - _, ok := o.GetPortRangeOk() - return ok -} - -// SetPortRange gets a reference to the given PortRange and assigns it to the PortRange field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetPortRange(v CreateSecurityGroupRulePayloadGetPortRangeRetType) { - setCreateSecurityGroupRulePayloadGetPortRangeAttributeType(&o.PortRange, v) -} - -// GetRemoteSecurityGroupId returns the RemoteSecurityGroupId 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 *CreateSecurityGroupRulePayload) GetRemoteSecurityGroupId() (res CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType) { - res, _ = o.GetRemoteSecurityGroupIdOk() - return -} - -// GetRemoteSecurityGroupIdOk returns a tuple with the RemoteSecurityGroupId 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 *CreateSecurityGroupRulePayload) GetRemoteSecurityGroupIdOk() (ret CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId) -} - -// HasRemoteSecurityGroupId 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 *CreateSecurityGroupRulePayload) HasRemoteSecurityGroupId() bool { - _, ok := o.GetRemoteSecurityGroupIdOk() - return ok -} - -// SetRemoteSecurityGroupId gets a reference to the given string and assigns it to the RemoteSecurityGroupId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetRemoteSecurityGroupId(v CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType) { - setCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType(&o.RemoteSecurityGroupId, v) -} - -// GetSecurityGroupId returns the SecurityGroupId 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 *CreateSecurityGroupRulePayload) GetSecurityGroupId() (res CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType) { - res, _ = o.GetSecurityGroupIdOk() - return -} - -// GetSecurityGroupIdOk returns a tuple with the SecurityGroupId 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 *CreateSecurityGroupRulePayload) GetSecurityGroupIdOk() (ret CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId) -} - -// HasSecurityGroupId 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 *CreateSecurityGroupRulePayload) HasSecurityGroupId() bool { - _, ok := o.GetSecurityGroupIdOk() - return ok -} - -// SetSecurityGroupId gets a reference to the given string and assigns it to the SecurityGroupId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetSecurityGroupId(v CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType) { - setCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType(&o.SecurityGroupId, 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 *CreateSecurityGroupRulePayload) GetUpdatedAt() (res CreateSecurityGroupRulePayloadGetUpdatedAtRetType) { - 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 *CreateSecurityGroupRulePayload) GetUpdatedAtOk() (ret CreateSecurityGroupRulePayloadGetUpdatedAtRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetUpdatedAtAttributeTypeOk(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 *CreateSecurityGroupRulePayload) 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 *CreateSecurityGroupRulePayload) SetUpdatedAt(v CreateSecurityGroupRulePayloadGetUpdatedAtRetType) { - setCreateSecurityGroupRulePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetProtocol returns the Protocol 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 *CreateSecurityGroupRulePayload) GetProtocol() (res CreateSecurityGroupRulePayloadGetProtocolRetType) { - res, _ = o.GetProtocolOk() - return -} - -// GetProtocolOk returns a tuple with the Protocol 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 *CreateSecurityGroupRulePayload) GetProtocolOk() (ret CreateSecurityGroupRulePayloadGetProtocolRetType, ok bool) { - return getCreateSecurityGroupRulePayloadGetProtocolAttributeTypeOk(o.Protocol) -} - -// HasProtocol 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 *CreateSecurityGroupRulePayload) HasProtocol() bool { - _, ok := o.GetProtocolOk() - return ok -} - -// SetProtocol gets a reference to the given CreateProtocol and assigns it to the Protocol field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRulePayload) SetProtocol(v CreateSecurityGroupRulePayloadGetProtocolRetType) { - setCreateSecurityGroupRulePayloadGetProtocolAttributeType(&o.Protocol, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateSecurityGroupRulePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateSecurityGroupRulePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetDirectionAttributeTypeOk(o.Direction); ok { - toSerialize["Direction"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetEthertypeAttributeTypeOk(o.Ethertype); ok { - toSerialize["Ethertype"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetIcmpParametersAttributeTypeOk(o.IcmpParameters); ok { - toSerialize["IcmpParameters"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetIpRangeAttributeTypeOk(o.IpRange); ok { - toSerialize["IpRange"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetPortRangeAttributeTypeOk(o.PortRange); ok { - toSerialize["PortRange"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId); ok { - toSerialize["RemoteSecurityGroupId"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId); ok { - toSerialize["SecurityGroupId"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getCreateSecurityGroupRulePayloadGetProtocolAttributeTypeOk(o.Protocol); ok { - toSerialize["Protocol"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateSecurityGroupRulePayload struct { - value *CreateSecurityGroupRulePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateSecurityGroupRulePayload) Get() *CreateSecurityGroupRulePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateSecurityGroupRulePayload) Set(val *CreateSecurityGroupRulePayload) { - 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 NullableCreateSecurityGroupRulePayload) 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 *NullableCreateSecurityGroupRulePayload) 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 NewNullableCreateSecurityGroupRulePayload(val *CreateSecurityGroupRulePayload) *NullableCreateSecurityGroupRulePayload { - return &NullableCreateSecurityGroupRulePayload{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 NullableCreateSecurityGroupRulePayload) 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 *NullableCreateSecurityGroupRulePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_security_group_rule_payload_test.go b/services/iaas/model_create_security_group_rule_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_security_group_rule_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_security_group_rule_protocol.go b/services/iaas/model_create_security_group_rule_protocol.go deleted file mode 100644 index 9987e22ef1..0000000000 --- a/services/iaas/model_create_security_group_rule_protocol.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateSecurityGroupRuleProtocol type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateSecurityGroupRuleProtocol{} - -/* - types and functions for protocol -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRuleProtocolGetProtocolAttributeType = *CreateProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRuleProtocolGetProtocolArgType = CreateProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRuleProtocolGetProtocolRetType = CreateProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(arg CreateSecurityGroupRuleProtocolGetProtocolAttributeType) (ret CreateSecurityGroupRuleProtocolGetProtocolRetType, 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 setCreateSecurityGroupRuleProtocolGetProtocolAttributeType(arg *CreateSecurityGroupRuleProtocolGetProtocolAttributeType, val CreateSecurityGroupRuleProtocolGetProtocolRetType) { - *arg = &val -} - -// CreateSecurityGroupRuleProtocol The internet protocol which the rule should match. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSecurityGroupRuleProtocol struct { - Protocol CreateSecurityGroupRuleProtocolGetProtocolAttributeType `json:"protocol,omitempty"` -} - -// NewCreateSecurityGroupRuleProtocol instantiates a new CreateSecurityGroupRuleProtocol 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateSecurityGroupRuleProtocol() *CreateSecurityGroupRuleProtocol { - this := CreateSecurityGroupRuleProtocol{} - return &this -} - -// NewCreateSecurityGroupRuleProtocolWithDefaults instantiates a new CreateSecurityGroupRuleProtocol 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateSecurityGroupRuleProtocolWithDefaults() *CreateSecurityGroupRuleProtocol { - this := CreateSecurityGroupRuleProtocol{} - return &this -} - -// GetProtocol returns the Protocol 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 *CreateSecurityGroupRuleProtocol) GetProtocol() (res CreateSecurityGroupRuleProtocolGetProtocolRetType) { - res, _ = o.GetProtocolOk() - return -} - -// GetProtocolOk returns a tuple with the Protocol 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 *CreateSecurityGroupRuleProtocol) GetProtocolOk() (ret CreateSecurityGroupRuleProtocolGetProtocolRetType, ok bool) { - return getCreateSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(o.Protocol) -} - -// HasProtocol 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 *CreateSecurityGroupRuleProtocol) HasProtocol() bool { - _, ok := o.GetProtocolOk() - return ok -} - -// SetProtocol gets a reference to the given CreateProtocol and assigns it to the Protocol field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSecurityGroupRuleProtocol) SetProtocol(v CreateSecurityGroupRuleProtocolGetProtocolRetType) { - setCreateSecurityGroupRuleProtocolGetProtocolAttributeType(&o.Protocol, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateSecurityGroupRuleProtocol) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(o.Protocol); ok { - toSerialize["Protocol"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateSecurityGroupRuleProtocol struct { - value *CreateSecurityGroupRuleProtocol - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateSecurityGroupRuleProtocol) Get() *CreateSecurityGroupRuleProtocol { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateSecurityGroupRuleProtocol) Set(val *CreateSecurityGroupRuleProtocol) { - 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 NullableCreateSecurityGroupRuleProtocol) 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 *NullableCreateSecurityGroupRuleProtocol) 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 NewNullableCreateSecurityGroupRuleProtocol(val *CreateSecurityGroupRuleProtocol) *NullableCreateSecurityGroupRuleProtocol { - return &NullableCreateSecurityGroupRuleProtocol{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 NullableCreateSecurityGroupRuleProtocol) 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 *NullableCreateSecurityGroupRuleProtocol) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_security_group_rule_protocol_test.go b/services/iaas/model_create_security_group_rule_protocol_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_security_group_rule_protocol_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_server_networking.go b/services/iaas/model_create_server_networking.go deleted file mode 100644 index 96617a54ac..0000000000 --- a/services/iaas/model_create_server_networking.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateServerNetworking type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateServerNetworking{} - -/* - types and functions for networkId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerNetworkingGetNetworkIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerNetworkingGetNetworkIdAttributeTypeOk(arg CreateServerNetworkingGetNetworkIdAttributeType) (ret CreateServerNetworkingGetNetworkIdRetType, 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 setCreateServerNetworkingGetNetworkIdAttributeType(arg *CreateServerNetworkingGetNetworkIdAttributeType, val CreateServerNetworkingGetNetworkIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerNetworkingGetNetworkIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerNetworkingGetNetworkIdRetType = string - -// CreateServerNetworking The initial networking setup for the server creation with a network. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerNetworking struct { - // Universally Unique Identifier (UUID). - NetworkId CreateServerNetworkingGetNetworkIdAttributeType `json:"networkId,omitempty"` -} - -// NewCreateServerNetworking instantiates a new CreateServerNetworking 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateServerNetworking() *CreateServerNetworking { - this := CreateServerNetworking{} - return &this -} - -// NewCreateServerNetworkingWithDefaults instantiates a new CreateServerNetworking 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateServerNetworkingWithDefaults() *CreateServerNetworking { - this := CreateServerNetworking{} - return &this -} - -// GetNetworkId returns the NetworkId 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 *CreateServerNetworking) GetNetworkId() (res CreateServerNetworkingGetNetworkIdRetType) { - res, _ = o.GetNetworkIdOk() - return -} - -// GetNetworkIdOk returns a tuple with the NetworkId 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 *CreateServerNetworking) GetNetworkIdOk() (ret CreateServerNetworkingGetNetworkIdRetType, ok bool) { - return getCreateServerNetworkingGetNetworkIdAttributeTypeOk(o.NetworkId) -} - -// HasNetworkId 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 *CreateServerNetworking) HasNetworkId() bool { - _, ok := o.GetNetworkIdOk() - return ok -} - -// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerNetworking) SetNetworkId(v CreateServerNetworkingGetNetworkIdRetType) { - setCreateServerNetworkingGetNetworkIdAttributeType(&o.NetworkId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateServerNetworking) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateServerNetworkingGetNetworkIdAttributeTypeOk(o.NetworkId); ok { - toSerialize["NetworkId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateServerNetworking struct { - value *CreateServerNetworking - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateServerNetworking) Get() *CreateServerNetworking { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateServerNetworking) Set(val *CreateServerNetworking) { - 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 NullableCreateServerNetworking) 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 *NullableCreateServerNetworking) 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 NewNullableCreateServerNetworking(val *CreateServerNetworking) *NullableCreateServerNetworking { - return &NullableCreateServerNetworking{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 NullableCreateServerNetworking) 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 *NullableCreateServerNetworking) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_server_networking_test.go b/services/iaas/model_create_server_networking_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_server_networking_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_server_networking_with_nics.go b/services/iaas/model_create_server_networking_with_nics.go deleted file mode 100644 index cb50cb8f72..0000000000 --- a/services/iaas/model_create_server_networking_with_nics.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateServerNetworkingWithNics type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateServerNetworkingWithNics{} - -/* - types and functions for nicIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerNetworkingWithNicsGetNicIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerNetworkingWithNicsGetNicIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerNetworkingWithNicsGetNicIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerNetworkingWithNicsGetNicIdsAttributeTypeOk(arg CreateServerNetworkingWithNicsGetNicIdsAttributeType) (ret CreateServerNetworkingWithNicsGetNicIdsRetType, 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 setCreateServerNetworkingWithNicsGetNicIdsAttributeType(arg *CreateServerNetworkingWithNicsGetNicIdsAttributeType, val CreateServerNetworkingWithNicsGetNicIdsRetType) { - *arg = &val -} - -// CreateServerNetworkingWithNics The initial networking setup for the server creation with a network interface. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerNetworkingWithNics struct { - // A list of UUIDs. - NicIds CreateServerNetworkingWithNicsGetNicIdsAttributeType `json:"nicIds,omitempty"` -} - -// NewCreateServerNetworkingWithNics instantiates a new CreateServerNetworkingWithNics 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateServerNetworkingWithNics() *CreateServerNetworkingWithNics { - this := CreateServerNetworkingWithNics{} - return &this -} - -// NewCreateServerNetworkingWithNicsWithDefaults instantiates a new CreateServerNetworkingWithNics 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateServerNetworkingWithNicsWithDefaults() *CreateServerNetworkingWithNics { - this := CreateServerNetworkingWithNics{} - return &this -} - -// GetNicIds returns the NicIds 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 *CreateServerNetworkingWithNics) GetNicIds() (res CreateServerNetworkingWithNicsGetNicIdsRetType) { - res, _ = o.GetNicIdsOk() - return -} - -// GetNicIdsOk returns a tuple with the NicIds 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 *CreateServerNetworkingWithNics) GetNicIdsOk() (ret CreateServerNetworkingWithNicsGetNicIdsRetType, ok bool) { - return getCreateServerNetworkingWithNicsGetNicIdsAttributeTypeOk(o.NicIds) -} - -// HasNicIds 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 *CreateServerNetworkingWithNics) HasNicIds() bool { - _, ok := o.GetNicIdsOk() - return ok -} - -// SetNicIds gets a reference to the given []string and assigns it to the NicIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerNetworkingWithNics) SetNicIds(v CreateServerNetworkingWithNicsGetNicIdsRetType) { - setCreateServerNetworkingWithNicsGetNicIdsAttributeType(&o.NicIds, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateServerNetworkingWithNics) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateServerNetworkingWithNicsGetNicIdsAttributeTypeOk(o.NicIds); ok { - toSerialize["NicIds"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateServerNetworkingWithNics struct { - value *CreateServerNetworkingWithNics - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateServerNetworkingWithNics) Get() *CreateServerNetworkingWithNics { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateServerNetworkingWithNics) Set(val *CreateServerNetworkingWithNics) { - 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 NullableCreateServerNetworkingWithNics) 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 *NullableCreateServerNetworkingWithNics) 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 NewNullableCreateServerNetworkingWithNics(val *CreateServerNetworkingWithNics) *NullableCreateServerNetworkingWithNics { - return &NullableCreateServerNetworkingWithNics{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 NullableCreateServerNetworkingWithNics) 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 *NullableCreateServerNetworkingWithNics) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_server_networking_with_nics_test.go b/services/iaas/model_create_server_networking_with_nics_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_server_networking_with_nics_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_server_payload.go b/services/iaas/model_create_server_payload.go deleted file mode 100644 index 4c3c490fbc..0000000000 --- a/services/iaas/model_create_server_payload.go +++ /dev/null @@ -1,1555 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the CreateServerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateServerPayload{} - -/* - types and functions for affinityGroup -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAffinityGroupAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetAffinityGroupAttributeTypeOk(arg CreateServerPayloadGetAffinityGroupAttributeType) (ret CreateServerPayloadGetAffinityGroupRetType, 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 setCreateServerPayloadGetAffinityGroupAttributeType(arg *CreateServerPayloadGetAffinityGroupAttributeType, val CreateServerPayloadGetAffinityGroupRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAffinityGroupArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAffinityGroupRetType = string - -/* - types and functions for agent -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAgentAttributeType = *ServerAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAgentArgType = ServerAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAgentRetType = ServerAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetAgentAttributeTypeOk(arg CreateServerPayloadGetAgentAttributeType) (ret CreateServerPayloadGetAgentRetType, 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 setCreateServerPayloadGetAgentAttributeType(arg *CreateServerPayloadGetAgentAttributeType, val CreateServerPayloadGetAgentRetType) { - *arg = &val -} - -/* - types and functions for availabilityZone -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAvailabilityZoneAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetAvailabilityZoneAttributeTypeOk(arg CreateServerPayloadGetAvailabilityZoneAttributeType) (ret CreateServerPayloadGetAvailabilityZoneRetType, 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 setCreateServerPayloadGetAvailabilityZoneAttributeType(arg *CreateServerPayloadGetAvailabilityZoneAttributeType, val CreateServerPayloadGetAvailabilityZoneRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAvailabilityZoneArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetAvailabilityZoneRetType = string - -/* - types and functions for bootVolume -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetBootVolumeAttributeType = *ServerBootVolume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetBootVolumeArgType = ServerBootVolume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetBootVolumeRetType = ServerBootVolume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetBootVolumeAttributeTypeOk(arg CreateServerPayloadGetBootVolumeAttributeType) (ret CreateServerPayloadGetBootVolumeRetType, 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 setCreateServerPayloadGetBootVolumeAttributeType(arg *CreateServerPayloadGetBootVolumeAttributeType, val CreateServerPayloadGetBootVolumeRetType) { - *arg = &val -} - -/* - types and functions for configDrive -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadgetConfigDriveAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadgetConfigDriveArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadgetConfigDriveRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadgetConfigDriveAttributeTypeOk(arg CreateServerPayloadgetConfigDriveAttributeType) (ret CreateServerPayloadgetConfigDriveRetType, 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 setCreateServerPayloadgetConfigDriveAttributeType(arg *CreateServerPayloadgetConfigDriveAttributeType, val CreateServerPayloadgetConfigDriveRetType) { - *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 CreateServerPayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetCreatedAtAttributeTypeOk(arg CreateServerPayloadGetCreatedAtAttributeType) (ret CreateServerPayloadGetCreatedAtRetType, 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 setCreateServerPayloadGetCreatedAtAttributeType(arg *CreateServerPayloadGetCreatedAtAttributeType, val CreateServerPayloadGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for errorMessage -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetErrorMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetErrorMessageAttributeTypeOk(arg CreateServerPayloadGetErrorMessageAttributeType) (ret CreateServerPayloadGetErrorMessageRetType, 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 setCreateServerPayloadGetErrorMessageAttributeType(arg *CreateServerPayloadGetErrorMessageAttributeType, val CreateServerPayloadGetErrorMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetErrorMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetErrorMessageRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetIdAttributeTypeOk(arg CreateServerPayloadGetIdAttributeType) (ret CreateServerPayloadGetIdRetType, 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 setCreateServerPayloadGetIdAttributeType(arg *CreateServerPayloadGetIdAttributeType, val CreateServerPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetIdRetType = string - -/* - types and functions for imageId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetImageIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetImageIdAttributeTypeOk(arg CreateServerPayloadGetImageIdAttributeType) (ret CreateServerPayloadGetImageIdRetType, 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 setCreateServerPayloadGetImageIdAttributeType(arg *CreateServerPayloadGetImageIdAttributeType, val CreateServerPayloadGetImageIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetImageIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetImageIdRetType = string - -/* - types and functions for keypairName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetKeypairNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetKeypairNameAttributeTypeOk(arg CreateServerPayloadGetKeypairNameAttributeType) (ret CreateServerPayloadGetKeypairNameRetType, 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 setCreateServerPayloadGetKeypairNameAttributeType(arg *CreateServerPayloadGetKeypairNameAttributeType, val CreateServerPayloadGetKeypairNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetKeypairNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetKeypairNameRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetLabelsAttributeTypeOk(arg CreateServerPayloadGetLabelsAttributeType) (ret CreateServerPayloadGetLabelsRetType, 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 setCreateServerPayloadGetLabelsAttributeType(arg *CreateServerPayloadGetLabelsAttributeType, val CreateServerPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for launchedAt -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetLaunchedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetLaunchedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetLaunchedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetLaunchedAtAttributeTypeOk(arg CreateServerPayloadGetLaunchedAtAttributeType) (ret CreateServerPayloadGetLaunchedAtRetType, 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 setCreateServerPayloadGetLaunchedAtAttributeType(arg *CreateServerPayloadGetLaunchedAtAttributeType, val CreateServerPayloadGetLaunchedAtRetType) { - *arg = &val -} - -/* - types and functions for machineType -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMachineTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetMachineTypeAttributeTypeOk(arg CreateServerPayloadGetMachineTypeAttributeType) (ret CreateServerPayloadGetMachineTypeRetType, 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 setCreateServerPayloadGetMachineTypeAttributeType(arg *CreateServerPayloadGetMachineTypeAttributeType, val CreateServerPayloadGetMachineTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMachineTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMachineTypeRetType = string - -/* - types and functions for maintenanceWindow -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMaintenanceWindowAttributeType = *ServerMaintenance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMaintenanceWindowArgType = ServerMaintenance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMaintenanceWindowRetType = ServerMaintenance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetMaintenanceWindowAttributeTypeOk(arg CreateServerPayloadGetMaintenanceWindowAttributeType) (ret CreateServerPayloadGetMaintenanceWindowRetType, 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 setCreateServerPayloadGetMaintenanceWindowAttributeType(arg *CreateServerPayloadGetMaintenanceWindowAttributeType, val CreateServerPayloadGetMaintenanceWindowRetType) { - *arg = &val -} - -/* - types and functions for metadata -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMetadataAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMetadataArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetMetadataRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetMetadataAttributeTypeOk(arg CreateServerPayloadGetMetadataAttributeType) (ret CreateServerPayloadGetMetadataRetType, 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 setCreateServerPayloadGetMetadataAttributeType(arg *CreateServerPayloadGetMetadataAttributeType, val CreateServerPayloadGetMetadataRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetNameAttributeTypeOk(arg CreateServerPayloadGetNameAttributeType) (ret CreateServerPayloadGetNameRetType, 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 setCreateServerPayloadGetNameAttributeType(arg *CreateServerPayloadGetNameAttributeType, val CreateServerPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNameRetType = string - -/* - types and functions for networking -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNetworkingAttributeType = *CreateServerPayloadAllOfNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNetworkingArgType = CreateServerPayloadAllOfNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNetworkingRetType = CreateServerPayloadAllOfNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetNetworkingAttributeTypeOk(arg CreateServerPayloadGetNetworkingAttributeType) (ret CreateServerPayloadGetNetworkingRetType, 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 setCreateServerPayloadGetNetworkingAttributeType(arg *CreateServerPayloadGetNetworkingAttributeType, val CreateServerPayloadGetNetworkingRetType) { - *arg = &val -} - -/* - types and functions for nics -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNicsAttributeType = *[]ServerNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNicsArgType = []ServerNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetNicsRetType = []ServerNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetNicsAttributeTypeOk(arg CreateServerPayloadGetNicsAttributeType) (ret CreateServerPayloadGetNicsRetType, 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 setCreateServerPayloadGetNicsAttributeType(arg *CreateServerPayloadGetNicsAttributeType, val CreateServerPayloadGetNicsRetType) { - *arg = &val -} - -/* - types and functions for powerStatus -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetPowerStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetPowerStatusAttributeTypeOk(arg CreateServerPayloadGetPowerStatusAttributeType) (ret CreateServerPayloadGetPowerStatusRetType, 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 setCreateServerPayloadGetPowerStatusAttributeType(arg *CreateServerPayloadGetPowerStatusAttributeType, val CreateServerPayloadGetPowerStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetPowerStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetPowerStatusRetType = string - -/* - types and functions for securityGroups -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetSecurityGroupsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetSecurityGroupsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetSecurityGroupsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetSecurityGroupsAttributeTypeOk(arg CreateServerPayloadGetSecurityGroupsAttributeType) (ret CreateServerPayloadGetSecurityGroupsRetType, 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 setCreateServerPayloadGetSecurityGroupsAttributeType(arg *CreateServerPayloadGetSecurityGroupsAttributeType, val CreateServerPayloadGetSecurityGroupsRetType) { - *arg = &val -} - -/* - types and functions for serviceAccountMails -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetServiceAccountMailsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetServiceAccountMailsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetServiceAccountMailsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetServiceAccountMailsAttributeTypeOk(arg CreateServerPayloadGetServiceAccountMailsAttributeType) (ret CreateServerPayloadGetServiceAccountMailsRetType, 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 setCreateServerPayloadGetServiceAccountMailsAttributeType(arg *CreateServerPayloadGetServiceAccountMailsAttributeType, val CreateServerPayloadGetServiceAccountMailsRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetStatusAttributeTypeOk(arg CreateServerPayloadGetStatusAttributeType) (ret CreateServerPayloadGetStatusRetType, 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 setCreateServerPayloadGetStatusAttributeType(arg *CreateServerPayloadGetStatusAttributeType, val CreateServerPayloadGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetStatusRetType = 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 CreateServerPayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetUpdatedAtAttributeTypeOk(arg CreateServerPayloadGetUpdatedAtAttributeType) (ret CreateServerPayloadGetUpdatedAtRetType, 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 setCreateServerPayloadGetUpdatedAtAttributeType(arg *CreateServerPayloadGetUpdatedAtAttributeType, val CreateServerPayloadGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for userData -*/ - -// isByteArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetUserDataAttributeType = *[]byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetUserDataArgType = []byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetUserDataRetType = []byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetUserDataAttributeTypeOk(arg CreateServerPayloadGetUserDataAttributeType) (ret CreateServerPayloadGetUserDataRetType, 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 setCreateServerPayloadGetUserDataAttributeType(arg *CreateServerPayloadGetUserDataAttributeType, val CreateServerPayloadGetUserDataRetType) { - *arg = &val -} - -/* - types and functions for volumes -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetVolumesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetVolumesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetVolumesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetVolumesAttributeTypeOk(arg CreateServerPayloadGetVolumesAttributeType) (ret CreateServerPayloadGetVolumesRetType, 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 setCreateServerPayloadGetVolumesAttributeType(arg *CreateServerPayloadGetVolumesAttributeType, val CreateServerPayloadGetVolumesRetType) { - *arg = &val -} - -// CreateServerPayload Object that represents the request body for a server create. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayload struct { - // Universally Unique Identifier (UUID). - AffinityGroup CreateServerPayloadGetAffinityGroupAttributeType `json:"affinityGroup,omitempty"` - Agent CreateServerPayloadGetAgentAttributeType `json:"agent,omitempty"` - // Object that represents an availability zone. - AvailabilityZone CreateServerPayloadGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` - BootVolume CreateServerPayloadGetBootVolumeAttributeType `json:"bootVolume,omitempty"` - // When true the server is created with a config drive. - ConfigDrive CreateServerPayloadgetConfigDriveAttributeType `json:"configDrive,omitempty"` - // Date-time when resource was created. - CreatedAt CreateServerPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // An error message. - ErrorMessage CreateServerPayloadGetErrorMessageAttributeType `json:"errorMessage,omitempty"` - // Universally Unique Identifier (UUID). - Id CreateServerPayloadGetIdAttributeType `json:"id,omitempty"` - // Universally Unique Identifier (UUID). - 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. - Labels CreateServerPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // Date-time when resource was launched. - LaunchedAt CreateServerPayloadGetLaunchedAtAttributeType `json:"launchedAt,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - MachineType CreateServerPayloadGetMachineTypeAttributeType `json:"machineType" required:"true"` - MaintenanceWindow CreateServerPayloadGetMaintenanceWindowAttributeType `json:"maintenanceWindow,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 CreateServerPayloadGetMetadataAttributeType `json:"metadata,omitempty"` - // The name for a Server. - // REQUIRED - Name CreateServerPayloadGetNameAttributeType `json:"name" required:"true"` - // REQUIRED - Networking CreateServerPayloadGetNetworkingAttributeType `json:"networking" required:"true"` - // A list of networks attached to a server. - Nics CreateServerPayloadGetNicsAttributeType `json:"nics,omitempty"` - // The power status of a server. Possible values: `CRASHED`, `ERROR`, `RUNNING`, `STOPPED`. - PowerStatus CreateServerPayloadGetPowerStatusAttributeType `json:"powerStatus,omitempty"` - // A list of General Objects. - SecurityGroups CreateServerPayloadGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"` - // A list of service account mails. - ServiceAccountMails CreateServerPayloadGetServiceAccountMailsAttributeType `json:"serviceAccountMails,omitempty"` - // The status of a server object. Possible values: `ACTIVE`, `BACKING-UP`, `CREATING`, `DEALLOCATED`, `DEALLOCATING`, `DELETED`, `DELETING`, `ERROR`, `INACTIVE`, `MIGRATING`, `PAUSED`, `REBOOT`, `REBOOTING`, `REBUILD`, `REBUILDING`, `RESCUE`, `RESCUING`, `RESIZING`, `RESTORING`, `SNAPSHOTTING`, `STARTING`, `STOPPING`, `UNRESCUING`, `UPDATING`. - Status CreateServerPayloadGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt CreateServerPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - // User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server. - UserData CreateServerPayloadGetUserDataAttributeType `json:"userData,omitempty"` - // A list of UUIDs. - Volumes CreateServerPayloadGetVolumesAttributeType `json:"volumes,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateServerPayload CreateServerPayload - -// NewCreateServerPayload instantiates a new CreateServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateServerPayload(machineType CreateServerPayloadGetMachineTypeArgType, name CreateServerPayloadGetNameArgType, networking CreateServerPayloadGetNetworkingArgType) *CreateServerPayload { - this := CreateServerPayload{} - setCreateServerPayloadGetMachineTypeAttributeType(&this.MachineType, machineType) - setCreateServerPayloadGetNameAttributeType(&this.Name, name) - setCreateServerPayloadGetNetworkingAttributeType(&this.Networking, networking) - return &this -} - -// NewCreateServerPayloadWithDefaults instantiates a new CreateServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateServerPayloadWithDefaults() *CreateServerPayload { - this := CreateServerPayload{} - var configDrive bool = false - this.ConfigDrive = &configDrive - return &this -} - -// GetAffinityGroup returns the AffinityGroup 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 *CreateServerPayload) GetAffinityGroup() (res CreateServerPayloadGetAffinityGroupRetType) { - res, _ = o.GetAffinityGroupOk() - return -} - -// GetAffinityGroupOk returns a tuple with the AffinityGroup 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 *CreateServerPayload) GetAffinityGroupOk() (ret CreateServerPayloadGetAffinityGroupRetType, ok bool) { - return getCreateServerPayloadGetAffinityGroupAttributeTypeOk(o.AffinityGroup) -} - -// HasAffinityGroup 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 *CreateServerPayload) HasAffinityGroup() bool { - _, ok := o.GetAffinityGroupOk() - return ok -} - -// SetAffinityGroup gets a reference to the given string and assigns it to the AffinityGroup field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetAffinityGroup(v CreateServerPayloadGetAffinityGroupRetType) { - setCreateServerPayloadGetAffinityGroupAttributeType(&o.AffinityGroup, v) -} - -// GetAgent returns the Agent 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 *CreateServerPayload) GetAgent() (res CreateServerPayloadGetAgentRetType) { - res, _ = o.GetAgentOk() - return -} - -// GetAgentOk returns a tuple with the Agent 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 *CreateServerPayload) GetAgentOk() (ret CreateServerPayloadGetAgentRetType, ok bool) { - return getCreateServerPayloadGetAgentAttributeTypeOk(o.Agent) -} - -// HasAgent 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 *CreateServerPayload) HasAgent() bool { - _, ok := o.GetAgentOk() - return ok -} - -// SetAgent gets a reference to the given ServerAgent and assigns it to the Agent field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetAgent(v CreateServerPayloadGetAgentRetType) { - setCreateServerPayloadGetAgentAttributeType(&o.Agent, v) -} - -// GetAvailabilityZone returns the AvailabilityZone 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 *CreateServerPayload) GetAvailabilityZone() (res CreateServerPayloadGetAvailabilityZoneRetType) { - res, _ = o.GetAvailabilityZoneOk() - return -} - -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone 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 *CreateServerPayload) GetAvailabilityZoneOk() (ret CreateServerPayloadGetAvailabilityZoneRetType, ok bool) { - return getCreateServerPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) -} - -// HasAvailabilityZone 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 *CreateServerPayload) HasAvailabilityZone() bool { - _, ok := o.GetAvailabilityZoneOk() - return ok -} - -// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetAvailabilityZone(v CreateServerPayloadGetAvailabilityZoneRetType) { - setCreateServerPayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) -} - -// GetBootVolume returns the BootVolume 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 *CreateServerPayload) GetBootVolume() (res CreateServerPayloadGetBootVolumeRetType) { - res, _ = o.GetBootVolumeOk() - return -} - -// GetBootVolumeOk returns a tuple with the BootVolume 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 *CreateServerPayload) GetBootVolumeOk() (ret CreateServerPayloadGetBootVolumeRetType, ok bool) { - return getCreateServerPayloadGetBootVolumeAttributeTypeOk(o.BootVolume) -} - -// HasBootVolume 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 *CreateServerPayload) HasBootVolume() bool { - _, ok := o.GetBootVolumeOk() - return ok -} - -// SetBootVolume gets a reference to the given ServerBootVolume and assigns it to the BootVolume field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetBootVolume(v CreateServerPayloadGetBootVolumeRetType) { - setCreateServerPayloadGetBootVolumeAttributeType(&o.BootVolume, v) -} - -// GetConfigDrive returns the ConfigDrive 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 *CreateServerPayload) GetConfigDrive() (res CreateServerPayloadgetConfigDriveRetType) { - res, _ = o.GetConfigDriveOk() - return -} - -// GetConfigDriveOk returns a tuple with the ConfigDrive 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 *CreateServerPayload) GetConfigDriveOk() (ret CreateServerPayloadgetConfigDriveRetType, ok bool) { - return getCreateServerPayloadgetConfigDriveAttributeTypeOk(o.ConfigDrive) -} - -// HasConfigDrive 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 *CreateServerPayload) HasConfigDrive() bool { - _, ok := o.GetConfigDriveOk() - return ok -} - -// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetConfigDrive(v CreateServerPayloadgetConfigDriveRetType) { - setCreateServerPayloadgetConfigDriveAttributeType(&o.ConfigDrive, 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 *CreateServerPayload) GetCreatedAt() (res CreateServerPayloadGetCreatedAtRetType) { - 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 *CreateServerPayload) GetCreatedAtOk() (ret CreateServerPayloadGetCreatedAtRetType, ok bool) { - return getCreateServerPayloadGetCreatedAtAttributeTypeOk(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 *CreateServerPayload) 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 *CreateServerPayload) SetCreatedAt(v CreateServerPayloadGetCreatedAtRetType) { - setCreateServerPayloadGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetErrorMessage returns the ErrorMessage 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 *CreateServerPayload) GetErrorMessage() (res CreateServerPayloadGetErrorMessageRetType) { - res, _ = o.GetErrorMessageOk() - return -} - -// GetErrorMessageOk returns a tuple with the ErrorMessage 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 *CreateServerPayload) GetErrorMessageOk() (ret CreateServerPayloadGetErrorMessageRetType, ok bool) { - return getCreateServerPayloadGetErrorMessageAttributeTypeOk(o.ErrorMessage) -} - -// HasErrorMessage 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 *CreateServerPayload) HasErrorMessage() bool { - _, ok := o.GetErrorMessageOk() - return ok -} - -// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetErrorMessage(v CreateServerPayloadGetErrorMessageRetType) { - setCreateServerPayloadGetErrorMessageAttributeType(&o.ErrorMessage, 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 *CreateServerPayload) GetId() (res CreateServerPayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *CreateServerPayload) GetIdOk() (ret CreateServerPayloadGetIdRetType, ok bool) { - return getCreateServerPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *CreateServerPayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetId(v CreateServerPayloadGetIdRetType) { - setCreateServerPayloadGetIdAttributeType(&o.Id, v) -} - -// GetImageId returns the ImageId 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 *CreateServerPayload) GetImageId() (res CreateServerPayloadGetImageIdRetType) { - res, _ = o.GetImageIdOk() - return -} - -// GetImageIdOk returns a tuple with the ImageId 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 *CreateServerPayload) GetImageIdOk() (ret CreateServerPayloadGetImageIdRetType, ok bool) { - return getCreateServerPayloadGetImageIdAttributeTypeOk(o.ImageId) -} - -// HasImageId 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 *CreateServerPayload) HasImageId() bool { - _, ok := o.GetImageIdOk() - return ok -} - -// SetImageId gets a reference to the given string and assigns it to the ImageId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetImageId(v CreateServerPayloadGetImageIdRetType) { - setCreateServerPayloadGetImageIdAttributeType(&o.ImageId, v) -} - -// GetKeypairName returns the KeypairName 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 *CreateServerPayload) GetKeypairName() (res CreateServerPayloadGetKeypairNameRetType) { - res, _ = o.GetKeypairNameOk() - return -} - -// GetKeypairNameOk returns a tuple with the KeypairName 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 *CreateServerPayload) GetKeypairNameOk() (ret CreateServerPayloadGetKeypairNameRetType, ok bool) { - return getCreateServerPayloadGetKeypairNameAttributeTypeOk(o.KeypairName) -} - -// HasKeypairName 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 *CreateServerPayload) HasKeypairName() bool { - _, ok := o.GetKeypairNameOk() - return ok -} - -// SetKeypairName gets a reference to the given string and assigns it to the KeypairName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetKeypairName(v CreateServerPayloadGetKeypairNameRetType) { - setCreateServerPayloadGetKeypairNameAttributeType(&o.KeypairName, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) GetLabels() (res CreateServerPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) GetLabelsOk() (ret CreateServerPayloadGetLabelsRetType, ok bool) { - return getCreateServerPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetLabels(v CreateServerPayloadGetLabelsRetType) { - setCreateServerPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetLaunchedAt returns the LaunchedAt 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 *CreateServerPayload) GetLaunchedAt() (res CreateServerPayloadGetLaunchedAtRetType) { - res, _ = o.GetLaunchedAtOk() - return -} - -// GetLaunchedAtOk returns a tuple with the LaunchedAt 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 *CreateServerPayload) GetLaunchedAtOk() (ret CreateServerPayloadGetLaunchedAtRetType, ok bool) { - return getCreateServerPayloadGetLaunchedAtAttributeTypeOk(o.LaunchedAt) -} - -// HasLaunchedAt 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 *CreateServerPayload) HasLaunchedAt() bool { - _, ok := o.GetLaunchedAtOk() - return ok -} - -// SetLaunchedAt gets a reference to the given time.Time and assigns it to the LaunchedAt field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetLaunchedAt(v CreateServerPayloadGetLaunchedAtRetType) { - setCreateServerPayloadGetLaunchedAtAttributeType(&o.LaunchedAt, v) -} - -// GetMachineType returns the MachineType field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) GetMachineType() (ret CreateServerPayloadGetMachineTypeRetType) { - ret, _ = o.GetMachineTypeOk() - return ret -} - -// GetMachineTypeOk returns a tuple with the MachineType field value -// 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 *CreateServerPayload) GetMachineTypeOk() (ret CreateServerPayloadGetMachineTypeRetType, ok bool) { - return getCreateServerPayloadGetMachineTypeAttributeTypeOk(o.MachineType) -} - -// SetMachineType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetMachineType(v CreateServerPayloadGetMachineTypeRetType) { - setCreateServerPayloadGetMachineTypeAttributeType(&o.MachineType, v) -} - -// GetMaintenanceWindow returns the MaintenanceWindow 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 *CreateServerPayload) GetMaintenanceWindow() (res CreateServerPayloadGetMaintenanceWindowRetType) { - res, _ = o.GetMaintenanceWindowOk() - return -} - -// GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow 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 *CreateServerPayload) GetMaintenanceWindowOk() (ret CreateServerPayloadGetMaintenanceWindowRetType, ok bool) { - return getCreateServerPayloadGetMaintenanceWindowAttributeTypeOk(o.MaintenanceWindow) -} - -// HasMaintenanceWindow 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 *CreateServerPayload) HasMaintenanceWindow() bool { - _, ok := o.GetMaintenanceWindowOk() - return ok -} - -// SetMaintenanceWindow gets a reference to the given ServerMaintenance and assigns it to the MaintenanceWindow field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetMaintenanceWindow(v CreateServerPayloadGetMaintenanceWindowRetType) { - setCreateServerPayloadGetMaintenanceWindowAttributeType(&o.MaintenanceWindow, v) -} - -// GetMetadata returns the Metadata 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 *CreateServerPayload) GetMetadata() (res CreateServerPayloadGetMetadataRetType) { - res, _ = o.GetMetadataOk() - return -} - -// GetMetadataOk returns a tuple with the Metadata 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 *CreateServerPayload) GetMetadataOk() (ret CreateServerPayloadGetMetadataRetType, ok bool) { - return getCreateServerPayloadGetMetadataAttributeTypeOk(o.Metadata) -} - -// HasMetadata 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 *CreateServerPayload) HasMetadata() bool { - _, ok := o.GetMetadataOk() - return ok -} - -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetMetadata(v CreateServerPayloadGetMetadataRetType) { - setCreateServerPayloadGetMetadataAttributeType(&o.Metadata, 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 *CreateServerPayload) GetName() (ret CreateServerPayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *CreateServerPayload) GetNameOk() (ret CreateServerPayloadGetNameRetType, ok bool) { - return getCreateServerPayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetName(v CreateServerPayloadGetNameRetType) { - setCreateServerPayloadGetNameAttributeType(&o.Name, v) -} - -// GetNetworking returns the Networking field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) GetNetworking() (ret CreateServerPayloadGetNetworkingRetType) { - ret, _ = o.GetNetworkingOk() - return ret -} - -// GetNetworkingOk returns a tuple with the Networking field value -// 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 *CreateServerPayload) GetNetworkingOk() (ret CreateServerPayloadGetNetworkingRetType, ok bool) { - return getCreateServerPayloadGetNetworkingAttributeTypeOk(o.Networking) -} - -// SetNetworking sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetNetworking(v CreateServerPayloadGetNetworkingRetType) { - setCreateServerPayloadGetNetworkingAttributeType(&o.Networking, v) -} - -// GetNics returns the Nics 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 *CreateServerPayload) GetNics() (res CreateServerPayloadGetNicsRetType) { - res, _ = o.GetNicsOk() - return -} - -// GetNicsOk returns a tuple with the Nics 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 *CreateServerPayload) GetNicsOk() (ret CreateServerPayloadGetNicsRetType, ok bool) { - return getCreateServerPayloadGetNicsAttributeTypeOk(o.Nics) -} - -// HasNics 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 *CreateServerPayload) HasNics() bool { - _, ok := o.GetNicsOk() - return ok -} - -// SetNics gets a reference to the given []ServerNetwork and assigns it to the Nics field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetNics(v CreateServerPayloadGetNicsRetType) { - setCreateServerPayloadGetNicsAttributeType(&o.Nics, v) -} - -// GetPowerStatus returns the PowerStatus 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 *CreateServerPayload) GetPowerStatus() (res CreateServerPayloadGetPowerStatusRetType) { - res, _ = o.GetPowerStatusOk() - return -} - -// GetPowerStatusOk returns a tuple with the PowerStatus 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 *CreateServerPayload) GetPowerStatusOk() (ret CreateServerPayloadGetPowerStatusRetType, ok bool) { - return getCreateServerPayloadGetPowerStatusAttributeTypeOk(o.PowerStatus) -} - -// HasPowerStatus 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 *CreateServerPayload) HasPowerStatus() bool { - _, ok := o.GetPowerStatusOk() - return ok -} - -// SetPowerStatus gets a reference to the given string and assigns it to the PowerStatus field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetPowerStatus(v CreateServerPayloadGetPowerStatusRetType) { - setCreateServerPayloadGetPowerStatusAttributeType(&o.PowerStatus, v) -} - -// GetSecurityGroups returns the SecurityGroups 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 *CreateServerPayload) GetSecurityGroups() (res CreateServerPayloadGetSecurityGroupsRetType) { - res, _ = o.GetSecurityGroupsOk() - return -} - -// GetSecurityGroupsOk returns a tuple with the SecurityGroups 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 *CreateServerPayload) GetSecurityGroupsOk() (ret CreateServerPayloadGetSecurityGroupsRetType, ok bool) { - return getCreateServerPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups) -} - -// HasSecurityGroups 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 *CreateServerPayload) HasSecurityGroups() bool { - _, ok := o.GetSecurityGroupsOk() - return ok -} - -// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetSecurityGroups(v CreateServerPayloadGetSecurityGroupsRetType) { - setCreateServerPayloadGetSecurityGroupsAttributeType(&o.SecurityGroups, v) -} - -// GetServiceAccountMails returns the ServiceAccountMails 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 *CreateServerPayload) GetServiceAccountMails() (res CreateServerPayloadGetServiceAccountMailsRetType) { - res, _ = o.GetServiceAccountMailsOk() - return -} - -// GetServiceAccountMailsOk returns a tuple with the ServiceAccountMails 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 *CreateServerPayload) GetServiceAccountMailsOk() (ret CreateServerPayloadGetServiceAccountMailsRetType, ok bool) { - return getCreateServerPayloadGetServiceAccountMailsAttributeTypeOk(o.ServiceAccountMails) -} - -// HasServiceAccountMails 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 *CreateServerPayload) HasServiceAccountMails() bool { - _, ok := o.GetServiceAccountMailsOk() - return ok -} - -// SetServiceAccountMails gets a reference to the given []string and assigns it to the ServiceAccountMails field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetServiceAccountMails(v CreateServerPayloadGetServiceAccountMailsRetType) { - setCreateServerPayloadGetServiceAccountMailsAttributeType(&o.ServiceAccountMails, v) -} - -// GetStatus returns the Status 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 *CreateServerPayload) GetStatus() (res CreateServerPayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *CreateServerPayload) GetStatusOk() (ret CreateServerPayloadGetStatusRetType, ok bool) { - return getCreateServerPayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *CreateServerPayload) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetStatus(v CreateServerPayloadGetStatusRetType) { - setCreateServerPayloadGetStatusAttributeType(&o.Status, 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 *CreateServerPayload) GetUpdatedAt() (res CreateServerPayloadGetUpdatedAtRetType) { - 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 *CreateServerPayload) GetUpdatedAtOk() (ret CreateServerPayloadGetUpdatedAtRetType, ok bool) { - return getCreateServerPayloadGetUpdatedAtAttributeTypeOk(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 *CreateServerPayload) 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 *CreateServerPayload) SetUpdatedAt(v CreateServerPayloadGetUpdatedAtRetType) { - setCreateServerPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetUserData returns the UserData 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 *CreateServerPayload) GetUserData() (res CreateServerPayloadGetUserDataRetType) { - res, _ = o.GetUserDataOk() - return -} - -// GetUserDataOk returns a tuple with the UserData 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 *CreateServerPayload) GetUserDataOk() (ret CreateServerPayloadGetUserDataRetType, ok bool) { - return getCreateServerPayloadGetUserDataAttributeTypeOk(o.UserData) -} - -// HasUserData 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 *CreateServerPayload) HasUserData() bool { - _, ok := o.GetUserDataOk() - return ok -} - -// SetUserData gets a reference to the given string and assigns it to the UserData field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetUserData(v CreateServerPayloadGetUserDataRetType) { - setCreateServerPayloadGetUserDataAttributeType(&o.UserData, v) -} - -// GetVolumes returns the Volumes 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 *CreateServerPayload) GetVolumes() (res CreateServerPayloadGetVolumesRetType) { - res, _ = o.GetVolumesOk() - return -} - -// GetVolumesOk returns a tuple with the Volumes 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 *CreateServerPayload) GetVolumesOk() (ret CreateServerPayloadGetVolumesRetType, ok bool) { - return getCreateServerPayloadGetVolumesAttributeTypeOk(o.Volumes) -} - -// HasVolumes 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 *CreateServerPayload) HasVolumes() bool { - _, ok := o.GetVolumesOk() - return ok -} - -// SetVolumes gets a reference to the given []string and assigns it to the Volumes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetVolumes(v CreateServerPayloadGetVolumesRetType) { - setCreateServerPayloadGetVolumesAttributeType(&o.Volumes, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateServerPayloadGetAffinityGroupAttributeTypeOk(o.AffinityGroup); ok { - toSerialize["AffinityGroup"] = val - } - if val, ok := getCreateServerPayloadGetAgentAttributeTypeOk(o.Agent); ok { - toSerialize["Agent"] = val - } - if val, ok := getCreateServerPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { - toSerialize["AvailabilityZone"] = val - } - if val, ok := getCreateServerPayloadGetBootVolumeAttributeTypeOk(o.BootVolume); ok { - toSerialize["BootVolume"] = val - } - if val, ok := getCreateServerPayloadgetConfigDriveAttributeTypeOk(o.ConfigDrive); ok { - toSerialize["ConfigDrive"] = val - } - if val, ok := getCreateServerPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getCreateServerPayloadGetErrorMessageAttributeTypeOk(o.ErrorMessage); ok { - toSerialize["ErrorMessage"] = val - } - if val, ok := getCreateServerPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateServerPayloadGetImageIdAttributeTypeOk(o.ImageId); ok { - toSerialize["ImageId"] = val - } - if val, ok := getCreateServerPayloadGetKeypairNameAttributeTypeOk(o.KeypairName); ok { - toSerialize["KeypairName"] = val - } - if val, ok := getCreateServerPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateServerPayloadGetLaunchedAtAttributeTypeOk(o.LaunchedAt); ok { - toSerialize["LaunchedAt"] = val - } - if val, ok := getCreateServerPayloadGetMachineTypeAttributeTypeOk(o.MachineType); ok { - toSerialize["MachineType"] = val - } - if val, ok := getCreateServerPayloadGetMaintenanceWindowAttributeTypeOk(o.MaintenanceWindow); ok { - toSerialize["MaintenanceWindow"] = val - } - if val, ok := getCreateServerPayloadGetMetadataAttributeTypeOk(o.Metadata); ok { - toSerialize["Metadata"] = val - } - if val, ok := getCreateServerPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateServerPayloadGetNetworkingAttributeTypeOk(o.Networking); ok { - toSerialize["Networking"] = val - } - if val, ok := getCreateServerPayloadGetNicsAttributeTypeOk(o.Nics); ok { - toSerialize["Nics"] = val - } - if val, ok := getCreateServerPayloadGetPowerStatusAttributeTypeOk(o.PowerStatus); ok { - toSerialize["PowerStatus"] = val - } - if val, ok := getCreateServerPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok { - toSerialize["SecurityGroups"] = val - } - if val, ok := getCreateServerPayloadGetServiceAccountMailsAttributeTypeOk(o.ServiceAccountMails); ok { - toSerialize["ServiceAccountMails"] = val - } - if val, ok := getCreateServerPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getCreateServerPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getCreateServerPayloadGetUserDataAttributeTypeOk(o.UserData); ok { - toSerialize["UserData"] = val - } - if val, ok := getCreateServerPayloadGetVolumesAttributeTypeOk(o.Volumes); ok { - toSerialize["Volumes"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateServerPayload struct { - value *CreateServerPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateServerPayload) Get() *CreateServerPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateServerPayload) Set(val *CreateServerPayload) { - 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 NullableCreateServerPayload) 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 *NullableCreateServerPayload) 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 NewNullableCreateServerPayload(val *CreateServerPayload) *NullableCreateServerPayload { - return &NullableCreateServerPayload{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 NullableCreateServerPayload) 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 *NullableCreateServerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_server_payload_all_of.go b/services/iaas/model_create_server_payload_all_of.go deleted file mode 100644 index 8e061bb63d..0000000000 --- a/services/iaas/model_create_server_payload_all_of.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the CreateServerPayloadAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateServerPayloadAllOf{} - -/* - types and functions for networking -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadAllOfGetNetworkingAttributeType = *CreateServerPayloadAllOfNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadAllOfGetNetworkingArgType = CreateServerPayloadAllOfNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadAllOfGetNetworkingRetType = CreateServerPayloadAllOfNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadAllOfGetNetworkingAttributeTypeOk(arg CreateServerPayloadAllOfGetNetworkingAttributeType) (ret CreateServerPayloadAllOfGetNetworkingRetType, 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 setCreateServerPayloadAllOfGetNetworkingAttributeType(arg *CreateServerPayloadAllOfGetNetworkingAttributeType, val CreateServerPayloadAllOfGetNetworkingRetType) { - *arg = &val -} - -// CreateServerPayloadAllOf struct for CreateServerPayloadAllOf -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadAllOf struct { - // REQUIRED - Networking CreateServerPayloadAllOfGetNetworkingAttributeType `json:"networking" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateServerPayloadAllOf CreateServerPayloadAllOf - -// NewCreateServerPayloadAllOf instantiates a new CreateServerPayloadAllOf 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateServerPayloadAllOf(networking CreateServerPayloadAllOfGetNetworkingArgType) *CreateServerPayloadAllOf { - this := CreateServerPayloadAllOf{} - setCreateServerPayloadAllOfGetNetworkingAttributeType(&this.Networking, networking) - return &this -} - -// NewCreateServerPayloadAllOfWithDefaults instantiates a new CreateServerPayloadAllOf 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateServerPayloadAllOfWithDefaults() *CreateServerPayloadAllOf { - this := CreateServerPayloadAllOf{} - return &this -} - -// GetNetworking returns the Networking field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayloadAllOf) GetNetworking() (ret CreateServerPayloadAllOfGetNetworkingRetType) { - ret, _ = o.GetNetworkingOk() - return ret -} - -// GetNetworkingOk returns a tuple with the Networking field value -// 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 *CreateServerPayloadAllOf) GetNetworkingOk() (ret CreateServerPayloadAllOfGetNetworkingRetType, ok bool) { - return getCreateServerPayloadAllOfGetNetworkingAttributeTypeOk(o.Networking) -} - -// SetNetworking sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayloadAllOf) SetNetworking(v CreateServerPayloadAllOfGetNetworkingRetType) { - setCreateServerPayloadAllOfGetNetworkingAttributeType(&o.Networking, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateServerPayloadAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateServerPayloadAllOfGetNetworkingAttributeTypeOk(o.Networking); ok { - toSerialize["Networking"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateServerPayloadAllOf struct { - value *CreateServerPayloadAllOf - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateServerPayloadAllOf) Get() *CreateServerPayloadAllOf { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateServerPayloadAllOf) Set(val *CreateServerPayloadAllOf) { - 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 NullableCreateServerPayloadAllOf) 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 *NullableCreateServerPayloadAllOf) 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 NewNullableCreateServerPayloadAllOf(val *CreateServerPayloadAllOf) *NullableCreateServerPayloadAllOf { - return &NullableCreateServerPayloadAllOf{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 NullableCreateServerPayloadAllOf) 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 *NullableCreateServerPayloadAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_server_payload_all_of_networking.go b/services/iaas/model_create_server_payload_all_of_networking.go deleted file mode 100644 index 7b511d7455..0000000000 --- a/services/iaas/model_create_server_payload_all_of_networking.go +++ /dev/null @@ -1,159 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" -) - -// CreateServerPayloadAllOfNetworking - struct for CreateServerPayloadAllOfNetworking -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadAllOfNetworking struct { - CreateServerNetworking *CreateServerNetworking - CreateServerNetworkingWithNics *CreateServerNetworkingWithNics -} - -// CreateServerNetworkingAsCreateServerPayloadAllOfNetworking is a convenience function that returns CreateServerNetworking wrapped in CreateServerPayloadAllOfNetworking -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateServerNetworkingAsCreateServerPayloadAllOfNetworking(v *CreateServerNetworking) CreateServerPayloadAllOfNetworking { - return CreateServerPayloadAllOfNetworking{ - CreateServerNetworking: v, - } -} - -// CreateServerNetworkingWithNicsAsCreateServerPayloadAllOfNetworking is a convenience function that returns CreateServerNetworkingWithNics wrapped in CreateServerPayloadAllOfNetworking -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateServerNetworkingWithNicsAsCreateServerPayloadAllOfNetworking(v *CreateServerNetworkingWithNics) CreateServerPayloadAllOfNetworking { - return CreateServerPayloadAllOfNetworking{ - CreateServerNetworkingWithNics: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *CreateServerPayloadAllOfNetworking) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // Workaround until upstream issue is fixed: - // https://github.com/OpenAPITools/openapi-generator/issues/21751 - // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226 - // try to unmarshal data into CreateServerNetworking - dstCreateServerPayloadAllOfNetworking1 := &CreateServerPayloadAllOfNetworking{} - err = json.Unmarshal(data, &dstCreateServerPayloadAllOfNetworking1.CreateServerNetworking) - if err == nil { - jsonCreateServerNetworking, _ := json.Marshal(&dstCreateServerPayloadAllOfNetworking1.CreateServerNetworking) - if string(jsonCreateServerNetworking) != "{}" { // empty struct - dst.CreateServerNetworking = dstCreateServerPayloadAllOfNetworking1.CreateServerNetworking - match++ - } - } - - // try to unmarshal data into CreateServerNetworkingWithNics - dstCreateServerPayloadAllOfNetworking2 := &CreateServerPayloadAllOfNetworking{} - err = json.Unmarshal(data, &dstCreateServerPayloadAllOfNetworking2.CreateServerNetworkingWithNics) - if err == nil { - jsonCreateServerNetworkingWithNics, _ := json.Marshal(&dstCreateServerPayloadAllOfNetworking2.CreateServerNetworkingWithNics) - if string(jsonCreateServerNetworkingWithNics) != "{}" { // empty struct - dst.CreateServerNetworkingWithNics = dstCreateServerPayloadAllOfNetworking2.CreateServerNetworkingWithNics - match++ - } - } - - if match > 1 { // more than 1 match - // reset to nil - dst.CreateServerNetworking = nil - dst.CreateServerNetworkingWithNics = nil - - return fmt.Errorf("data matches more than one schema in oneOf(CreateServerPayloadAllOfNetworking)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateServerPayloadAllOfNetworking) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.CreateServerNetworking != nil { - return json.Marshal(&src.CreateServerNetworking) - } - - if src.CreateServerNetworkingWithNics != nil { - return json.Marshal(&src.CreateServerNetworkingWithNics) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *CreateServerPayloadAllOfNetworking) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.CreateServerNetworking != nil { - return obj.CreateServerNetworking - } - - if obj.CreateServerNetworkingWithNics != nil { - return obj.CreateServerNetworkingWithNics - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateServerPayloadAllOfNetworking struct { - value *CreateServerPayloadAllOfNetworking - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateServerPayloadAllOfNetworking) Get() *CreateServerPayloadAllOfNetworking { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateServerPayloadAllOfNetworking) Set(val *CreateServerPayloadAllOfNetworking) { - 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 NullableCreateServerPayloadAllOfNetworking) 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 *NullableCreateServerPayloadAllOfNetworking) 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 NewNullableCreateServerPayloadAllOfNetworking(val *CreateServerPayloadAllOfNetworking) *NullableCreateServerPayloadAllOfNetworking { - return &NullableCreateServerPayloadAllOfNetworking{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 NullableCreateServerPayloadAllOfNetworking) 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 *NullableCreateServerPayloadAllOfNetworking) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_server_payload_all_of_networking_test.go b/services/iaas/model_create_server_payload_all_of_networking_test.go deleted file mode 100644 index d0d485edea..0000000000 --- a/services/iaas/model_create_server_payload_all_of_networking_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas - -import ( - "testing" -) - -// isOneOf - -func TestCreateServerPayloadAllOfNetworking_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{} - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := &CreateServerPayloadAllOfNetworking{} - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - marshalJson, err := v.MarshalJSON() - if err != nil { - t.Fatalf("failed marshalling CreateServerPayloadAllOfNetworking: %v", err) - } - if string(marshalJson) != string(tt.args.src) { - t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson) - } - }) - } -} diff --git a/services/iaas/model_create_server_payload_all_of_test.go b/services/iaas/model_create_server_payload_all_of_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_server_payload_all_of_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_server_payload_test.go b/services/iaas/model_create_server_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_server_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_snapshot_payload.go b/services/iaas/model_create_snapshot_payload.go deleted file mode 100644 index 8f07d837f9..0000000000 --- a/services/iaas/model_create_snapshot_payload.go +++ /dev/null @@ -1,682 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the CreateSnapshotPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateSnapshotPayload{} - -/* - types and functions for availabilityZone -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetAvailabilityZoneAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetAvailabilityZoneAttributeTypeOk(arg CreateSnapshotPayloadGetAvailabilityZoneAttributeType) (ret CreateSnapshotPayloadGetAvailabilityZoneRetType, 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 setCreateSnapshotPayloadGetAvailabilityZoneAttributeType(arg *CreateSnapshotPayloadGetAvailabilityZoneAttributeType, val CreateSnapshotPayloadGetAvailabilityZoneRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetAvailabilityZoneArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetAvailabilityZoneRetType = string - -/* - 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 CreateSnapshotPayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetCreatedAtAttributeTypeOk(arg CreateSnapshotPayloadGetCreatedAtAttributeType) (ret CreateSnapshotPayloadGetCreatedAtRetType, 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 setCreateSnapshotPayloadGetCreatedAtAttributeType(arg *CreateSnapshotPayloadGetCreatedAtAttributeType, val CreateSnapshotPayloadGetCreatedAtRetType) { - *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 CreateSnapshotPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetDescriptionAttributeTypeOk(arg CreateSnapshotPayloadGetDescriptionAttributeType) (ret CreateSnapshotPayloadGetDescriptionRetType, 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 setCreateSnapshotPayloadGetDescriptionAttributeType(arg *CreateSnapshotPayloadGetDescriptionAttributeType, val CreateSnapshotPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetDescriptionRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetIdAttributeTypeOk(arg CreateSnapshotPayloadGetIdAttributeType) (ret CreateSnapshotPayloadGetIdRetType, 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 setCreateSnapshotPayloadGetIdAttributeType(arg *CreateSnapshotPayloadGetIdAttributeType, val CreateSnapshotPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetLabelsAttributeTypeOk(arg CreateSnapshotPayloadGetLabelsAttributeType) (ret CreateSnapshotPayloadGetLabelsRetType, 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 setCreateSnapshotPayloadGetLabelsAttributeType(arg *CreateSnapshotPayloadGetLabelsAttributeType, val CreateSnapshotPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetNameAttributeTypeOk(arg CreateSnapshotPayloadGetNameAttributeType) (ret CreateSnapshotPayloadGetNameRetType, 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 setCreateSnapshotPayloadGetNameAttributeType(arg *CreateSnapshotPayloadGetNameAttributeType, val CreateSnapshotPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetNameRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetSizeAttributeTypeOk(arg CreateSnapshotPayloadGetSizeAttributeType) (ret CreateSnapshotPayloadGetSizeRetType, 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 setCreateSnapshotPayloadGetSizeAttributeType(arg *CreateSnapshotPayloadGetSizeAttributeType, val CreateSnapshotPayloadGetSizeRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetStatusAttributeTypeOk(arg CreateSnapshotPayloadGetStatusAttributeType) (ret CreateSnapshotPayloadGetStatusRetType, 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 setCreateSnapshotPayloadGetStatusAttributeType(arg *CreateSnapshotPayloadGetStatusAttributeType, val CreateSnapshotPayloadGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetStatusRetType = 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 CreateSnapshotPayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetUpdatedAtAttributeTypeOk(arg CreateSnapshotPayloadGetUpdatedAtAttributeType) (ret CreateSnapshotPayloadGetUpdatedAtRetType, 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 setCreateSnapshotPayloadGetUpdatedAtAttributeType(arg *CreateSnapshotPayloadGetUpdatedAtAttributeType, val CreateSnapshotPayloadGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for volumeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetVolumeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateSnapshotPayloadGetVolumeIdAttributeTypeOk(arg CreateSnapshotPayloadGetVolumeIdAttributeType) (ret CreateSnapshotPayloadGetVolumeIdRetType, 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 setCreateSnapshotPayloadGetVolumeIdAttributeType(arg *CreateSnapshotPayloadGetVolumeIdAttributeType, val CreateSnapshotPayloadGetVolumeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetVolumeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayloadGetVolumeIdRetType = string - -// CreateSnapshotPayload Object that represents a snapshot. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateSnapshotPayload struct { - // Object that represents an availability zone. - AvailabilityZone CreateSnapshotPayloadGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` - // Date-time when resource was created. - CreatedAt CreateSnapshotPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - 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. - Labels CreateSnapshotPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name CreateSnapshotPayloadGetNameAttributeType `json:"name,omitempty"` - // Size in Gigabyte. - Size CreateSnapshotPayloadGetSizeAttributeType `json:"size,omitempty"` - // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. - Status CreateSnapshotPayloadGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt CreateSnapshotPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - // Universally Unique Identifier (UUID). - // REQUIRED - VolumeId CreateSnapshotPayloadGetVolumeIdAttributeType `json:"volumeId" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateSnapshotPayload CreateSnapshotPayload - -// NewCreateSnapshotPayload instantiates a new CreateSnapshotPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateSnapshotPayload(volumeId CreateSnapshotPayloadGetVolumeIdArgType) *CreateSnapshotPayload { - this := CreateSnapshotPayload{} - setCreateSnapshotPayloadGetVolumeIdAttributeType(&this.VolumeId, volumeId) - return &this -} - -// NewCreateSnapshotPayloadWithDefaults instantiates a new CreateSnapshotPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateSnapshotPayloadWithDefaults() *CreateSnapshotPayload { - this := CreateSnapshotPayload{} - return &this -} - -// GetAvailabilityZone returns the AvailabilityZone 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 *CreateSnapshotPayload) GetAvailabilityZone() (res CreateSnapshotPayloadGetAvailabilityZoneRetType) { - res, _ = o.GetAvailabilityZoneOk() - return -} - -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone 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 *CreateSnapshotPayload) GetAvailabilityZoneOk() (ret CreateSnapshotPayloadGetAvailabilityZoneRetType, ok bool) { - return getCreateSnapshotPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) -} - -// HasAvailabilityZone 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 *CreateSnapshotPayload) HasAvailabilityZone() bool { - _, ok := o.GetAvailabilityZoneOk() - return ok -} - -// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) SetAvailabilityZone(v CreateSnapshotPayloadGetAvailabilityZoneRetType) { - setCreateSnapshotPayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, 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 *CreateSnapshotPayload) GetCreatedAt() (res CreateSnapshotPayloadGetCreatedAtRetType) { - 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 *CreateSnapshotPayload) GetCreatedAtOk() (ret CreateSnapshotPayloadGetCreatedAtRetType, ok bool) { - return getCreateSnapshotPayloadGetCreatedAtAttributeTypeOk(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 *CreateSnapshotPayload) 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 *CreateSnapshotPayload) SetCreatedAt(v CreateSnapshotPayloadGetCreatedAtRetType) { - setCreateSnapshotPayloadGetCreatedAtAttributeType(&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 *CreateSnapshotPayload) GetDescription() (res CreateSnapshotPayloadGetDescriptionRetType) { - 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 *CreateSnapshotPayload) GetDescriptionOk() (ret CreateSnapshotPayloadGetDescriptionRetType, ok bool) { - return getCreateSnapshotPayloadGetDescriptionAttributeTypeOk(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 *CreateSnapshotPayload) 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 *CreateSnapshotPayload) SetDescription(v CreateSnapshotPayloadGetDescriptionRetType) { - setCreateSnapshotPayloadGetDescriptionAttributeType(&o.Description, 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 *CreateSnapshotPayload) GetId() (res CreateSnapshotPayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *CreateSnapshotPayload) GetIdOk() (ret CreateSnapshotPayloadGetIdRetType, ok bool) { - return getCreateSnapshotPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *CreateSnapshotPayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) SetId(v CreateSnapshotPayloadGetIdRetType) { - setCreateSnapshotPayloadGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) GetLabels() (res CreateSnapshotPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) GetLabelsOk() (ret CreateSnapshotPayloadGetLabelsRetType, ok bool) { - return getCreateSnapshotPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) SetLabels(v CreateSnapshotPayloadGetLabelsRetType) { - setCreateSnapshotPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) GetName() (res CreateSnapshotPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *CreateSnapshotPayload) GetNameOk() (ret CreateSnapshotPayloadGetNameRetType, ok bool) { - return getCreateSnapshotPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *CreateSnapshotPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) SetName(v CreateSnapshotPayloadGetNameRetType) { - setCreateSnapshotPayloadGetNameAttributeType(&o.Name, v) -} - -// GetSize returns the Size 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 *CreateSnapshotPayload) GetSize() (res CreateSnapshotPayloadGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *CreateSnapshotPayload) GetSizeOk() (ret CreateSnapshotPayloadGetSizeRetType, ok bool) { - return getCreateSnapshotPayloadGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *CreateSnapshotPayload) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) SetSize(v CreateSnapshotPayloadGetSizeRetType) { - setCreateSnapshotPayloadGetSizeAttributeType(&o.Size, v) -} - -// GetStatus returns the Status 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 *CreateSnapshotPayload) GetStatus() (res CreateSnapshotPayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *CreateSnapshotPayload) GetStatusOk() (ret CreateSnapshotPayloadGetStatusRetType, ok bool) { - return getCreateSnapshotPayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *CreateSnapshotPayload) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) SetStatus(v CreateSnapshotPayloadGetStatusRetType) { - setCreateSnapshotPayloadGetStatusAttributeType(&o.Status, 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 *CreateSnapshotPayload) GetUpdatedAt() (res CreateSnapshotPayloadGetUpdatedAtRetType) { - 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 *CreateSnapshotPayload) GetUpdatedAtOk() (ret CreateSnapshotPayloadGetUpdatedAtRetType, ok bool) { - return getCreateSnapshotPayloadGetUpdatedAtAttributeTypeOk(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 *CreateSnapshotPayload) 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 *CreateSnapshotPayload) SetUpdatedAt(v CreateSnapshotPayloadGetUpdatedAtRetType) { - setCreateSnapshotPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetVolumeId returns the VolumeId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) GetVolumeId() (ret CreateSnapshotPayloadGetVolumeIdRetType) { - ret, _ = o.GetVolumeIdOk() - return ret -} - -// GetVolumeIdOk returns a tuple with the VolumeId field value -// 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 *CreateSnapshotPayload) GetVolumeIdOk() (ret CreateSnapshotPayloadGetVolumeIdRetType, ok bool) { - return getCreateSnapshotPayloadGetVolumeIdAttributeTypeOk(o.VolumeId) -} - -// SetVolumeId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateSnapshotPayload) SetVolumeId(v CreateSnapshotPayloadGetVolumeIdRetType) { - setCreateSnapshotPayloadGetVolumeIdAttributeType(&o.VolumeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateSnapshotPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateSnapshotPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { - toSerialize["AvailabilityZone"] = val - } - if val, ok := getCreateSnapshotPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getCreateSnapshotPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCreateSnapshotPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateSnapshotPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateSnapshotPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateSnapshotPayloadGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getCreateSnapshotPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getCreateSnapshotPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getCreateSnapshotPayloadGetVolumeIdAttributeTypeOk(o.VolumeId); ok { - toSerialize["VolumeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateSnapshotPayload struct { - value *CreateSnapshotPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateSnapshotPayload) Get() *CreateSnapshotPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateSnapshotPayload) Set(val *CreateSnapshotPayload) { - 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 NullableCreateSnapshotPayload) 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 *NullableCreateSnapshotPayload) 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 NewNullableCreateSnapshotPayload(val *CreateSnapshotPayload) *NullableCreateSnapshotPayload { - return &NullableCreateSnapshotPayload{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 NullableCreateSnapshotPayload) 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 *NullableCreateSnapshotPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_snapshot_payload_test.go b/services/iaas/model_create_snapshot_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_snapshot_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_create_volume_payload.go b/services/iaas/model_create_volume_payload.go deleted file mode 100644 index 0bf3ecaa86..0000000000 --- a/services/iaas/model_create_volume_payload.go +++ /dev/null @@ -1,1033 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the CreateVolumePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateVolumePayload{} - -/* - types and functions for availabilityZone -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetAvailabilityZoneAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(arg CreateVolumePayloadGetAvailabilityZoneAttributeType) (ret CreateVolumePayloadGetAvailabilityZoneRetType, 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 setCreateVolumePayloadGetAvailabilityZoneAttributeType(arg *CreateVolumePayloadGetAvailabilityZoneAttributeType, val CreateVolumePayloadGetAvailabilityZoneRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetAvailabilityZoneArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetAvailabilityZoneRetType = string - -/* - types and functions for bootable -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadgetBootableAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadgetBootableArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadgetBootableRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadgetBootableAttributeTypeOk(arg CreateVolumePayloadgetBootableAttributeType) (ret CreateVolumePayloadgetBootableRetType, 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 setCreateVolumePayloadgetBootableAttributeType(arg *CreateVolumePayloadgetBootableAttributeType, val CreateVolumePayloadgetBootableRetType) { - *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 CreateVolumePayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetCreatedAtAttributeTypeOk(arg CreateVolumePayloadGetCreatedAtAttributeType) (ret CreateVolumePayloadGetCreatedAtRetType, 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 setCreateVolumePayloadGetCreatedAtAttributeType(arg *CreateVolumePayloadGetCreatedAtAttributeType, val CreateVolumePayloadGetCreatedAtRetType) { - *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 CreateVolumePayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetDescriptionAttributeTypeOk(arg CreateVolumePayloadGetDescriptionAttributeType) (ret CreateVolumePayloadGetDescriptionRetType, 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 setCreateVolumePayloadGetDescriptionAttributeType(arg *CreateVolumePayloadGetDescriptionAttributeType, val CreateVolumePayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetDescriptionRetType = string - -/* - types and functions for encrypted -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadgetEncryptedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadgetEncryptedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadgetEncryptedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadgetEncryptedAttributeTypeOk(arg CreateVolumePayloadgetEncryptedAttributeType) (ret CreateVolumePayloadgetEncryptedRetType, 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 setCreateVolumePayloadgetEncryptedAttributeType(arg *CreateVolumePayloadgetEncryptedAttributeType, val CreateVolumePayloadgetEncryptedRetType) { - *arg = &val -} - -/* - types and functions for encryptionParameters -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetEncryptionParametersAttributeType = *VolumeEncryptionParameter - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetEncryptionParametersArgType = VolumeEncryptionParameter - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetEncryptionParametersRetType = VolumeEncryptionParameter - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(arg CreateVolumePayloadGetEncryptionParametersAttributeType) (ret CreateVolumePayloadGetEncryptionParametersRetType, 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 setCreateVolumePayloadGetEncryptionParametersAttributeType(arg *CreateVolumePayloadGetEncryptionParametersAttributeType, val CreateVolumePayloadGetEncryptionParametersRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetIdAttributeTypeOk(arg CreateVolumePayloadGetIdAttributeType) (ret CreateVolumePayloadGetIdRetType, 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 setCreateVolumePayloadGetIdAttributeType(arg *CreateVolumePayloadGetIdAttributeType, val CreateVolumePayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetIdRetType = string - -/* - types and functions for imageConfig -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetImageConfigAttributeType = *ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetImageConfigArgType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetImageConfigRetType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetImageConfigAttributeTypeOk(arg CreateVolumePayloadGetImageConfigAttributeType) (ret CreateVolumePayloadGetImageConfigRetType, 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 setCreateVolumePayloadGetImageConfigAttributeType(arg *CreateVolumePayloadGetImageConfigAttributeType, val CreateVolumePayloadGetImageConfigRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetLabelsAttributeTypeOk(arg CreateVolumePayloadGetLabelsAttributeType) (ret CreateVolumePayloadGetLabelsRetType, 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 setCreateVolumePayloadGetLabelsAttributeType(arg *CreateVolumePayloadGetLabelsAttributeType, val CreateVolumePayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetNameAttributeTypeOk(arg CreateVolumePayloadGetNameAttributeType) (ret CreateVolumePayloadGetNameRetType, 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 setCreateVolumePayloadGetNameAttributeType(arg *CreateVolumePayloadGetNameAttributeType, val CreateVolumePayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetNameRetType = string - -/* - types and functions for performanceClass -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetPerformanceClassAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(arg CreateVolumePayloadGetPerformanceClassAttributeType) (ret CreateVolumePayloadGetPerformanceClassRetType, 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 setCreateVolumePayloadGetPerformanceClassAttributeType(arg *CreateVolumePayloadGetPerformanceClassAttributeType, val CreateVolumePayloadGetPerformanceClassRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetPerformanceClassArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetPerformanceClassRetType = string - -/* - types and functions for serverId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetServerIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetServerIdAttributeTypeOk(arg CreateVolumePayloadGetServerIdAttributeType) (ret CreateVolumePayloadGetServerIdRetType, 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 setCreateVolumePayloadGetServerIdAttributeType(arg *CreateVolumePayloadGetServerIdAttributeType, val CreateVolumePayloadGetServerIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetServerIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetServerIdRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetSizeAttributeTypeOk(arg CreateVolumePayloadGetSizeAttributeType) (ret CreateVolumePayloadGetSizeRetType, 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 setCreateVolumePayloadGetSizeAttributeType(arg *CreateVolumePayloadGetSizeAttributeType, val CreateVolumePayloadGetSizeRetType) { - *arg = &val -} - -/* - types and functions for source -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetSourceAttributeType = *VolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetSourceArgType = VolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetSourceRetType = VolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetSourceAttributeTypeOk(arg CreateVolumePayloadGetSourceAttributeType) (ret CreateVolumePayloadGetSourceRetType, 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 setCreateVolumePayloadGetSourceAttributeType(arg *CreateVolumePayloadGetSourceAttributeType, val CreateVolumePayloadGetSourceRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetStatusAttributeTypeOk(arg CreateVolumePayloadGetStatusAttributeType) (ret CreateVolumePayloadGetStatusRetType, 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 setCreateVolumePayloadGetStatusAttributeType(arg *CreateVolumePayloadGetStatusAttributeType, val CreateVolumePayloadGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetStatusRetType = 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 CreateVolumePayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(arg CreateVolumePayloadGetUpdatedAtAttributeType) (ret CreateVolumePayloadGetUpdatedAtRetType, 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 setCreateVolumePayloadGetUpdatedAtAttributeType(arg *CreateVolumePayloadGetUpdatedAtAttributeType, val CreateVolumePayloadGetUpdatedAtRetType) { - *arg = &val -} - -// CreateVolumePayload Object that represents a volume and its parameters. Volumes sized up to 16000GB are supported. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateVolumePayload struct { - // Object that represents an availability zone. - // REQUIRED - AvailabilityZone CreateVolumePayloadGetAvailabilityZoneAttributeType `json:"availabilityZone" required:"true"` - // Indicates if a volume is bootable. - Bootable CreateVolumePayloadgetBootableAttributeType `json:"bootable,omitempty"` - // Date-time when resource was created. - CreatedAt CreateVolumePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description CreateVolumePayloadGetDescriptionAttributeType `json:"description,omitempty"` - // Indicates if a volume is encrypted. - Encrypted CreateVolumePayloadgetEncryptedAttributeType `json:"encrypted,omitempty"` - EncryptionParameters CreateVolumePayloadGetEncryptionParametersAttributeType `json:"encryptionParameters,omitempty"` - // 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. - Labels CreateVolumePayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name CreateVolumePayloadGetNameAttributeType `json:"name,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass CreateVolumePayloadGetPerformanceClassAttributeType `json:"performanceClass,omitempty"` - // Universally Unique Identifier (UUID). - ServerId CreateVolumePayloadGetServerIdAttributeType `json:"serverId,omitempty"` - // Size in Gigabyte. - Size CreateVolumePayloadGetSizeAttributeType `json:"size,omitempty"` - Source CreateVolumePayloadGetSourceAttributeType `json:"source,omitempty"` - // The status of a volume object. Possible values: `ATTACHED`, `ATTACHING`, `AVAILABLE`, `AWAITING-TRANSFER`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `DETACHING`, `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, `ERROR_KMS-ENCRYPTION-PARAMS`, `MAINTENANCE`, `RESERVED`, `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`. - Status CreateVolumePayloadGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt CreateVolumePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateVolumePayload CreateVolumePayload - -// NewCreateVolumePayload instantiates a new CreateVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateVolumePayload(availabilityZone CreateVolumePayloadGetAvailabilityZoneArgType) *CreateVolumePayload { - this := CreateVolumePayload{} - setCreateVolumePayloadGetAvailabilityZoneAttributeType(&this.AvailabilityZone, availabilityZone) - return &this -} - -// NewCreateVolumePayloadWithDefaults instantiates a new CreateVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateVolumePayloadWithDefaults() *CreateVolumePayload { - this := CreateVolumePayload{} - return &this -} - -// GetAvailabilityZone returns the AvailabilityZone field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) GetAvailabilityZone() (ret CreateVolumePayloadGetAvailabilityZoneRetType) { - ret, _ = o.GetAvailabilityZoneOk() - return ret -} - -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value -// 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 *CreateVolumePayload) GetAvailabilityZoneOk() (ret CreateVolumePayloadGetAvailabilityZoneRetType, ok bool) { - return getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) -} - -// SetAvailabilityZone sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetAvailabilityZone(v CreateVolumePayloadGetAvailabilityZoneRetType) { - setCreateVolumePayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) -} - -// GetBootable returns the Bootable 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 *CreateVolumePayload) GetBootable() (res CreateVolumePayloadgetBootableRetType) { - res, _ = o.GetBootableOk() - return -} - -// GetBootableOk returns a tuple with the Bootable 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 *CreateVolumePayload) GetBootableOk() (ret CreateVolumePayloadgetBootableRetType, ok bool) { - return getCreateVolumePayloadgetBootableAttributeTypeOk(o.Bootable) -} - -// HasBootable 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 *CreateVolumePayload) HasBootable() bool { - _, ok := o.GetBootableOk() - return ok -} - -// SetBootable gets a reference to the given bool and assigns it to the Bootable field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetBootable(v CreateVolumePayloadgetBootableRetType) { - setCreateVolumePayloadgetBootableAttributeType(&o.Bootable, 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 *CreateVolumePayload) GetCreatedAt() (res CreateVolumePayloadGetCreatedAtRetType) { - 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 *CreateVolumePayload) GetCreatedAtOk() (ret CreateVolumePayloadGetCreatedAtRetType, ok bool) { - return getCreateVolumePayloadGetCreatedAtAttributeTypeOk(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 *CreateVolumePayload) 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 *CreateVolumePayload) SetCreatedAt(v CreateVolumePayloadGetCreatedAtRetType) { - setCreateVolumePayloadGetCreatedAtAttributeType(&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 *CreateVolumePayload) GetDescription() (res CreateVolumePayloadGetDescriptionRetType) { - 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 *CreateVolumePayload) GetDescriptionOk() (ret CreateVolumePayloadGetDescriptionRetType, ok bool) { - return getCreateVolumePayloadGetDescriptionAttributeTypeOk(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 *CreateVolumePayload) 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 *CreateVolumePayload) SetDescription(v CreateVolumePayloadGetDescriptionRetType) { - setCreateVolumePayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetEncrypted returns the Encrypted 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 *CreateVolumePayload) GetEncrypted() (res CreateVolumePayloadgetEncryptedRetType) { - res, _ = o.GetEncryptedOk() - return -} - -// GetEncryptedOk returns a tuple with the Encrypted 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 *CreateVolumePayload) GetEncryptedOk() (ret CreateVolumePayloadgetEncryptedRetType, ok bool) { - return getCreateVolumePayloadgetEncryptedAttributeTypeOk(o.Encrypted) -} - -// HasEncrypted 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 *CreateVolumePayload) HasEncrypted() bool { - _, ok := o.GetEncryptedOk() - return ok -} - -// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetEncrypted(v CreateVolumePayloadgetEncryptedRetType) { - setCreateVolumePayloadgetEncryptedAttributeType(&o.Encrypted, v) -} - -// GetEncryptionParameters returns the EncryptionParameters 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 *CreateVolumePayload) GetEncryptionParameters() (res CreateVolumePayloadGetEncryptionParametersRetType) { - res, _ = o.GetEncryptionParametersOk() - return -} - -// GetEncryptionParametersOk returns a tuple with the EncryptionParameters 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 *CreateVolumePayload) GetEncryptionParametersOk() (ret CreateVolumePayloadGetEncryptionParametersRetType, ok bool) { - return getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters) -} - -// HasEncryptionParameters 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 *CreateVolumePayload) HasEncryptionParameters() bool { - _, ok := o.GetEncryptionParametersOk() - return ok -} - -// SetEncryptionParameters gets a reference to the given VolumeEncryptionParameter and assigns it to the EncryptionParameters field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetEncryptionParameters(v CreateVolumePayloadGetEncryptionParametersRetType) { - setCreateVolumePayloadGetEncryptionParametersAttributeType(&o.EncryptionParameters, 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 *CreateVolumePayload) GetId() (res CreateVolumePayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *CreateVolumePayload) GetIdOk() (ret CreateVolumePayloadGetIdRetType, ok bool) { - return getCreateVolumePayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *CreateVolumePayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetId(v CreateVolumePayloadGetIdRetType) { - setCreateVolumePayloadGetIdAttributeType(&o.Id, v) -} - -// GetImageConfig returns the ImageConfig 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 *CreateVolumePayload) GetImageConfig() (res CreateVolumePayloadGetImageConfigRetType) { - res, _ = o.GetImageConfigOk() - return -} - -// GetImageConfigOk returns a tuple with the ImageConfig 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 *CreateVolumePayload) GetImageConfigOk() (ret CreateVolumePayloadGetImageConfigRetType, ok bool) { - return getCreateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig) -} - -// HasImageConfig 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 *CreateVolumePayload) HasImageConfig() bool { - _, ok := o.GetImageConfigOk() - return ok -} - -// SetImageConfig gets a reference to the given ImageConfig and assigns it to the ImageConfig field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetImageConfig(v CreateVolumePayloadGetImageConfigRetType) { - setCreateVolumePayloadGetImageConfigAttributeType(&o.ImageConfig, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) GetLabels() (res CreateVolumePayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) GetLabelsOk() (ret CreateVolumePayloadGetLabelsRetType, ok bool) { - return getCreateVolumePayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetLabels(v CreateVolumePayloadGetLabelsRetType) { - setCreateVolumePayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) GetName() (res CreateVolumePayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *CreateVolumePayload) GetNameOk() (ret CreateVolumePayloadGetNameRetType, ok bool) { - return getCreateVolumePayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *CreateVolumePayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetName(v CreateVolumePayloadGetNameRetType) { - setCreateVolumePayloadGetNameAttributeType(&o.Name, v) -} - -// GetPerformanceClass returns the PerformanceClass 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 *CreateVolumePayload) GetPerformanceClass() (res CreateVolumePayloadGetPerformanceClassRetType) { - res, _ = o.GetPerformanceClassOk() - return -} - -// GetPerformanceClassOk returns a tuple with the PerformanceClass 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 *CreateVolumePayload) GetPerformanceClassOk() (ret CreateVolumePayloadGetPerformanceClassRetType, ok bool) { - return getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass) -} - -// HasPerformanceClass 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 *CreateVolumePayload) HasPerformanceClass() bool { - _, ok := o.GetPerformanceClassOk() - return ok -} - -// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetPerformanceClass(v CreateVolumePayloadGetPerformanceClassRetType) { - setCreateVolumePayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v) -} - -// GetServerId returns the ServerId 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 *CreateVolumePayload) GetServerId() (res CreateVolumePayloadGetServerIdRetType) { - res, _ = o.GetServerIdOk() - return -} - -// GetServerIdOk returns a tuple with the ServerId 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 *CreateVolumePayload) GetServerIdOk() (ret CreateVolumePayloadGetServerIdRetType, ok bool) { - return getCreateVolumePayloadGetServerIdAttributeTypeOk(o.ServerId) -} - -// HasServerId 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 *CreateVolumePayload) HasServerId() bool { - _, ok := o.GetServerIdOk() - return ok -} - -// SetServerId gets a reference to the given string and assigns it to the ServerId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetServerId(v CreateVolumePayloadGetServerIdRetType) { - setCreateVolumePayloadGetServerIdAttributeType(&o.ServerId, v) -} - -// GetSize returns the Size 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 *CreateVolumePayload) GetSize() (res CreateVolumePayloadGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *CreateVolumePayload) GetSizeOk() (ret CreateVolumePayloadGetSizeRetType, ok bool) { - return getCreateVolumePayloadGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *CreateVolumePayload) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetSize(v CreateVolumePayloadGetSizeRetType) { - setCreateVolumePayloadGetSizeAttributeType(&o.Size, v) -} - -// GetSource returns the Source 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 *CreateVolumePayload) GetSource() (res CreateVolumePayloadGetSourceRetType) { - res, _ = o.GetSourceOk() - return -} - -// GetSourceOk returns a tuple with the Source 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 *CreateVolumePayload) GetSourceOk() (ret CreateVolumePayloadGetSourceRetType, ok bool) { - return getCreateVolumePayloadGetSourceAttributeTypeOk(o.Source) -} - -// HasSource 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 *CreateVolumePayload) HasSource() bool { - _, ok := o.GetSourceOk() - return ok -} - -// SetSource gets a reference to the given VolumeSource and assigns it to the Source field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetSource(v CreateVolumePayloadGetSourceRetType) { - setCreateVolumePayloadGetSourceAttributeType(&o.Source, v) -} - -// GetStatus returns the Status 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 *CreateVolumePayload) GetStatus() (res CreateVolumePayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *CreateVolumePayload) GetStatusOk() (ret CreateVolumePayloadGetStatusRetType, ok bool) { - return getCreateVolumePayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *CreateVolumePayload) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateVolumePayload) SetStatus(v CreateVolumePayloadGetStatusRetType) { - setCreateVolumePayloadGetStatusAttributeType(&o.Status, 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 *CreateVolumePayload) GetUpdatedAt() (res CreateVolumePayloadGetUpdatedAtRetType) { - 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 *CreateVolumePayload) GetUpdatedAtOk() (ret CreateVolumePayloadGetUpdatedAtRetType, ok bool) { - return getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(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 *CreateVolumePayload) 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 *CreateVolumePayload) SetUpdatedAt(v CreateVolumePayloadGetUpdatedAtRetType) { - setCreateVolumePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateVolumePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { - toSerialize["AvailabilityZone"] = val - } - if val, ok := getCreateVolumePayloadgetBootableAttributeTypeOk(o.Bootable); ok { - toSerialize["Bootable"] = val - } - if val, ok := getCreateVolumePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getCreateVolumePayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCreateVolumePayloadgetEncryptedAttributeTypeOk(o.Encrypted); ok { - toSerialize["Encrypted"] = val - } - if val, ok := getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters); ok { - toSerialize["EncryptionParameters"] = val - } - if val, ok := getCreateVolumePayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig); ok { - toSerialize["ImageConfig"] = val - } - if val, ok := getCreateVolumePayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateVolumePayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok { - toSerialize["PerformanceClass"] = val - } - if val, ok := getCreateVolumePayloadGetServerIdAttributeTypeOk(o.ServerId); ok { - toSerialize["ServerId"] = val - } - if val, ok := getCreateVolumePayloadGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getCreateVolumePayloadGetSourceAttributeTypeOk(o.Source); ok { - toSerialize["Source"] = val - } - if val, ok := getCreateVolumePayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateVolumePayload struct { - value *CreateVolumePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateVolumePayload) Get() *CreateVolumePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateVolumePayload) Set(val *CreateVolumePayload) { - 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 NullableCreateVolumePayload) 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 *NullableCreateVolumePayload) 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 NewNullableCreateVolumePayload(val *CreateVolumePayload) *NullableCreateVolumePayload { - return &NullableCreateVolumePayload{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 NullableCreateVolumePayload) 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 *NullableCreateVolumePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_create_volume_payload_test.go b/services/iaas/model_create_volume_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_create_volume_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_destination_cidrv4.go b/services/iaas/model_destination_cidrv4.go deleted file mode 100644 index 9566e18641..0000000000 --- a/services/iaas/model_destination_cidrv4.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the DestinationCIDRv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DestinationCIDRv4{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv4GetTypeAttributeType = *string - -// 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) { - 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 setDestinationCIDRv4GetTypeAttributeType(arg *DestinationCIDRv4GetTypeAttributeType, val DestinationCIDRv4GetTypeRetType) { - *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 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv4GetValueAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDestinationCIDRv4GetValueAttributeTypeOk(arg DestinationCIDRv4GetValueAttributeType) (ret DestinationCIDRv4GetValueRetType, 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 setDestinationCIDRv4GetValueAttributeType(arg *DestinationCIDRv4GetValueAttributeType, val DestinationCIDRv4GetValueRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv4GetValueArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv4GetValueRetType = string - -// DestinationCIDRv4 IPv4 Classless Inter-Domain Routing (CIDR) Object. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv4 struct { - // REQUIRED - Type DestinationCIDRv4GetTypeAttributeType `json:"type" required:"true"` - // An CIDRv4 string. - // REQUIRED - Value DestinationCIDRv4GetValueAttributeType `json:"value" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDestinationCIDRv4(types DestinationCIDRv4GetTypeArgType, value DestinationCIDRv4GetValueArgType) *DestinationCIDRv4 { - this := DestinationCIDRv4{} - setDestinationCIDRv4GetTypeAttributeType(&this.Type, types) - setDestinationCIDRv4GetValueAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDestinationCIDRv4WithDefaults() *DestinationCIDRv4 { - this := DestinationCIDRv4{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DestinationCIDRv4) GetType() (ret DestinationCIDRv4GetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *DestinationCIDRv4) GetTypeOk() (ret DestinationCIDRv4GetTypeRetType, ok bool) { - return getDestinationCIDRv4GetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DestinationCIDRv4) SetType(v DestinationCIDRv4GetTypeRetType) { - setDestinationCIDRv4GetTypeAttributeType(&o.Type, v) -} - -// GetValue returns the Value field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DestinationCIDRv4) GetValue() (ret DestinationCIDRv4GetValueRetType) { - ret, _ = o.GetValueOk() - return ret -} - -// GetValueOk returns a tuple with the Value field value -// 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 *DestinationCIDRv4) GetValueOk() (ret DestinationCIDRv4GetValueRetType, ok bool) { - return getDestinationCIDRv4GetValueAttributeTypeOk(o.Value) -} - -// SetValue sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DestinationCIDRv4) SetValue(v DestinationCIDRv4GetValueRetType) { - setDestinationCIDRv4GetValueAttributeType(&o.Value, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DestinationCIDRv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDestinationCIDRv4GetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - if val, ok := getDestinationCIDRv4GetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDestinationCIDRv4 struct { - value *DestinationCIDRv4 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDestinationCIDRv4) Get() *DestinationCIDRv4 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDestinationCIDRv4) Set(val *DestinationCIDRv4) { - 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 NullableDestinationCIDRv4) 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 *NullableDestinationCIDRv4) 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 NewNullableDestinationCIDRv4(val *DestinationCIDRv4) *NullableDestinationCIDRv4 { - return &NullableDestinationCIDRv4{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 NullableDestinationCIDRv4) 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 *NullableDestinationCIDRv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_destination_cidrv4_test.go b/services/iaas/model_destination_cidrv4_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_destination_cidrv4_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_destination_cidrv6.go b/services/iaas/model_destination_cidrv6.go deleted file mode 100644 index 604f6c2805..0000000000 --- a/services/iaas/model_destination_cidrv6.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the DestinationCIDRv6 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DestinationCIDRv6{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv6GetTypeAttributeType = *string - -// 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) { - 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 setDestinationCIDRv6GetTypeAttributeType(arg *DestinationCIDRv6GetTypeAttributeType, val DestinationCIDRv6GetTypeRetType) { - *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 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv6GetValueAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDestinationCIDRv6GetValueAttributeTypeOk(arg DestinationCIDRv6GetValueAttributeType) (ret DestinationCIDRv6GetValueRetType, 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 setDestinationCIDRv6GetValueAttributeType(arg *DestinationCIDRv6GetValueAttributeType, val DestinationCIDRv6GetValueRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv6GetValueArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv6GetValueRetType = string - -// DestinationCIDRv6 IPv6 Classless Inter-Domain Routing (CIDR) Object. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DestinationCIDRv6 struct { - // REQUIRED - Type DestinationCIDRv6GetTypeAttributeType `json:"type" required:"true"` - // An CIDRv6 string. - // REQUIRED - Value DestinationCIDRv6GetValueAttributeType `json:"value" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDestinationCIDRv6(types DestinationCIDRv6GetTypeArgType, value DestinationCIDRv6GetValueArgType) *DestinationCIDRv6 { - this := DestinationCIDRv6{} - setDestinationCIDRv6GetTypeAttributeType(&this.Type, types) - setDestinationCIDRv6GetValueAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDestinationCIDRv6WithDefaults() *DestinationCIDRv6 { - this := DestinationCIDRv6{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DestinationCIDRv6) GetType() (ret DestinationCIDRv6GetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *DestinationCIDRv6) GetTypeOk() (ret DestinationCIDRv6GetTypeRetType, ok bool) { - return getDestinationCIDRv6GetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DestinationCIDRv6) SetType(v DestinationCIDRv6GetTypeRetType) { - setDestinationCIDRv6GetTypeAttributeType(&o.Type, v) -} - -// GetValue returns the Value field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DestinationCIDRv6) GetValue() (ret DestinationCIDRv6GetValueRetType) { - ret, _ = o.GetValueOk() - return ret -} - -// GetValueOk returns a tuple with the Value field value -// 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 *DestinationCIDRv6) GetValueOk() (ret DestinationCIDRv6GetValueRetType, ok bool) { - return getDestinationCIDRv6GetValueAttributeTypeOk(o.Value) -} - -// SetValue sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DestinationCIDRv6) SetValue(v DestinationCIDRv6GetValueRetType) { - setDestinationCIDRv6GetValueAttributeType(&o.Value, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DestinationCIDRv6) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDestinationCIDRv6GetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - if val, ok := getDestinationCIDRv6GetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDestinationCIDRv6 struct { - value *DestinationCIDRv6 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDestinationCIDRv6) Get() *DestinationCIDRv6 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDestinationCIDRv6) Set(val *DestinationCIDRv6) { - 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 NullableDestinationCIDRv6) 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 *NullableDestinationCIDRv6) 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 NewNullableDestinationCIDRv6(val *DestinationCIDRv6) *NullableDestinationCIDRv6 { - return &NullableDestinationCIDRv6{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 NullableDestinationCIDRv6) 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 *NullableDestinationCIDRv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_destination_cidrv6_test.go b/services/iaas/model_destination_cidrv6_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_destination_cidrv6_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_error.go b/services/iaas/model_error.go deleted file mode 100644 index 68151211d1..0000000000 --- a/services/iaas/model_error.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the Error type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Error{} - -/* - types and functions for code -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorGetCodeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorGetCodeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorGetCodeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorGetCodeAttributeTypeOk(arg ErrorGetCodeAttributeType) (ret ErrorGetCodeRetType, 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 setErrorGetCodeAttributeType(arg *ErrorGetCodeAttributeType, val ErrorGetCodeRetType) { - *arg = &val -} - -/* - types and functions for msg -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorGetMsgAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorGetMsgAttributeTypeOk(arg ErrorGetMsgAttributeType) (ret ErrorGetMsgRetType, 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 setErrorGetMsgAttributeType(arg *ErrorGetMsgAttributeType, val ErrorGetMsgRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorGetMsgArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorGetMsgRetType = string - -// Error Error with HTTP error code and an error message. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Error struct { - // REQUIRED - Code ErrorGetCodeAttributeType `json:"code" required:"true"` - // An error message. - // REQUIRED - Msg ErrorGetMsgAttributeType `json:"msg" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewError(code ErrorGetCodeArgType, msg ErrorGetMsgArgType) *Error { - this := Error{} - setErrorGetCodeAttributeType(&this.Code, code) - setErrorGetMsgAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewErrorWithDefaults() *Error { - this := Error{} - return &this -} - -// GetCode returns the Code field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Error) GetCode() (ret ErrorGetCodeRetType) { - ret, _ = o.GetCodeOk() - return ret -} - -// GetCodeOk returns a tuple with the Code field value -// 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 *Error) GetCodeOk() (ret ErrorGetCodeRetType, ok bool) { - return getErrorGetCodeAttributeTypeOk(o.Code) -} - -// SetCode sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Error) SetCode(v ErrorGetCodeRetType) { - setErrorGetCodeAttributeType(&o.Code, v) -} - -// GetMsg returns the Msg field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Error) GetMsg() (ret ErrorGetMsgRetType) { - ret, _ = o.GetMsgOk() - return ret -} - -// GetMsgOk returns a tuple with the Msg field value -// 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 *Error) GetMsgOk() (ret ErrorGetMsgRetType, ok bool) { - return getErrorGetMsgAttributeTypeOk(o.Msg) -} - -// SetMsg sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Error) SetMsg(v ErrorGetMsgRetType) { - setErrorGetMsgAttributeType(&o.Msg, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Error) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getErrorGetCodeAttributeTypeOk(o.Code); ok { - toSerialize["Code"] = val - } - if val, ok := getErrorGetMsgAttributeTypeOk(o.Msg); ok { - toSerialize["Msg"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableError struct { - value *Error - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableError) Get() *Error { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableError) Set(val *Error) { - 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 NullableError) 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 *NullableError) 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 NewNullableError(val *Error) *NullableError { - return &NullableError{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 NullableError) 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 *NullableError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_error_test.go b/services/iaas/model_error_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_error_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_get_server_log_200_response.go b/services/iaas/model_get_server_log_200_response.go deleted file mode 100644 index 2b4c88939c..0000000000 --- a/services/iaas/model_get_server_log_200_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the GetServerLog200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerLog200Response{} - -/* - types and functions for output -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetServerLog200ResponseGetOutputAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetServerLog200ResponseGetOutputAttributeTypeOk(arg GetServerLog200ResponseGetOutputAttributeType) (ret GetServerLog200ResponseGetOutputRetType, 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 setGetServerLog200ResponseGetOutputAttributeType(arg *GetServerLog200ResponseGetOutputAttributeType, val GetServerLog200ResponseGetOutputRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetServerLog200ResponseGetOutputArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetServerLog200ResponseGetOutputRetType = string - -// GetServerLog200Response struct for GetServerLog200Response -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetServerLog200Response struct { - Output GetServerLog200ResponseGetOutputAttributeType `json:"output,omitempty"` -} - -// NewGetServerLog200Response instantiates a new GetServerLog200Response 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetServerLog200Response() *GetServerLog200Response { - this := GetServerLog200Response{} - return &this -} - -// NewGetServerLog200ResponseWithDefaults instantiates a new GetServerLog200Response 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetServerLog200ResponseWithDefaults() *GetServerLog200Response { - this := GetServerLog200Response{} - return &this -} - -// GetOutput returns the Output 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 *GetServerLog200Response) GetOutput() (res GetServerLog200ResponseGetOutputRetType) { - res, _ = o.GetOutputOk() - return -} - -// GetOutputOk returns a tuple with the Output 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 *GetServerLog200Response) GetOutputOk() (ret GetServerLog200ResponseGetOutputRetType, ok bool) { - return getGetServerLog200ResponseGetOutputAttributeTypeOk(o.Output) -} - -// HasOutput 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 *GetServerLog200Response) HasOutput() bool { - _, ok := o.GetOutputOk() - return ok -} - -// SetOutput gets a reference to the given string and assigns it to the Output field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetServerLog200Response) SetOutput(v GetServerLog200ResponseGetOutputRetType) { - setGetServerLog200ResponseGetOutputAttributeType(&o.Output, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetServerLog200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetServerLog200ResponseGetOutputAttributeTypeOk(o.Output); ok { - toSerialize["Output"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetServerLog200Response struct { - value *GetServerLog200Response - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetServerLog200Response) Get() *GetServerLog200Response { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetServerLog200Response) Set(val *GetServerLog200Response) { - 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 NullableGetServerLog200Response) 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 *NullableGetServerLog200Response) 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 NewNullableGetServerLog200Response(val *GetServerLog200Response) *NullableGetServerLog200Response { - return &NullableGetServerLog200Response{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 NullableGetServerLog200Response) 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 *NullableGetServerLog200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_get_server_log_200_response_test.go b/services/iaas/model_get_server_log_200_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_get_server_log_200_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_icmp_parameters.go b/services/iaas/model_icmp_parameters.go deleted file mode 100644 index 7afe78b294..0000000000 --- a/services/iaas/model_icmp_parameters.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ICMPParameters type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ICMPParameters{} - -/* - types and functions for code -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ICMPParametersGetCodeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ICMPParametersGetCodeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ICMPParametersGetCodeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getICMPParametersGetCodeAttributeTypeOk(arg ICMPParametersGetCodeAttributeType) (ret ICMPParametersGetCodeRetType, 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 setICMPParametersGetCodeAttributeType(arg *ICMPParametersGetCodeAttributeType, val ICMPParametersGetCodeRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ICMPParametersGetTypeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ICMPParametersGetTypeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ICMPParametersGetTypeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getICMPParametersGetTypeAttributeTypeOk(arg ICMPParametersGetTypeAttributeType) (ret ICMPParametersGetTypeRetType, 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 setICMPParametersGetTypeAttributeType(arg *ICMPParametersGetTypeAttributeType, val ICMPParametersGetTypeRetType) { - *arg = &val -} - -// ICMPParameters Object that represents ICMP parameters. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ICMPParameters struct { - // ICMP code. Can be set if the protocol is ICMP. - // REQUIRED - Code ICMPParametersGetCodeAttributeType `json:"code" required:"true"` - // ICMP type. Can be set if the protocol is ICMP. - // REQUIRED - Type ICMPParametersGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ICMPParameters ICMPParameters - -// NewICMPParameters instantiates a new ICMPParameters 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewICMPParameters(code ICMPParametersGetCodeArgType, types ICMPParametersGetTypeArgType) *ICMPParameters { - this := ICMPParameters{} - setICMPParametersGetCodeAttributeType(&this.Code, code) - setICMPParametersGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewICMPParametersWithDefaults instantiates a new ICMPParameters 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewICMPParametersWithDefaults() *ICMPParameters { - this := ICMPParameters{} - return &this -} - -// GetCode returns the Code field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ICMPParameters) GetCode() (ret ICMPParametersGetCodeRetType) { - ret, _ = o.GetCodeOk() - return ret -} - -// GetCodeOk returns a tuple with the Code field value -// 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 *ICMPParameters) GetCodeOk() (ret ICMPParametersGetCodeRetType, ok bool) { - return getICMPParametersGetCodeAttributeTypeOk(o.Code) -} - -// SetCode sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ICMPParameters) SetCode(v ICMPParametersGetCodeRetType) { - setICMPParametersGetCodeAttributeType(&o.Code, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ICMPParameters) GetType() (ret ICMPParametersGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *ICMPParameters) GetTypeOk() (ret ICMPParametersGetTypeRetType, ok bool) { - return getICMPParametersGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ICMPParameters) SetType(v ICMPParametersGetTypeRetType) { - setICMPParametersGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ICMPParameters) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getICMPParametersGetCodeAttributeTypeOk(o.Code); ok { - toSerialize["Code"] = val - } - if val, ok := getICMPParametersGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableICMPParameters struct { - value *ICMPParameters - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableICMPParameters) Get() *ICMPParameters { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableICMPParameters) Set(val *ICMPParameters) { - 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 NullableICMPParameters) 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 *NullableICMPParameters) 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 NewNullableICMPParameters(val *ICMPParameters) *NullableICMPParameters { - return &NullableICMPParameters{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 NullableICMPParameters) 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 *NullableICMPParameters) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_icmp_parameters_test.go b/services/iaas/model_icmp_parameters_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_icmp_parameters_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image.go b/services/iaas/model_image.go deleted file mode 100644 index 15523aa72a..0000000000 --- a/services/iaas/model_image.go +++ /dev/null @@ -1,1087 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Image type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Image{} - -/* - types and functions for agent -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetAgentAttributeType = *ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetAgentArgType = ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetAgentRetType = ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetAgentAttributeTypeOk(arg ImageGetAgentAttributeType) (ret ImageGetAgentRetType, 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 setImageGetAgentAttributeType(arg *ImageGetAgentAttributeType, val ImageGetAgentRetType) { - *arg = &val -} - -/* - types and functions for checksum -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetChecksumAttributeType = *ImageChecksum - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetChecksumArgType = ImageChecksum - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetChecksumRetType = ImageChecksum - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetChecksumAttributeTypeOk(arg ImageGetChecksumAttributeType) (ret ImageGetChecksumRetType, 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 setImageGetChecksumAttributeType(arg *ImageGetChecksumAttributeType, val ImageGetChecksumRetType) { - *arg = &val -} - -/* - types and functions for config -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetConfigAttributeType = *ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetConfigArgType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetConfigRetType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetConfigAttributeTypeOk(arg ImageGetConfigAttributeType) (ret ImageGetConfigRetType, 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 setImageGetConfigAttributeType(arg *ImageGetConfigAttributeType, val ImageGetConfigRetType) { - *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 ImageGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetCreatedAtAttributeTypeOk(arg ImageGetCreatedAtAttributeType) (ret ImageGetCreatedAtRetType, 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 setImageGetCreatedAtAttributeType(arg *ImageGetCreatedAtAttributeType, val ImageGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for diskFormat -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetDiskFormatAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetDiskFormatAttributeTypeOk(arg ImageGetDiskFormatAttributeType) (ret ImageGetDiskFormatRetType, 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 setImageGetDiskFormatAttributeType(arg *ImageGetDiskFormatAttributeType, val ImageGetDiskFormatRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetDiskFormatArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetDiskFormatRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetIdAttributeTypeOk(arg ImageGetIdAttributeType) (ret ImageGetIdRetType, 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 setImageGetIdAttributeType(arg *ImageGetIdAttributeType, val ImageGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetIdRetType = string - -/* - types and functions for importProgress -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetImportProgressAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetImportProgressArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetImportProgressRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetImportProgressAttributeTypeOk(arg ImageGetImportProgressAttributeType) (ret ImageGetImportProgressRetType, 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 setImageGetImportProgressAttributeType(arg *ImageGetImportProgressAttributeType, val ImageGetImportProgressRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetLabelsAttributeTypeOk(arg ImageGetLabelsAttributeType) (ret ImageGetLabelsRetType, 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 setImageGetLabelsAttributeType(arg *ImageGetLabelsAttributeType, val ImageGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for minDiskSize -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetMinDiskSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetMinDiskSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetMinDiskSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetMinDiskSizeAttributeTypeOk(arg ImageGetMinDiskSizeAttributeType) (ret ImageGetMinDiskSizeRetType, 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 setImageGetMinDiskSizeAttributeType(arg *ImageGetMinDiskSizeAttributeType, val ImageGetMinDiskSizeRetType) { - *arg = &val -} - -/* - types and functions for minRam -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetMinRamAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetMinRamArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetMinRamRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetMinRamAttributeTypeOk(arg ImageGetMinRamAttributeType) (ret ImageGetMinRamRetType, 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 setImageGetMinRamAttributeType(arg *ImageGetMinRamAttributeType, val ImageGetMinRamRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetNameAttributeTypeOk(arg ImageGetNameAttributeType) (ret ImageGetNameRetType, 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 setImageGetNameAttributeType(arg *ImageGetNameAttributeType, val ImageGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetNameRetType = string - -/* - types and functions for owner -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetOwnerAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetOwnerAttributeTypeOk(arg ImageGetOwnerAttributeType) (ret ImageGetOwnerRetType, 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 setImageGetOwnerAttributeType(arg *ImageGetOwnerAttributeType, val ImageGetOwnerRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetOwnerArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetOwnerRetType = string - -/* - types and functions for protected -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImagegetProtectedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImagegetProtectedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImagegetProtectedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImagegetProtectedAttributeTypeOk(arg ImagegetProtectedAttributeType) (ret ImagegetProtectedRetType, 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 setImagegetProtectedAttributeType(arg *ImagegetProtectedAttributeType, val ImagegetProtectedRetType) { - *arg = &val -} - -/* - types and functions for scope -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetScopeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetScopeAttributeTypeOk(arg ImageGetScopeAttributeType) (ret ImageGetScopeRetType, 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 setImageGetScopeAttributeType(arg *ImageGetScopeAttributeType, val ImageGetScopeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetScopeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetScopeRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetSizeAttributeTypeOk(arg ImageGetSizeAttributeType) (ret ImageGetSizeRetType, 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 setImageGetSizeAttributeType(arg *ImageGetSizeAttributeType, val ImageGetSizeRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetStatusAttributeTypeOk(arg ImageGetStatusAttributeType) (ret ImageGetStatusRetType, 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 setImageGetStatusAttributeType(arg *ImageGetStatusAttributeType, val ImageGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetStatusRetType = 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 ImageGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageGetUpdatedAtAttributeTypeOk(arg ImageGetUpdatedAtAttributeType) (ret ImageGetUpdatedAtRetType, 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 setImageGetUpdatedAtAttributeType(arg *ImageGetUpdatedAtAttributeType, val ImageGetUpdatedAtRetType) { - *arg = &val -} - -// Image Object that represents an Image and its parameters. Used for Creating and returning (get/list). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Image struct { - Agent ImageGetAgentAttributeType `json:"agent,omitempty"` - Checksum ImageGetChecksumAttributeType `json:"checksum,omitempty"` - Config ImageGetConfigAttributeType `json:"config,omitempty"` - // Date-time when resource was created. - CreatedAt ImageGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. - // REQUIRED - DiskFormat ImageGetDiskFormatAttributeType `json:"diskFormat" required:"true"` - // Universally Unique Identifier (UUID). - 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. - Labels ImageGetLabelsAttributeType `json:"labels,omitempty"` - // Size in Gigabyte. - MinDiskSize ImageGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"` - // Size in Megabyte. - MinRam ImageGetMinRamAttributeType `json:"minRam,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name ImageGetNameAttributeType `json:"name" required:"true"` - // Universally Unique Identifier (UUID). - Owner ImageGetOwnerAttributeType `json:"owner,omitempty"` - // When true the image is prevented from being deleted. - Protected ImagegetProtectedAttributeType `json:"protected,omitempty"` - // Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`. - Scope ImageGetScopeAttributeType `json:"scope,omitempty"` - // Size in bytes. - Size ImageGetSizeAttributeType `json:"size,omitempty"` - // The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`. - Status ImageGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt ImageGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Image Image - -// NewImage instantiates a new Image 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImage(diskFormat ImageGetDiskFormatArgType, name ImageGetNameArgType) *Image { - this := Image{} - setImageGetDiskFormatAttributeType(&this.DiskFormat, diskFormat) - setImageGetNameAttributeType(&this.Name, name) - return &this -} - -// NewImageWithDefaults instantiates a new Image 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageWithDefaults() *Image { - this := Image{} - return &this -} - -// GetAgent returns the Agent 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 *Image) GetAgent() (res ImageGetAgentRetType) { - res, _ = o.GetAgentOk() - return -} - -// GetAgentOk returns a tuple with the Agent 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 *Image) GetAgentOk() (ret ImageGetAgentRetType, ok bool) { - return getImageGetAgentAttributeTypeOk(o.Agent) -} - -// HasAgent 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 *Image) HasAgent() bool { - _, ok := o.GetAgentOk() - return ok -} - -// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetAgent(v ImageGetAgentRetType) { - setImageGetAgentAttributeType(&o.Agent, v) -} - -// GetChecksum returns the Checksum 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 *Image) GetChecksum() (res ImageGetChecksumRetType) { - res, _ = o.GetChecksumOk() - return -} - -// GetChecksumOk returns a tuple with the Checksum 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 *Image) GetChecksumOk() (ret ImageGetChecksumRetType, ok bool) { - return getImageGetChecksumAttributeTypeOk(o.Checksum) -} - -// HasChecksum 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 *Image) HasChecksum() bool { - _, ok := o.GetChecksumOk() - return ok -} - -// SetChecksum gets a reference to the given ImageChecksum and assigns it to the Checksum field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetChecksum(v ImageGetChecksumRetType) { - setImageGetChecksumAttributeType(&o.Checksum, v) -} - -// GetConfig returns the Config 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 *Image) GetConfig() (res ImageGetConfigRetType) { - res, _ = o.GetConfigOk() - return -} - -// GetConfigOk returns a tuple with the Config 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 *Image) GetConfigOk() (ret ImageGetConfigRetType, ok bool) { - return getImageGetConfigAttributeTypeOk(o.Config) -} - -// HasConfig 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 *Image) HasConfig() bool { - _, ok := o.GetConfigOk() - return ok -} - -// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetConfig(v ImageGetConfigRetType) { - setImageGetConfigAttributeType(&o.Config, 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 *Image) GetCreatedAt() (res ImageGetCreatedAtRetType) { - 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 *Image) GetCreatedAtOk() (ret ImageGetCreatedAtRetType, ok bool) { - return getImageGetCreatedAtAttributeTypeOk(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 *Image) 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 *Image) SetCreatedAt(v ImageGetCreatedAtRetType) { - setImageGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetDiskFormat returns the DiskFormat field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) GetDiskFormat() (ret ImageGetDiskFormatRetType) { - ret, _ = o.GetDiskFormatOk() - return ret -} - -// GetDiskFormatOk returns a tuple with the DiskFormat field value -// 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 *Image) GetDiskFormatOk() (ret ImageGetDiskFormatRetType, ok bool) { - return getImageGetDiskFormatAttributeTypeOk(o.DiskFormat) -} - -// SetDiskFormat sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetDiskFormat(v ImageGetDiskFormatRetType) { - setImageGetDiskFormatAttributeType(&o.DiskFormat, 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 *Image) GetId() (res ImageGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *Image) GetIdOk() (ret ImageGetIdRetType, ok bool) { - return getImageGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Image) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetId(v ImageGetIdRetType) { - setImageGetIdAttributeType(&o.Id, v) -} - -// GetImportProgress returns the ImportProgress 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 *Image) GetImportProgress() (res ImageGetImportProgressRetType) { - res, _ = o.GetImportProgressOk() - return -} - -// GetImportProgressOk returns a tuple with the ImportProgress 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 *Image) GetImportProgressOk() (ret ImageGetImportProgressRetType, ok bool) { - return getImageGetImportProgressAttributeTypeOk(o.ImportProgress) -} - -// HasImportProgress 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 *Image) HasImportProgress() bool { - _, ok := o.GetImportProgressOk() - return ok -} - -// SetImportProgress gets a reference to the given int64 and assigns it to the ImportProgress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetImportProgress(v ImageGetImportProgressRetType) { - setImageGetImportProgressAttributeType(&o.ImportProgress, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) GetLabels() (res ImageGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) GetLabelsOk() (ret ImageGetLabelsRetType, ok bool) { - return getImageGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetLabels(v ImageGetLabelsRetType) { - setImageGetLabelsAttributeType(&o.Labels, v) -} - -// GetMinDiskSize returns the MinDiskSize 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 *Image) GetMinDiskSize() (res ImageGetMinDiskSizeRetType) { - res, _ = o.GetMinDiskSizeOk() - return -} - -// GetMinDiskSizeOk returns a tuple with the MinDiskSize 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 *Image) GetMinDiskSizeOk() (ret ImageGetMinDiskSizeRetType, ok bool) { - return getImageGetMinDiskSizeAttributeTypeOk(o.MinDiskSize) -} - -// HasMinDiskSize 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 *Image) HasMinDiskSize() bool { - _, ok := o.GetMinDiskSizeOk() - return ok -} - -// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetMinDiskSize(v ImageGetMinDiskSizeRetType) { - setImageGetMinDiskSizeAttributeType(&o.MinDiskSize, v) -} - -// GetMinRam returns the MinRam 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 *Image) GetMinRam() (res ImageGetMinRamRetType) { - res, _ = o.GetMinRamOk() - return -} - -// GetMinRamOk returns a tuple with the MinRam 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 *Image) GetMinRamOk() (ret ImageGetMinRamRetType, ok bool) { - return getImageGetMinRamAttributeTypeOk(o.MinRam) -} - -// HasMinRam 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 *Image) HasMinRam() bool { - _, ok := o.GetMinRamOk() - return ok -} - -// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetMinRam(v ImageGetMinRamRetType) { - setImageGetMinRamAttributeType(&o.MinRam, 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 *Image) GetName() (ret ImageGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *Image) GetNameOk() (ret ImageGetNameRetType, ok bool) { - return getImageGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetName(v ImageGetNameRetType) { - setImageGetNameAttributeType(&o.Name, v) -} - -// GetOwner returns the Owner 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 *Image) GetOwner() (res ImageGetOwnerRetType) { - res, _ = o.GetOwnerOk() - return -} - -// GetOwnerOk returns a tuple with the Owner 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 *Image) GetOwnerOk() (ret ImageGetOwnerRetType, ok bool) { - return getImageGetOwnerAttributeTypeOk(o.Owner) -} - -// HasOwner 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 *Image) HasOwner() bool { - _, ok := o.GetOwnerOk() - return ok -} - -// SetOwner gets a reference to the given string and assigns it to the Owner field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetOwner(v ImageGetOwnerRetType) { - setImageGetOwnerAttributeType(&o.Owner, v) -} - -// GetProtected returns the Protected 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 *Image) GetProtected() (res ImagegetProtectedRetType) { - res, _ = o.GetProtectedOk() - return -} - -// GetProtectedOk returns a tuple with the Protected 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 *Image) GetProtectedOk() (ret ImagegetProtectedRetType, ok bool) { - return getImagegetProtectedAttributeTypeOk(o.Protected) -} - -// HasProtected 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 *Image) HasProtected() bool { - _, ok := o.GetProtectedOk() - return ok -} - -// SetProtected gets a reference to the given bool and assigns it to the Protected field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetProtected(v ImagegetProtectedRetType) { - setImagegetProtectedAttributeType(&o.Protected, v) -} - -// GetScope returns the Scope 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 *Image) GetScope() (res ImageGetScopeRetType) { - res, _ = o.GetScopeOk() - return -} - -// GetScopeOk returns a tuple with the Scope 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 *Image) GetScopeOk() (ret ImageGetScopeRetType, ok bool) { - return getImageGetScopeAttributeTypeOk(o.Scope) -} - -// HasScope 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 *Image) HasScope() bool { - _, ok := o.GetScopeOk() - return ok -} - -// SetScope gets a reference to the given string and assigns it to the Scope field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetScope(v ImageGetScopeRetType) { - setImageGetScopeAttributeType(&o.Scope, v) -} - -// GetSize returns the Size 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 *Image) GetSize() (res ImageGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *Image) GetSizeOk() (ret ImageGetSizeRetType, ok bool) { - return getImageGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *Image) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetSize(v ImageGetSizeRetType) { - setImageGetSizeAttributeType(&o.Size, v) -} - -// GetStatus returns the Status 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 *Image) GetStatus() (res ImageGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *Image) GetStatusOk() (ret ImageGetStatusRetType, ok bool) { - return getImageGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *Image) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Image) SetStatus(v ImageGetStatusRetType) { - setImageGetStatusAttributeType(&o.Status, 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 *Image) GetUpdatedAt() (res ImageGetUpdatedAtRetType) { - 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 *Image) GetUpdatedAtOk() (ret ImageGetUpdatedAtRetType, ok bool) { - return getImageGetUpdatedAtAttributeTypeOk(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 *Image) 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 *Image) SetUpdatedAt(v ImageGetUpdatedAtRetType) { - setImageGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Image) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageGetAgentAttributeTypeOk(o.Agent); ok { - toSerialize["Agent"] = val - } - if val, ok := getImageGetChecksumAttributeTypeOk(o.Checksum); ok { - toSerialize["Checksum"] = val - } - if val, ok := getImageGetConfigAttributeTypeOk(o.Config); ok { - toSerialize["Config"] = val - } - if val, ok := getImageGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getImageGetDiskFormatAttributeTypeOk(o.DiskFormat); ok { - toSerialize["DiskFormat"] = val - } - if val, ok := getImageGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getImageGetImportProgressAttributeTypeOk(o.ImportProgress); ok { - toSerialize["ImportProgress"] = val - } - if val, ok := getImageGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getImageGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok { - toSerialize["MinDiskSize"] = val - } - if val, ok := getImageGetMinRamAttributeTypeOk(o.MinRam); ok { - toSerialize["MinRam"] = val - } - if val, ok := getImageGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getImageGetOwnerAttributeTypeOk(o.Owner); ok { - toSerialize["Owner"] = val - } - if val, ok := getImagegetProtectedAttributeTypeOk(o.Protected); ok { - toSerialize["Protected"] = val - } - if val, ok := getImageGetScopeAttributeTypeOk(o.Scope); ok { - toSerialize["Scope"] = val - } - if val, ok := getImageGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getImageGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getImageGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImage struct { - value *Image - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImage) Get() *Image { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImage) Set(val *Image) { - 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 NullableImage) 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 *NullableImage) 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 NewNullableImage(val *Image) *NullableImage { - return &NullableImage{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 NullableImage) 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 *NullableImage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_agent.go b/services/iaas/model_image_agent.go deleted file mode 100644 index 11de05b969..0000000000 --- a/services/iaas/model_image_agent.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ImageAgent type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ImageAgent{} - -/* - types and functions for provisionByDefault -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageAgentgetProvisionByDefaultAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageAgentgetProvisionByDefaultArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageAgentgetProvisionByDefaultRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageAgentgetProvisionByDefaultAttributeTypeOk(arg ImageAgentgetProvisionByDefaultAttributeType) (ret ImageAgentgetProvisionByDefaultRetType, 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 setImageAgentgetProvisionByDefaultAttributeType(arg *ImageAgentgetProvisionByDefaultAttributeType, val ImageAgentgetProvisionByDefaultRetType) { - *arg = &val -} - -/* - types and functions for supported -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageAgentgetSupportedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageAgentgetSupportedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageAgentgetSupportedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageAgentgetSupportedAttributeTypeOk(arg ImageAgentgetSupportedAttributeType) (ret ImageAgentgetSupportedRetType, 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 setImageAgentgetSupportedAttributeType(arg *ImageAgentgetSupportedAttributeType, val ImageAgentgetSupportedRetType) { - *arg = &val -} - -// ImageAgent Support status and default provioning setting for the STACKIT server agent. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageAgent struct { - // Default provioning of the STACKIT server agent for new servers. The default for new images is false. Can only be enabled when supported is also true. - ProvisionByDefault ImageAgentgetProvisionByDefaultAttributeType `json:"provisionByDefault,omitempty"` - // Indicates the STACKIT server agent for the image. The default for new images is false. - Supported ImageAgentgetSupportedAttributeType `json:"supported,omitempty"` -} - -// NewImageAgent instantiates a new ImageAgent 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageAgent() *ImageAgent { - this := ImageAgent{} - return &this -} - -// NewImageAgentWithDefaults instantiates a new ImageAgent 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageAgentWithDefaults() *ImageAgent { - this := ImageAgent{} - return &this -} - -// GetProvisionByDefault returns the ProvisionByDefault 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 *ImageAgent) GetProvisionByDefault() (res ImageAgentgetProvisionByDefaultRetType) { - res, _ = o.GetProvisionByDefaultOk() - return -} - -// GetProvisionByDefaultOk returns a tuple with the ProvisionByDefault 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 *ImageAgent) GetProvisionByDefaultOk() (ret ImageAgentgetProvisionByDefaultRetType, ok bool) { - return getImageAgentgetProvisionByDefaultAttributeTypeOk(o.ProvisionByDefault) -} - -// HasProvisionByDefault 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 *ImageAgent) HasProvisionByDefault() bool { - _, ok := o.GetProvisionByDefaultOk() - return ok -} - -// SetProvisionByDefault gets a reference to the given bool and assigns it to the ProvisionByDefault field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageAgent) SetProvisionByDefault(v ImageAgentgetProvisionByDefaultRetType) { - setImageAgentgetProvisionByDefaultAttributeType(&o.ProvisionByDefault, v) -} - -// GetSupported returns the Supported 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 *ImageAgent) GetSupported() (res ImageAgentgetSupportedRetType) { - res, _ = o.GetSupportedOk() - return -} - -// GetSupportedOk returns a tuple with the Supported 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 *ImageAgent) GetSupportedOk() (ret ImageAgentgetSupportedRetType, ok bool) { - return getImageAgentgetSupportedAttributeTypeOk(o.Supported) -} - -// HasSupported 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 *ImageAgent) HasSupported() bool { - _, ok := o.GetSupportedOk() - return ok -} - -// SetSupported gets a reference to the given bool and assigns it to the Supported field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageAgent) SetSupported(v ImageAgentgetSupportedRetType) { - setImageAgentgetSupportedAttributeType(&o.Supported, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ImageAgent) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageAgentgetProvisionByDefaultAttributeTypeOk(o.ProvisionByDefault); ok { - toSerialize["ProvisionByDefault"] = val - } - if val, ok := getImageAgentgetSupportedAttributeTypeOk(o.Supported); ok { - toSerialize["Supported"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImageAgent struct { - value *ImageAgent - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImageAgent) Get() *ImageAgent { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImageAgent) Set(val *ImageAgent) { - 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 NullableImageAgent) 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 *NullableImageAgent) 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 NewNullableImageAgent(val *ImageAgent) *NullableImageAgent { - return &NullableImageAgent{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 NullableImageAgent) 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 *NullableImageAgent) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_agent_test.go b/services/iaas/model_image_agent_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_agent_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image_checksum.go b/services/iaas/model_image_checksum.go deleted file mode 100644 index f1a3320501..0000000000 --- a/services/iaas/model_image_checksum.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ImageChecksum type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ImageChecksum{} - -/* - types and functions for algorithm -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageChecksumGetAlgorithmAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageChecksumGetAlgorithmAttributeTypeOk(arg ImageChecksumGetAlgorithmAttributeType) (ret ImageChecksumGetAlgorithmRetType, 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 setImageChecksumGetAlgorithmAttributeType(arg *ImageChecksumGetAlgorithmAttributeType, val ImageChecksumGetAlgorithmRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageChecksumGetAlgorithmArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageChecksumGetAlgorithmRetType = string - -/* - types and functions for digest -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageChecksumGetDigestAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageChecksumGetDigestAttributeTypeOk(arg ImageChecksumGetDigestAttributeType) (ret ImageChecksumGetDigestRetType, 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 setImageChecksumGetDigestAttributeType(arg *ImageChecksumGetDigestAttributeType, val ImageChecksumGetDigestRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageChecksumGetDigestArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageChecksumGetDigestRetType = string - -// ImageChecksum Representation of an image checksum. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageChecksum struct { - // Algorithm for the checksum of the image data. Possible values: `md5`, `sha512`. - // REQUIRED - Algorithm ImageChecksumGetAlgorithmAttributeType `json:"algorithm" required:"true"` - // Hexdigest of the checksum of the image data. - // REQUIRED - Digest ImageChecksumGetDigestAttributeType `json:"digest" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ImageChecksum ImageChecksum - -// NewImageChecksum instantiates a new ImageChecksum 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageChecksum(algorithm ImageChecksumGetAlgorithmArgType, digest ImageChecksumGetDigestArgType) *ImageChecksum { - this := ImageChecksum{} - setImageChecksumGetAlgorithmAttributeType(&this.Algorithm, algorithm) - setImageChecksumGetDigestAttributeType(&this.Digest, digest) - return &this -} - -// NewImageChecksumWithDefaults instantiates a new ImageChecksum 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageChecksumWithDefaults() *ImageChecksum { - this := ImageChecksum{} - return &this -} - -// GetAlgorithm returns the Algorithm field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageChecksum) GetAlgorithm() (ret ImageChecksumGetAlgorithmRetType) { - ret, _ = o.GetAlgorithmOk() - return ret -} - -// GetAlgorithmOk returns a tuple with the Algorithm field value -// 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 *ImageChecksum) GetAlgorithmOk() (ret ImageChecksumGetAlgorithmRetType, ok bool) { - return getImageChecksumGetAlgorithmAttributeTypeOk(o.Algorithm) -} - -// SetAlgorithm sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageChecksum) SetAlgorithm(v ImageChecksumGetAlgorithmRetType) { - setImageChecksumGetAlgorithmAttributeType(&o.Algorithm, v) -} - -// GetDigest returns the Digest field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageChecksum) GetDigest() (ret ImageChecksumGetDigestRetType) { - ret, _ = o.GetDigestOk() - return ret -} - -// GetDigestOk returns a tuple with the Digest field value -// 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 *ImageChecksum) GetDigestOk() (ret ImageChecksumGetDigestRetType, ok bool) { - return getImageChecksumGetDigestAttributeTypeOk(o.Digest) -} - -// SetDigest sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageChecksum) SetDigest(v ImageChecksumGetDigestRetType) { - setImageChecksumGetDigestAttributeType(&o.Digest, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ImageChecksum) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageChecksumGetAlgorithmAttributeTypeOk(o.Algorithm); ok { - toSerialize["Algorithm"] = val - } - if val, ok := getImageChecksumGetDigestAttributeTypeOk(o.Digest); ok { - toSerialize["Digest"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImageChecksum struct { - value *ImageChecksum - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImageChecksum) Get() *ImageChecksum { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImageChecksum) Set(val *ImageChecksum) { - 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 NullableImageChecksum) 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 *NullableImageChecksum) 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 NewNullableImageChecksum(val *ImageChecksum) *NullableImageChecksum { - return &NullableImageChecksum{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 NullableImageChecksum) 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 *NullableImageChecksum) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_checksum_test.go b/services/iaas/model_image_checksum_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_checksum_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image_config.go b/services/iaas/model_image_config.go deleted file mode 100644 index d82689b6ab..0000000000 --- a/services/iaas/model_image_config.go +++ /dev/null @@ -1,1055 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ImageConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ImageConfig{} - -/* - types and functions for architecture -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetArchitectureAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetArchitectureAttributeTypeOk(arg ImageConfigGetArchitectureAttributeType) (ret ImageConfigGetArchitectureRetType, 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 setImageConfigGetArchitectureAttributeType(arg *ImageConfigGetArchitectureAttributeType, val ImageConfigGetArchitectureRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetArchitectureArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetArchitectureRetType = string - -/* - types and functions for bootMenu -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetBootMenuAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetBootMenuArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetBootMenuRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfiggetBootMenuAttributeTypeOk(arg ImageConfiggetBootMenuAttributeType) (ret ImageConfiggetBootMenuRetType, 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 setImageConfiggetBootMenuAttributeType(arg *ImageConfiggetBootMenuAttributeType, val ImageConfiggetBootMenuRetType) { - *arg = &val -} - -/* - types and functions for cdromBus -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetCdromBusAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetCdromBusAttributeTypeOk(arg ImageConfigGetCdromBusAttributeType) (ret ImageConfigGetCdromBusRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setImageConfigGetCdromBusAttributeType(arg *ImageConfigGetCdromBusAttributeType, val ImageConfigGetCdromBusRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetCdromBusArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetCdromBusRetType = *string - -/* - types and functions for diskBus -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetDiskBusAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetDiskBusAttributeTypeOk(arg ImageConfigGetDiskBusAttributeType) (ret ImageConfigGetDiskBusRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setImageConfigGetDiskBusAttributeType(arg *ImageConfigGetDiskBusAttributeType, val ImageConfigGetDiskBusRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetDiskBusArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetDiskBusRetType = *string - -/* - types and functions for nicModel -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetNicModelAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetNicModelAttributeTypeOk(arg ImageConfigGetNicModelAttributeType) (ret ImageConfigGetNicModelRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setImageConfigGetNicModelAttributeType(arg *ImageConfigGetNicModelAttributeType, val ImageConfigGetNicModelRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetNicModelArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetNicModelRetType = *string - -/* - types and functions for operatingSystem -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetOperatingSystemAttributeTypeOk(arg ImageConfigGetOperatingSystemAttributeType) (ret ImageConfigGetOperatingSystemRetType, 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 setImageConfigGetOperatingSystemAttributeType(arg *ImageConfigGetOperatingSystemAttributeType, val ImageConfigGetOperatingSystemRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemRetType = string - -/* - types and functions for operatingSystemDistro -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemDistroAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetOperatingSystemDistroAttributeTypeOk(arg ImageConfigGetOperatingSystemDistroAttributeType) (ret ImageConfigGetOperatingSystemDistroRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setImageConfigGetOperatingSystemDistroAttributeType(arg *ImageConfigGetOperatingSystemDistroAttributeType, val ImageConfigGetOperatingSystemDistroRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemDistroArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemDistroRetType = *string - -/* - types and functions for operatingSystemVersion -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemVersionAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetOperatingSystemVersionAttributeTypeOk(arg ImageConfigGetOperatingSystemVersionAttributeType) (ret ImageConfigGetOperatingSystemVersionRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setImageConfigGetOperatingSystemVersionAttributeType(arg *ImageConfigGetOperatingSystemVersionAttributeType, val ImageConfigGetOperatingSystemVersionRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemVersionArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetOperatingSystemVersionRetType = *string - -/* - types and functions for rescueBus -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetRescueBusAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetRescueBusAttributeTypeOk(arg ImageConfigGetRescueBusAttributeType) (ret ImageConfigGetRescueBusRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setImageConfigGetRescueBusAttributeType(arg *ImageConfigGetRescueBusAttributeType, val ImageConfigGetRescueBusRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetRescueBusArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetRescueBusRetType = *string - -/* - types and functions for rescueDevice -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetRescueDeviceAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetRescueDeviceAttributeTypeOk(arg ImageConfigGetRescueDeviceAttributeType) (ret ImageConfigGetRescueDeviceRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setImageConfigGetRescueDeviceAttributeType(arg *ImageConfigGetRescueDeviceAttributeType, val ImageConfigGetRescueDeviceRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetRescueDeviceArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetRescueDeviceRetType = *string - -/* - types and functions for secureBoot -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetSecureBootAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetSecureBootArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetSecureBootRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfiggetSecureBootAttributeTypeOk(arg ImageConfiggetSecureBootAttributeType) (ret ImageConfiggetSecureBootRetType, 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 setImageConfiggetSecureBootAttributeType(arg *ImageConfiggetSecureBootAttributeType, val ImageConfiggetSecureBootRetType) { - *arg = &val -} - -/* - types and functions for uefi -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetUefiAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetUefiArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetUefiRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfiggetUefiAttributeTypeOk(arg ImageConfiggetUefiAttributeType) (ret ImageConfiggetUefiRetType, 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 setImageConfiggetUefiAttributeType(arg *ImageConfiggetUefiAttributeType, val ImageConfiggetUefiRetType) { - *arg = &val -} - -/* - types and functions for videoModel -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetVideoModelAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfigGetVideoModelAttributeTypeOk(arg ImageConfigGetVideoModelAttributeType) (ret ImageConfigGetVideoModelRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setImageConfigGetVideoModelAttributeType(arg *ImageConfigGetVideoModelAttributeType, val ImageConfigGetVideoModelRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetVideoModelArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfigGetVideoModelRetType = *string - -/* - types and functions for virtioScsi -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetVirtioScsiAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetVirtioScsiArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfiggetVirtioScsiRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageConfiggetVirtioScsiAttributeTypeOk(arg ImageConfiggetVirtioScsiAttributeType) (ret ImageConfiggetVirtioScsiRetType, 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 setImageConfiggetVirtioScsiAttributeType(arg *ImageConfiggetVirtioScsiAttributeType, val ImageConfiggetVirtioScsiRetType) { - *arg = &val -} - -// ImageConfig Properties to set hardware and scheduling settings for an Image. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageConfig struct { - // Represents CPU architecture. The default for new images is x86. Possible values: `arm64`, `x86`. - Architecture ImageConfigGetArchitectureAttributeType `json:"architecture,omitempty"` - // Enables the BIOS bootmenu. The default for new images is disabled. - BootMenu ImageConfiggetBootMenuAttributeType `json:"bootMenu,omitempty"` - // Sets CDROM bus controller type. Possible values: `scsi`, `virtio`, `ide`, `usb`. - CdromBus ImageConfigGetCdromBusAttributeType `json:"cdromBus,omitempty"` - // Sets Disk bus controller type. Possible values: `scsi`, `virtio`, `ide`, `usb`. - DiskBus ImageConfigGetDiskBusAttributeType `json:"diskBus,omitempty"` - // Sets virtual nic model. Possible values: `e1000`, `e1000e`, `ne2k_pci`, `pcnet`, `rtl8139`, `virtio`, `vmxnet3`. - NicModel ImageConfigGetNicModelAttributeType `json:"nicModel,omitempty"` - // Enables OS specific optimizations. Possible values: `windows`, `linux`. - OperatingSystem ImageConfigGetOperatingSystemAttributeType `json:"operatingSystem,omitempty"` - // Operating System Distribution. - OperatingSystemDistro ImageConfigGetOperatingSystemDistroAttributeType `json:"operatingSystemDistro,omitempty"` - // Version of the OS. - OperatingSystemVersion ImageConfigGetOperatingSystemVersionAttributeType `json:"operatingSystemVersion,omitempty"` - // Sets the device bus when the image is used as a rescue image. Possible values: `sata`, `scsi`, `virtio`, `usb`. - RescueBus ImageConfigGetRescueBusAttributeType `json:"rescueBus,omitempty"` - // Sets the device when the image is used as a rescue image. Possible values: `cdrom`, `disk`. - RescueDevice ImageConfigGetRescueDeviceAttributeType `json:"rescueDevice,omitempty"` - // Enables Secure Boot. The default for new images is disabled. - SecureBoot ImageConfiggetSecureBootAttributeType `json:"secureBoot,omitempty"` - // Configure UEFI boot. The default for new images is enabled. - Uefi ImageConfiggetUefiAttributeType `json:"uefi,omitempty"` - // Sets Graphic device model. Possible values: `vga`, `cirrus`, `vmvga`, `qxl`, `virtio`, `none`. - VideoModel ImageConfigGetVideoModelAttributeType `json:"videoModel,omitempty"` - // Enables the use of VirtIO SCSI to provide block device access. By default servers use VirtIO Block. - VirtioScsi ImageConfiggetVirtioScsiAttributeType `json:"virtioScsi,omitempty"` -} - -// NewImageConfig instantiates a new ImageConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageConfig() *ImageConfig { - this := ImageConfig{} - return &this -} - -// NewImageConfigWithDefaults instantiates a new ImageConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageConfigWithDefaults() *ImageConfig { - this := ImageConfig{} - return &this -} - -// GetArchitecture returns the Architecture 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 *ImageConfig) GetArchitecture() (res ImageConfigGetArchitectureRetType) { - res, _ = o.GetArchitectureOk() - return -} - -// GetArchitectureOk returns a tuple with the Architecture 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 *ImageConfig) GetArchitectureOk() (ret ImageConfigGetArchitectureRetType, ok bool) { - return getImageConfigGetArchitectureAttributeTypeOk(o.Architecture) -} - -// HasArchitecture 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 *ImageConfig) HasArchitecture() bool { - _, ok := o.GetArchitectureOk() - return ok -} - -// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetArchitecture(v ImageConfigGetArchitectureRetType) { - setImageConfigGetArchitectureAttributeType(&o.Architecture, v) -} - -// GetBootMenu returns the BootMenu 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 *ImageConfig) GetBootMenu() (res ImageConfiggetBootMenuRetType) { - res, _ = o.GetBootMenuOk() - return -} - -// GetBootMenuOk returns a tuple with the BootMenu 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 *ImageConfig) GetBootMenuOk() (ret ImageConfiggetBootMenuRetType, ok bool) { - return getImageConfiggetBootMenuAttributeTypeOk(o.BootMenu) -} - -// HasBootMenu 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 *ImageConfig) HasBootMenu() bool { - _, ok := o.GetBootMenuOk() - return ok -} - -// SetBootMenu gets a reference to the given bool and assigns it to the BootMenu field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetBootMenu(v ImageConfiggetBootMenuRetType) { - setImageConfiggetBootMenuAttributeType(&o.BootMenu, v) -} - -// GetCdromBus returns the CdromBus field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetCdromBus() (res ImageConfigGetCdromBusRetType) { - res, _ = o.GetCdromBusOk() - return -} - -// GetCdromBusOk returns a tuple with the CdromBus 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetCdromBusOk() (ret ImageConfigGetCdromBusRetType, ok bool) { - return getImageConfigGetCdromBusAttributeTypeOk(o.CdromBus) -} - -// HasCdromBus 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 *ImageConfig) HasCdromBus() bool { - _, ok := o.GetCdromBusOk() - return ok -} - -// SetCdromBus gets a reference to the given string and assigns it to the CdromBus field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetCdromBus(v ImageConfigGetCdromBusRetType) { - setImageConfigGetCdromBusAttributeType(&o.CdromBus, v) -} - -// SetCdromBusNil sets the value for CdromBus to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetCdromBusNil() { - o.CdromBus = nil -} - -// UnsetCdromBus ensures that no value is present for CdromBus, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) UnsetCdromBus() { - o.CdromBus = nil -} - -// GetDiskBus returns the DiskBus field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetDiskBus() (res ImageConfigGetDiskBusRetType) { - res, _ = o.GetDiskBusOk() - return -} - -// GetDiskBusOk returns a tuple with the DiskBus 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetDiskBusOk() (ret ImageConfigGetDiskBusRetType, ok bool) { - return getImageConfigGetDiskBusAttributeTypeOk(o.DiskBus) -} - -// HasDiskBus 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 *ImageConfig) HasDiskBus() bool { - _, ok := o.GetDiskBusOk() - return ok -} - -// SetDiskBus gets a reference to the given string and assigns it to the DiskBus field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetDiskBus(v ImageConfigGetDiskBusRetType) { - setImageConfigGetDiskBusAttributeType(&o.DiskBus, v) -} - -// SetDiskBusNil sets the value for DiskBus to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetDiskBusNil() { - o.DiskBus = nil -} - -// UnsetDiskBus ensures that no value is present for DiskBus, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) UnsetDiskBus() { - o.DiskBus = nil -} - -// GetNicModel returns the NicModel field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetNicModel() (res ImageConfigGetNicModelRetType) { - res, _ = o.GetNicModelOk() - return -} - -// GetNicModelOk returns a tuple with the NicModel 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetNicModelOk() (ret ImageConfigGetNicModelRetType, ok bool) { - return getImageConfigGetNicModelAttributeTypeOk(o.NicModel) -} - -// HasNicModel 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 *ImageConfig) HasNicModel() bool { - _, ok := o.GetNicModelOk() - return ok -} - -// SetNicModel gets a reference to the given string and assigns it to the NicModel field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetNicModel(v ImageConfigGetNicModelRetType) { - setImageConfigGetNicModelAttributeType(&o.NicModel, v) -} - -// SetNicModelNil sets the value for NicModel to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetNicModelNil() { - o.NicModel = nil -} - -// UnsetNicModel ensures that no value is present for NicModel, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) UnsetNicModel() { - o.NicModel = nil -} - -// GetOperatingSystem returns the OperatingSystem 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 *ImageConfig) GetOperatingSystem() (res ImageConfigGetOperatingSystemRetType) { - res, _ = o.GetOperatingSystemOk() - return -} - -// GetOperatingSystemOk returns a tuple with the OperatingSystem 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 *ImageConfig) GetOperatingSystemOk() (ret ImageConfigGetOperatingSystemRetType, ok bool) { - return getImageConfigGetOperatingSystemAttributeTypeOk(o.OperatingSystem) -} - -// HasOperatingSystem 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 *ImageConfig) HasOperatingSystem() bool { - _, ok := o.GetOperatingSystemOk() - return ok -} - -// SetOperatingSystem gets a reference to the given string and assigns it to the OperatingSystem field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetOperatingSystem(v ImageConfigGetOperatingSystemRetType) { - setImageConfigGetOperatingSystemAttributeType(&o.OperatingSystem, v) -} - -// GetOperatingSystemDistro returns the OperatingSystemDistro field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetOperatingSystemDistro() (res ImageConfigGetOperatingSystemDistroRetType) { - res, _ = o.GetOperatingSystemDistroOk() - return -} - -// GetOperatingSystemDistroOk returns a tuple with the OperatingSystemDistro 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetOperatingSystemDistroOk() (ret ImageConfigGetOperatingSystemDistroRetType, ok bool) { - return getImageConfigGetOperatingSystemDistroAttributeTypeOk(o.OperatingSystemDistro) -} - -// HasOperatingSystemDistro 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 *ImageConfig) HasOperatingSystemDistro() bool { - _, ok := o.GetOperatingSystemDistroOk() - return ok -} - -// SetOperatingSystemDistro gets a reference to the given string and assigns it to the OperatingSystemDistro field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetOperatingSystemDistro(v ImageConfigGetOperatingSystemDistroRetType) { - setImageConfigGetOperatingSystemDistroAttributeType(&o.OperatingSystemDistro, v) -} - -// SetOperatingSystemDistroNil sets the value for OperatingSystemDistro to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetOperatingSystemDistroNil() { - o.OperatingSystemDistro = nil -} - -// UnsetOperatingSystemDistro ensures that no value is present for OperatingSystemDistro, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) UnsetOperatingSystemDistro() { - o.OperatingSystemDistro = nil -} - -// GetOperatingSystemVersion returns the OperatingSystemVersion field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetOperatingSystemVersion() (res ImageConfigGetOperatingSystemVersionRetType) { - res, _ = o.GetOperatingSystemVersionOk() - return -} - -// GetOperatingSystemVersionOk returns a tuple with the OperatingSystemVersion 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetOperatingSystemVersionOk() (ret ImageConfigGetOperatingSystemVersionRetType, ok bool) { - return getImageConfigGetOperatingSystemVersionAttributeTypeOk(o.OperatingSystemVersion) -} - -// HasOperatingSystemVersion 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 *ImageConfig) HasOperatingSystemVersion() bool { - _, ok := o.GetOperatingSystemVersionOk() - return ok -} - -// SetOperatingSystemVersion gets a reference to the given string and assigns it to the OperatingSystemVersion field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetOperatingSystemVersion(v ImageConfigGetOperatingSystemVersionRetType) { - setImageConfigGetOperatingSystemVersionAttributeType(&o.OperatingSystemVersion, v) -} - -// SetOperatingSystemVersionNil sets the value for OperatingSystemVersion to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetOperatingSystemVersionNil() { - o.OperatingSystemVersion = nil -} - -// UnsetOperatingSystemVersion ensures that no value is present for OperatingSystemVersion, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) UnsetOperatingSystemVersion() { - o.OperatingSystemVersion = nil -} - -// GetRescueBus returns the RescueBus field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetRescueBus() (res ImageConfigGetRescueBusRetType) { - res, _ = o.GetRescueBusOk() - return -} - -// GetRescueBusOk returns a tuple with the RescueBus 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetRescueBusOk() (ret ImageConfigGetRescueBusRetType, ok bool) { - return getImageConfigGetRescueBusAttributeTypeOk(o.RescueBus) -} - -// HasRescueBus 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 *ImageConfig) HasRescueBus() bool { - _, ok := o.GetRescueBusOk() - return ok -} - -// SetRescueBus gets a reference to the given string and assigns it to the RescueBus field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetRescueBus(v ImageConfigGetRescueBusRetType) { - setImageConfigGetRescueBusAttributeType(&o.RescueBus, v) -} - -// SetRescueBusNil sets the value for RescueBus to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetRescueBusNil() { - o.RescueBus = nil -} - -// UnsetRescueBus ensures that no value is present for RescueBus, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) UnsetRescueBus() { - o.RescueBus = nil -} - -// GetRescueDevice returns the RescueDevice field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetRescueDevice() (res ImageConfigGetRescueDeviceRetType) { - res, _ = o.GetRescueDeviceOk() - return -} - -// GetRescueDeviceOk returns a tuple with the RescueDevice 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetRescueDeviceOk() (ret ImageConfigGetRescueDeviceRetType, ok bool) { - return getImageConfigGetRescueDeviceAttributeTypeOk(o.RescueDevice) -} - -// HasRescueDevice 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 *ImageConfig) HasRescueDevice() bool { - _, ok := o.GetRescueDeviceOk() - return ok -} - -// SetRescueDevice gets a reference to the given string and assigns it to the RescueDevice field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetRescueDevice(v ImageConfigGetRescueDeviceRetType) { - setImageConfigGetRescueDeviceAttributeType(&o.RescueDevice, v) -} - -// SetRescueDeviceNil sets the value for RescueDevice to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetRescueDeviceNil() { - o.RescueDevice = nil -} - -// UnsetRescueDevice ensures that no value is present for RescueDevice, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) UnsetRescueDevice() { - o.RescueDevice = nil -} - -// GetSecureBoot returns the SecureBoot 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 *ImageConfig) GetSecureBoot() (res ImageConfiggetSecureBootRetType) { - res, _ = o.GetSecureBootOk() - return -} - -// GetSecureBootOk returns a tuple with the SecureBoot 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 *ImageConfig) GetSecureBootOk() (ret ImageConfiggetSecureBootRetType, ok bool) { - return getImageConfiggetSecureBootAttributeTypeOk(o.SecureBoot) -} - -// HasSecureBoot 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 *ImageConfig) HasSecureBoot() bool { - _, ok := o.GetSecureBootOk() - return ok -} - -// SetSecureBoot gets a reference to the given bool and assigns it to the SecureBoot field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetSecureBoot(v ImageConfiggetSecureBootRetType) { - setImageConfiggetSecureBootAttributeType(&o.SecureBoot, v) -} - -// GetUefi returns the Uefi 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 *ImageConfig) GetUefi() (res ImageConfiggetUefiRetType) { - res, _ = o.GetUefiOk() - return -} - -// GetUefiOk returns a tuple with the Uefi 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 *ImageConfig) GetUefiOk() (ret ImageConfiggetUefiRetType, ok bool) { - return getImageConfiggetUefiAttributeTypeOk(o.Uefi) -} - -// HasUefi 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 *ImageConfig) HasUefi() bool { - _, ok := o.GetUefiOk() - return ok -} - -// SetUefi gets a reference to the given bool and assigns it to the Uefi field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetUefi(v ImageConfiggetUefiRetType) { - setImageConfiggetUefiAttributeType(&o.Uefi, v) -} - -// GetVideoModel returns the VideoModel field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetVideoModel() (res ImageConfigGetVideoModelRetType) { - res, _ = o.GetVideoModelOk() - return -} - -// GetVideoModelOk returns a tuple with the VideoModel 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) GetVideoModelOk() (ret ImageConfigGetVideoModelRetType, ok bool) { - return getImageConfigGetVideoModelAttributeTypeOk(o.VideoModel) -} - -// HasVideoModel 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 *ImageConfig) HasVideoModel() bool { - _, ok := o.GetVideoModelOk() - return ok -} - -// SetVideoModel gets a reference to the given string and assigns it to the VideoModel field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetVideoModel(v ImageConfigGetVideoModelRetType) { - setImageConfigGetVideoModelAttributeType(&o.VideoModel, v) -} - -// SetVideoModelNil sets the value for VideoModel to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetVideoModelNil() { - o.VideoModel = nil -} - -// UnsetVideoModel ensures that no value is present for VideoModel, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) UnsetVideoModel() { - o.VideoModel = nil -} - -// GetVirtioScsi returns the VirtioScsi 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 *ImageConfig) GetVirtioScsi() (res ImageConfiggetVirtioScsiRetType) { - res, _ = o.GetVirtioScsiOk() - return -} - -// GetVirtioScsiOk returns a tuple with the VirtioScsi 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 *ImageConfig) GetVirtioScsiOk() (ret ImageConfiggetVirtioScsiRetType, ok bool) { - return getImageConfiggetVirtioScsiAttributeTypeOk(o.VirtioScsi) -} - -// HasVirtioScsi 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 *ImageConfig) HasVirtioScsi() bool { - _, ok := o.GetVirtioScsiOk() - return ok -} - -// SetVirtioScsi gets a reference to the given bool and assigns it to the VirtioScsi field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageConfig) SetVirtioScsi(v ImageConfiggetVirtioScsiRetType) { - setImageConfiggetVirtioScsiAttributeType(&o.VirtioScsi, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ImageConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageConfigGetArchitectureAttributeTypeOk(o.Architecture); ok { - toSerialize["Architecture"] = val - } - if val, ok := getImageConfiggetBootMenuAttributeTypeOk(o.BootMenu); ok { - toSerialize["BootMenu"] = val - } - if val, ok := getImageConfigGetCdromBusAttributeTypeOk(o.CdromBus); ok { - toSerialize["CdromBus"] = val - } - if val, ok := getImageConfigGetDiskBusAttributeTypeOk(o.DiskBus); ok { - toSerialize["DiskBus"] = val - } - if val, ok := getImageConfigGetNicModelAttributeTypeOk(o.NicModel); ok { - toSerialize["NicModel"] = val - } - if val, ok := getImageConfigGetOperatingSystemAttributeTypeOk(o.OperatingSystem); ok { - toSerialize["OperatingSystem"] = val - } - if val, ok := getImageConfigGetOperatingSystemDistroAttributeTypeOk(o.OperatingSystemDistro); ok { - toSerialize["OperatingSystemDistro"] = val - } - if val, ok := getImageConfigGetOperatingSystemVersionAttributeTypeOk(o.OperatingSystemVersion); ok { - toSerialize["OperatingSystemVersion"] = val - } - if val, ok := getImageConfigGetRescueBusAttributeTypeOk(o.RescueBus); ok { - toSerialize["RescueBus"] = val - } - if val, ok := getImageConfigGetRescueDeviceAttributeTypeOk(o.RescueDevice); ok { - toSerialize["RescueDevice"] = val - } - if val, ok := getImageConfiggetSecureBootAttributeTypeOk(o.SecureBoot); ok { - toSerialize["SecureBoot"] = val - } - if val, ok := getImageConfiggetUefiAttributeTypeOk(o.Uefi); ok { - toSerialize["Uefi"] = val - } - if val, ok := getImageConfigGetVideoModelAttributeTypeOk(o.VideoModel); ok { - toSerialize["VideoModel"] = val - } - if val, ok := getImageConfiggetVirtioScsiAttributeTypeOk(o.VirtioScsi); ok { - toSerialize["VirtioScsi"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImageConfig struct { - value *ImageConfig - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImageConfig) Get() *ImageConfig { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImageConfig) Set(val *ImageConfig) { - 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 NullableImageConfig) 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 *NullableImageConfig) 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 NewNullableImageConfig(val *ImageConfig) *NullableImageConfig { - return &NullableImageConfig{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 NullableImageConfig) 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 *NullableImageConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_config_test.go b/services/iaas/model_image_config_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image_create_response.go b/services/iaas/model_image_create_response.go deleted file mode 100644 index 1e2cb5a50d..0000000000 --- a/services/iaas/model_image_create_response.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ImageCreateResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ImageCreateResponse{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageCreateResponseGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageCreateResponseGetIdAttributeTypeOk(arg ImageCreateResponseGetIdAttributeType) (ret ImageCreateResponseGetIdRetType, 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 setImageCreateResponseGetIdAttributeType(arg *ImageCreateResponseGetIdAttributeType, val ImageCreateResponseGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageCreateResponseGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageCreateResponseGetIdRetType = string - -/* - types and functions for uploadUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageCreateResponseGetUploadUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageCreateResponseGetUploadUrlAttributeTypeOk(arg ImageCreateResponseGetUploadUrlAttributeType) (ret ImageCreateResponseGetUploadUrlRetType, 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 setImageCreateResponseGetUploadUrlAttributeType(arg *ImageCreateResponseGetUploadUrlAttributeType, val ImageCreateResponseGetUploadUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageCreateResponseGetUploadUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageCreateResponseGetUploadUrlRetType = string - -// ImageCreateResponse Image creation response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageCreateResponse struct { - // Universally Unique Identifier (UUID). - // REQUIRED - Id ImageCreateResponseGetIdAttributeType `json:"id" required:"true"` - // REQUIRED - UploadUrl ImageCreateResponseGetUploadUrlAttributeType `json:"uploadUrl" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ImageCreateResponse ImageCreateResponse - -// NewImageCreateResponse instantiates a new ImageCreateResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageCreateResponse(id ImageCreateResponseGetIdArgType, uploadUrl ImageCreateResponseGetUploadUrlArgType) *ImageCreateResponse { - this := ImageCreateResponse{} - setImageCreateResponseGetIdAttributeType(&this.Id, id) - setImageCreateResponseGetUploadUrlAttributeType(&this.UploadUrl, uploadUrl) - return &this -} - -// NewImageCreateResponseWithDefaults instantiates a new ImageCreateResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageCreateResponseWithDefaults() *ImageCreateResponse { - this := ImageCreateResponse{} - return &this -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageCreateResponse) GetId() (ret ImageCreateResponseGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// 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 *ImageCreateResponse) GetIdOk() (ret ImageCreateResponseGetIdRetType, ok bool) { - return getImageCreateResponseGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageCreateResponse) SetId(v ImageCreateResponseGetIdRetType) { - setImageCreateResponseGetIdAttributeType(&o.Id, v) -} - -// GetUploadUrl returns the UploadUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageCreateResponse) GetUploadUrl() (ret ImageCreateResponseGetUploadUrlRetType) { - ret, _ = o.GetUploadUrlOk() - return ret -} - -// GetUploadUrlOk returns a tuple with the UploadUrl field value -// 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 *ImageCreateResponse) GetUploadUrlOk() (ret ImageCreateResponseGetUploadUrlRetType, ok bool) { - return getImageCreateResponseGetUploadUrlAttributeTypeOk(o.UploadUrl) -} - -// SetUploadUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageCreateResponse) SetUploadUrl(v ImageCreateResponseGetUploadUrlRetType) { - setImageCreateResponseGetUploadUrlAttributeType(&o.UploadUrl, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ImageCreateResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageCreateResponseGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getImageCreateResponseGetUploadUrlAttributeTypeOk(o.UploadUrl); ok { - toSerialize["UploadUrl"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImageCreateResponse struct { - value *ImageCreateResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImageCreateResponse) Get() *ImageCreateResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImageCreateResponse) Set(val *ImageCreateResponse) { - 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 NullableImageCreateResponse) 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 *NullableImageCreateResponse) 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 NewNullableImageCreateResponse(val *ImageCreateResponse) *NullableImageCreateResponse { - return &NullableImageCreateResponse{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 NullableImageCreateResponse) 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 *NullableImageCreateResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_create_response_test.go b/services/iaas/model_image_create_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_create_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image_from_volume_payload.go b/services/iaas/model_image_from_volume_payload.go deleted file mode 100644 index a5ac4c856c..0000000000 --- a/services/iaas/model_image_from_volume_payload.go +++ /dev/null @@ -1,265 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ImageFromVolumePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ImageFromVolumePayload{} - -/* - types and functions for diskFormat -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumePayloadGetDiskFormatAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageFromVolumePayloadGetDiskFormatAttributeTypeOk(arg ImageFromVolumePayloadGetDiskFormatAttributeType) (ret ImageFromVolumePayloadGetDiskFormatRetType, 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 setImageFromVolumePayloadGetDiskFormatAttributeType(arg *ImageFromVolumePayloadGetDiskFormatAttributeType, val ImageFromVolumePayloadGetDiskFormatRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumePayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageFromVolumePayloadGetNameAttributeTypeOk(arg ImageFromVolumePayloadGetNameAttributeType) (ret ImageFromVolumePayloadGetNameRetType, 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 setImageFromVolumePayloadGetNameAttributeType(arg *ImageFromVolumePayloadGetNameAttributeType, val ImageFromVolumePayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumePayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumePayloadGetNameRetType = string - -/* - types and functions for protected -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumePayloadgetProtectedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumePayloadgetProtectedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumePayloadgetProtectedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageFromVolumePayloadgetProtectedAttributeTypeOk(arg ImageFromVolumePayloadgetProtectedAttributeType) (ret ImageFromVolumePayloadgetProtectedRetType, 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 setImageFromVolumePayloadgetProtectedAttributeType(arg *ImageFromVolumePayloadgetProtectedAttributeType, val ImageFromVolumePayloadgetProtectedRetType) { - *arg = &val -} - -// ImageFromVolumePayload Object that represents the upload request of an image to a volume. Used for creating an image from a volume. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageFromVolumePayload struct { - // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. - // REQUIRED - DiskFormat ImageFromVolumePayloadGetDiskFormatAttributeType `json:"diskFormat" required:"true"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name ImageFromVolumePayloadGetNameAttributeType `json:"name" required:"true"` - // When true the created image is prevented from being deleted. - Protected ImageFromVolumePayloadgetProtectedAttributeType `json:"protected,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ImageFromVolumePayload ImageFromVolumePayload - -// NewImageFromVolumePayload instantiates a new ImageFromVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageFromVolumePayload(diskFormat ImageFromVolumePayloadGetDiskFormatArgType, name ImageFromVolumePayloadGetNameArgType) *ImageFromVolumePayload { - this := ImageFromVolumePayload{} - setImageFromVolumePayloadGetDiskFormatAttributeType(&this.DiskFormat, diskFormat) - setImageFromVolumePayloadGetNameAttributeType(&this.Name, name) - return &this -} - -// NewImageFromVolumePayloadWithDefaults instantiates a new ImageFromVolumePayload 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 -// 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 protected bool = false - this.Protected = &protected - return &this -} - -// GetDiskFormat returns the DiskFormat field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageFromVolumePayload) GetDiskFormat() (ret ImageFromVolumePayloadGetDiskFormatRetType) { - ret, _ = o.GetDiskFormatOk() - return ret -} - -// GetDiskFormatOk returns a tuple with the DiskFormat field value -// 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) GetDiskFormatOk() (ret ImageFromVolumePayloadGetDiskFormatRetType, ok bool) { - return getImageFromVolumePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat) -} - -// SetDiskFormat sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageFromVolumePayload) SetDiskFormat(v ImageFromVolumePayloadGetDiskFormatRetType) { - setImageFromVolumePayloadGetDiskFormatAttributeType(&o.DiskFormat, 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) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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) GetNameOk() (ret ImageFromVolumePayloadGetNameRetType, ok bool) { - return getImageFromVolumePayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageFromVolumePayload) SetName(v ImageFromVolumePayloadGetNameRetType) { - setImageFromVolumePayloadGetNameAttributeType(&o.Name, v) -} - -// GetProtected returns the Protected 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) GetProtected() (res ImageFromVolumePayloadgetProtectedRetType) { - res, _ = o.GetProtectedOk() - return -} - -// GetProtectedOk returns a tuple with the Protected 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) GetProtectedOk() (ret ImageFromVolumePayloadgetProtectedRetType, ok bool) { - return getImageFromVolumePayloadgetProtectedAttributeTypeOk(o.Protected) -} - -// HasProtected 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) HasProtected() bool { - _, ok := o.GetProtectedOk() - return ok -} - -// SetProtected gets a reference to the given bool and assigns it to the Protected field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageFromVolumePayload) SetProtected(v ImageFromVolumePayloadgetProtectedRetType) { - setImageFromVolumePayloadgetProtectedAttributeType(&o.Protected, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ImageFromVolumePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageFromVolumePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat); ok { - toSerialize["DiskFormat"] = val - } - if val, ok := getImageFromVolumePayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getImageFromVolumePayloadgetProtectedAttributeTypeOk(o.Protected); ok { - toSerialize["Protected"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImageFromVolumePayload struct { - value *ImageFromVolumePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImageFromVolumePayload) Get() *ImageFromVolumePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImageFromVolumePayload) Set(val *ImageFromVolumePayload) { - 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 NullableImageFromVolumePayload) 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 *NullableImageFromVolumePayload) 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 NewNullableImageFromVolumePayload(val *ImageFromVolumePayload) *NullableImageFromVolumePayload { - return &NullableImageFromVolumePayload{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 NullableImageFromVolumePayload) 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 *NullableImageFromVolumePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_from_volume_payload_test.go b/services/iaas/model_image_from_volume_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_from_volume_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image_list_response.go b/services/iaas/model_image_list_response.go deleted file mode 100644 index 68afd3601a..0000000000 --- a/services/iaas/model_image_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ImageListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ImageListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageListResponseGetItemsAttributeType = *[]Image - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageListResponseGetItemsArgType = []Image - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageListResponseGetItemsRetType = []Image - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageListResponseGetItemsAttributeTypeOk(arg ImageListResponseGetItemsAttributeType) (ret ImageListResponseGetItemsRetType, 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 setImageListResponseGetItemsAttributeType(arg *ImageListResponseGetItemsAttributeType, val ImageListResponseGetItemsRetType) { - *arg = &val -} - -// ImageListResponse Image list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageListResponse struct { - // A list containing image objects. - // REQUIRED - Items ImageListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ImageListResponse ImageListResponse - -// NewImageListResponse instantiates a new ImageListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageListResponse(items ImageListResponseGetItemsArgType) *ImageListResponse { - this := ImageListResponse{} - setImageListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewImageListResponseWithDefaults instantiates a new ImageListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageListResponseWithDefaults() *ImageListResponse { - this := ImageListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageListResponse) GetItems() (ret ImageListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *ImageListResponse) GetItemsOk() (ret ImageListResponseGetItemsRetType, ok bool) { - return getImageListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageListResponse) SetItems(v ImageListResponseGetItemsRetType) { - setImageListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ImageListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImageListResponse struct { - value *ImageListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImageListResponse) Get() *ImageListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImageListResponse) Set(val *ImageListResponse) { - 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 NullableImageListResponse) 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 *NullableImageListResponse) 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 NewNullableImageListResponse(val *ImageListResponse) *NullableImageListResponse { - return &NullableImageListResponse{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 NullableImageListResponse) 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 *NullableImageListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_list_response_test.go b/services/iaas/model_image_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image_share.go b/services/iaas/model_image_share.go deleted file mode 100644 index 957956fd25..0000000000 --- a/services/iaas/model_image_share.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ImageShare type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ImageShare{} - -/* - types and functions for parentOrganization -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageSharegetParentOrganizationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageSharegetParentOrganizationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageSharegetParentOrganizationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageSharegetParentOrganizationAttributeTypeOk(arg ImageSharegetParentOrganizationAttributeType) (ret ImageSharegetParentOrganizationRetType, 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 setImageSharegetParentOrganizationAttributeType(arg *ImageSharegetParentOrganizationAttributeType, val ImageSharegetParentOrganizationRetType) { - *arg = &val -} - -/* - types and functions for projects -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareGetProjectsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareGetProjectsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareGetProjectsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageShareGetProjectsAttributeTypeOk(arg ImageShareGetProjectsAttributeType) (ret ImageShareGetProjectsRetType, 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 setImageShareGetProjectsAttributeType(arg *ImageShareGetProjectsAttributeType, val ImageShareGetProjectsRetType) { - *arg = &val -} - -// ImageShare Share details of an Image. For requests ParentOrganization and Projects are mutually exclusive. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShare struct { - // Image is shared with all projects inside the image owners organization. - ParentOrganization ImageSharegetParentOrganizationAttributeType `json:"parentOrganization,omitempty"` - // List of all projects the Image is shared with. - Projects ImageShareGetProjectsAttributeType `json:"projects,omitempty"` -} - -// NewImageShare instantiates a new ImageShare 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageShare() *ImageShare { - this := ImageShare{} - return &this -} - -// NewImageShareWithDefaults instantiates a new ImageShare 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageShareWithDefaults() *ImageShare { - this := ImageShare{} - return &this -} - -// GetParentOrganization returns the ParentOrganization 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 *ImageShare) GetParentOrganization() (res ImageSharegetParentOrganizationRetType) { - res, _ = o.GetParentOrganizationOk() - return -} - -// GetParentOrganizationOk returns a tuple with the ParentOrganization 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 *ImageShare) GetParentOrganizationOk() (ret ImageSharegetParentOrganizationRetType, ok bool) { - return getImageSharegetParentOrganizationAttributeTypeOk(o.ParentOrganization) -} - -// HasParentOrganization 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 *ImageShare) HasParentOrganization() bool { - _, ok := o.GetParentOrganizationOk() - return ok -} - -// SetParentOrganization gets a reference to the given bool and assigns it to the ParentOrganization field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageShare) SetParentOrganization(v ImageSharegetParentOrganizationRetType) { - setImageSharegetParentOrganizationAttributeType(&o.ParentOrganization, v) -} - -// GetProjects returns the Projects 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 *ImageShare) GetProjects() (res ImageShareGetProjectsRetType) { - res, _ = o.GetProjectsOk() - return -} - -// GetProjectsOk returns a tuple with the Projects 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 *ImageShare) GetProjectsOk() (ret ImageShareGetProjectsRetType, ok bool) { - return getImageShareGetProjectsAttributeTypeOk(o.Projects) -} - -// HasProjects 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 *ImageShare) HasProjects() bool { - _, ok := o.GetProjectsOk() - return ok -} - -// SetProjects gets a reference to the given []string and assigns it to the Projects field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageShare) SetProjects(v ImageShareGetProjectsRetType) { - setImageShareGetProjectsAttributeType(&o.Projects, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ImageShare) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageSharegetParentOrganizationAttributeTypeOk(o.ParentOrganization); ok { - toSerialize["ParentOrganization"] = val - } - if val, ok := getImageShareGetProjectsAttributeTypeOk(o.Projects); ok { - toSerialize["Projects"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImageShare struct { - value *ImageShare - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImageShare) Get() *ImageShare { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImageShare) Set(val *ImageShare) { - 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 NullableImageShare) 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 *NullableImageShare) 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 NewNullableImageShare(val *ImageShare) *NullableImageShare { - return &NullableImageShare{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 NullableImageShare) 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 *NullableImageShare) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_share_consumer.go b/services/iaas/model_image_share_consumer.go deleted file mode 100644 index 2f9918e12d..0000000000 --- a/services/iaas/model_image_share_consumer.go +++ /dev/null @@ -1,330 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the ImageShareConsumer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ImageShareConsumer{} - -/* - types and functions for consumerProjectId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetConsumerProjectIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageShareConsumerGetConsumerProjectIdAttributeTypeOk(arg ImageShareConsumerGetConsumerProjectIdAttributeType) (ret ImageShareConsumerGetConsumerProjectIdRetType, 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 setImageShareConsumerGetConsumerProjectIdAttributeType(arg *ImageShareConsumerGetConsumerProjectIdAttributeType, val ImageShareConsumerGetConsumerProjectIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetConsumerProjectIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetConsumerProjectIdRetType = string - -/* - 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 ImageShareConsumerGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageShareConsumerGetCreatedAtAttributeTypeOk(arg ImageShareConsumerGetCreatedAtAttributeType) (ret ImageShareConsumerGetCreatedAtRetType, 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 setImageShareConsumerGetCreatedAtAttributeType(arg *ImageShareConsumerGetCreatedAtAttributeType, val ImageShareConsumerGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for imageId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetImageIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageShareConsumerGetImageIdAttributeTypeOk(arg ImageShareConsumerGetImageIdAttributeType) (ret ImageShareConsumerGetImageIdRetType, 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 setImageShareConsumerGetImageIdAttributeType(arg *ImageShareConsumerGetImageIdAttributeType, val ImageShareConsumerGetImageIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetImageIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetImageIdRetType = 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 ImageShareConsumerGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumerGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getImageShareConsumerGetUpdatedAtAttributeTypeOk(arg ImageShareConsumerGetUpdatedAtAttributeType) (ret ImageShareConsumerGetUpdatedAtRetType, 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 setImageShareConsumerGetUpdatedAtAttributeType(arg *ImageShareConsumerGetUpdatedAtAttributeType, val ImageShareConsumerGetUpdatedAtRetType) { - *arg = &val -} - -// ImageShareConsumer The details of an Image share consumer. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ImageShareConsumer struct { - // Universally Unique Identifier (UUID). - ConsumerProjectId ImageShareConsumerGetConsumerProjectIdAttributeType `json:"consumerProjectId,omitempty"` - // Date-time when resource was created. - CreatedAt ImageShareConsumerGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Universally Unique Identifier (UUID). - ImageId ImageShareConsumerGetImageIdAttributeType `json:"imageId,omitempty"` - // Date-time when resource was last updated. - UpdatedAt ImageShareConsumerGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// NewImageShareConsumer instantiates a new ImageShareConsumer 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageShareConsumer() *ImageShareConsumer { - this := ImageShareConsumer{} - return &this -} - -// NewImageShareConsumerWithDefaults instantiates a new ImageShareConsumer 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewImageShareConsumerWithDefaults() *ImageShareConsumer { - this := ImageShareConsumer{} - return &this -} - -// GetConsumerProjectId returns the ConsumerProjectId 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 *ImageShareConsumer) GetConsumerProjectId() (res ImageShareConsumerGetConsumerProjectIdRetType) { - res, _ = o.GetConsumerProjectIdOk() - return -} - -// GetConsumerProjectIdOk returns a tuple with the ConsumerProjectId 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 *ImageShareConsumer) GetConsumerProjectIdOk() (ret ImageShareConsumerGetConsumerProjectIdRetType, ok bool) { - return getImageShareConsumerGetConsumerProjectIdAttributeTypeOk(o.ConsumerProjectId) -} - -// HasConsumerProjectId 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 *ImageShareConsumer) HasConsumerProjectId() bool { - _, ok := o.GetConsumerProjectIdOk() - return ok -} - -// SetConsumerProjectId gets a reference to the given string and assigns it to the ConsumerProjectId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageShareConsumer) SetConsumerProjectId(v ImageShareConsumerGetConsumerProjectIdRetType) { - setImageShareConsumerGetConsumerProjectIdAttributeType(&o.ConsumerProjectId, 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 *ImageShareConsumer) GetCreatedAt() (res ImageShareConsumerGetCreatedAtRetType) { - 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 *ImageShareConsumer) GetCreatedAtOk() (ret ImageShareConsumerGetCreatedAtRetType, ok bool) { - return getImageShareConsumerGetCreatedAtAttributeTypeOk(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 *ImageShareConsumer) 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 *ImageShareConsumer) SetCreatedAt(v ImageShareConsumerGetCreatedAtRetType) { - setImageShareConsumerGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetImageId returns the ImageId 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 *ImageShareConsumer) GetImageId() (res ImageShareConsumerGetImageIdRetType) { - res, _ = o.GetImageIdOk() - return -} - -// GetImageIdOk returns a tuple with the ImageId 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 *ImageShareConsumer) GetImageIdOk() (ret ImageShareConsumerGetImageIdRetType, ok bool) { - return getImageShareConsumerGetImageIdAttributeTypeOk(o.ImageId) -} - -// HasImageId 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 *ImageShareConsumer) HasImageId() bool { - _, ok := o.GetImageIdOk() - return ok -} - -// SetImageId gets a reference to the given string and assigns it to the ImageId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ImageShareConsumer) SetImageId(v ImageShareConsumerGetImageIdRetType) { - setImageShareConsumerGetImageIdAttributeType(&o.ImageId, 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 *ImageShareConsumer) GetUpdatedAt() (res ImageShareConsumerGetUpdatedAtRetType) { - 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 *ImageShareConsumer) GetUpdatedAtOk() (ret ImageShareConsumerGetUpdatedAtRetType, ok bool) { - return getImageShareConsumerGetUpdatedAtAttributeTypeOk(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 *ImageShareConsumer) 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 *ImageShareConsumer) SetUpdatedAt(v ImageShareConsumerGetUpdatedAtRetType) { - setImageShareConsumerGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ImageShareConsumer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getImageShareConsumerGetConsumerProjectIdAttributeTypeOk(o.ConsumerProjectId); ok { - toSerialize["ConsumerProjectId"] = val - } - if val, ok := getImageShareConsumerGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getImageShareConsumerGetImageIdAttributeTypeOk(o.ImageId); ok { - toSerialize["ImageId"] = val - } - if val, ok := getImageShareConsumerGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableImageShareConsumer struct { - value *ImageShareConsumer - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableImageShareConsumer) Get() *ImageShareConsumer { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableImageShareConsumer) Set(val *ImageShareConsumer) { - 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 NullableImageShareConsumer) 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 *NullableImageShareConsumer) 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 NewNullableImageShareConsumer(val *ImageShareConsumer) *NullableImageShareConsumer { - return &NullableImageShareConsumer{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 NullableImageShareConsumer) 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 *NullableImageShareConsumer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_image_share_consumer_test.go b/services/iaas/model_image_share_consumer_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_share_consumer_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image_share_test.go b/services/iaas/model_image_share_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_share_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_image_test.go b/services/iaas/model_image_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_image_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_key_pair_list_response.go b/services/iaas/model_key_pair_list_response.go deleted file mode 100644 index 38c818496e..0000000000 --- a/services/iaas/model_key_pair_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the KeyPairListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &KeyPairListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeyPairListResponseGetItemsAttributeType = *[]Keypair - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeyPairListResponseGetItemsArgType = []Keypair - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeyPairListResponseGetItemsRetType = []Keypair - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getKeyPairListResponseGetItemsAttributeTypeOk(arg KeyPairListResponseGetItemsAttributeType) (ret KeyPairListResponseGetItemsRetType, 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 setKeyPairListResponseGetItemsAttributeType(arg *KeyPairListResponseGetItemsAttributeType, val KeyPairListResponseGetItemsRetType) { - *arg = &val -} - -// KeyPairListResponse SSH keypair list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeyPairListResponse struct { - // A list of SSH keypairs. - // REQUIRED - Items KeyPairListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _KeyPairListResponse KeyPairListResponse - -// NewKeyPairListResponse instantiates a new KeyPairListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewKeyPairListResponse(items KeyPairListResponseGetItemsArgType) *KeyPairListResponse { - this := KeyPairListResponse{} - setKeyPairListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewKeyPairListResponseWithDefaults instantiates a new KeyPairListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewKeyPairListResponseWithDefaults() *KeyPairListResponse { - this := KeyPairListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *KeyPairListResponse) GetItems() (ret KeyPairListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *KeyPairListResponse) GetItemsOk() (ret KeyPairListResponseGetItemsRetType, ok bool) { - return getKeyPairListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *KeyPairListResponse) SetItems(v KeyPairListResponseGetItemsRetType) { - setKeyPairListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o KeyPairListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getKeyPairListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableKeyPairListResponse struct { - value *KeyPairListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableKeyPairListResponse) Get() *KeyPairListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableKeyPairListResponse) Set(val *KeyPairListResponse) { - 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 NullableKeyPairListResponse) 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 *NullableKeyPairListResponse) 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 NewNullableKeyPairListResponse(val *KeyPairListResponse) *NullableKeyPairListResponse { - return &NullableKeyPairListResponse{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 NullableKeyPairListResponse) 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 *NullableKeyPairListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_key_pair_list_response_test.go b/services/iaas/model_key_pair_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_key_pair_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_keypair.go b/services/iaas/model_keypair.go deleted file mode 100644 index 73d25ae4e6..0000000000 --- a/services/iaas/model_keypair.go +++ /dev/null @@ -1,446 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Keypair type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Keypair{} - -/* - 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 KeypairGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getKeypairGetCreatedAtAttributeTypeOk(arg KeypairGetCreatedAtAttributeType) (ret KeypairGetCreatedAtRetType, 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 setKeypairGetCreatedAtAttributeType(arg *KeypairGetCreatedAtAttributeType, val KeypairGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for fingerprint -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetFingerprintAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getKeypairGetFingerprintAttributeTypeOk(arg KeypairGetFingerprintAttributeType) (ret KeypairGetFingerprintRetType, 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 setKeypairGetFingerprintAttributeType(arg *KeypairGetFingerprintAttributeType, val KeypairGetFingerprintRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetFingerprintArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetFingerprintRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getKeypairGetLabelsAttributeTypeOk(arg KeypairGetLabelsAttributeType) (ret KeypairGetLabelsRetType, 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 setKeypairGetLabelsAttributeType(arg *KeypairGetLabelsAttributeType, val KeypairGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getKeypairGetNameAttributeTypeOk(arg KeypairGetNameAttributeType) (ret KeypairGetNameRetType, 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 setKeypairGetNameAttributeType(arg *KeypairGetNameAttributeType, val KeypairGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetNameRetType = string - -/* - types and functions for publicKey -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetPublicKeyAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getKeypairGetPublicKeyAttributeTypeOk(arg KeypairGetPublicKeyAttributeType) (ret KeypairGetPublicKeyRetType, 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 setKeypairGetPublicKeyAttributeType(arg *KeypairGetPublicKeyAttributeType, val KeypairGetPublicKeyRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetPublicKeyArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetPublicKeyRetType = 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 KeypairGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type KeypairGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getKeypairGetUpdatedAtAttributeTypeOk(arg KeypairGetUpdatedAtAttributeType) (ret KeypairGetUpdatedAtRetType, 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 setKeypairGetUpdatedAtAttributeType(arg *KeypairGetUpdatedAtAttributeType, val KeypairGetUpdatedAtRetType) { - *arg = &val -} - -// Keypair Object that represents the public key of an SSH keypair and its name. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Keypair struct { - // Date-time when resource was created. - 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. - 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"` - // Object that represents a public SSH key. - // REQUIRED - PublicKey KeypairGetPublicKeyAttributeType `json:"publicKey" required:"true"` - // Date-time when resource was last updated. - UpdatedAt KeypairGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Keypair Keypair - -// NewKeypair instantiates a new Keypair 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewKeypair(publicKey KeypairGetPublicKeyArgType) *Keypair { - this := Keypair{} - setKeypairGetPublicKeyAttributeType(&this.PublicKey, publicKey) - return &this -} - -// NewKeypairWithDefaults instantiates a new Keypair 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewKeypairWithDefaults() *Keypair { - this := Keypair{} - 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 *Keypair) GetCreatedAt() (res KeypairGetCreatedAtRetType) { - 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 *Keypair) GetCreatedAtOk() (ret KeypairGetCreatedAtRetType, ok bool) { - return getKeypairGetCreatedAtAttributeTypeOk(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 *Keypair) 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 *Keypair) SetCreatedAt(v KeypairGetCreatedAtRetType) { - setKeypairGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetFingerprint returns the Fingerprint 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 *Keypair) GetFingerprint() (res KeypairGetFingerprintRetType) { - res, _ = o.GetFingerprintOk() - return -} - -// GetFingerprintOk returns a tuple with the Fingerprint 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 *Keypair) GetFingerprintOk() (ret KeypairGetFingerprintRetType, ok bool) { - return getKeypairGetFingerprintAttributeTypeOk(o.Fingerprint) -} - -// HasFingerprint 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 *Keypair) HasFingerprint() bool { - _, ok := o.GetFingerprintOk() - return ok -} - -// SetFingerprint gets a reference to the given string and assigns it to the Fingerprint field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) SetFingerprint(v KeypairGetFingerprintRetType) { - setKeypairGetFingerprintAttributeType(&o.Fingerprint, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) GetLabels() (res KeypairGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) GetLabelsOk() (ret KeypairGetLabelsRetType, ok bool) { - return getKeypairGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) SetLabels(v KeypairGetLabelsRetType) { - setKeypairGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) GetName() (res KeypairGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *Keypair) GetNameOk() (ret KeypairGetNameRetType, ok bool) { - return getKeypairGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *Keypair) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) SetName(v KeypairGetNameRetType) { - setKeypairGetNameAttributeType(&o.Name, v) -} - -// GetPublicKey returns the PublicKey field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) GetPublicKey() (ret KeypairGetPublicKeyRetType) { - ret, _ = o.GetPublicKeyOk() - return ret -} - -// GetPublicKeyOk returns a tuple with the PublicKey field value -// 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 *Keypair) GetPublicKeyOk() (ret KeypairGetPublicKeyRetType, ok bool) { - return getKeypairGetPublicKeyAttributeTypeOk(o.PublicKey) -} - -// SetPublicKey sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Keypair) SetPublicKey(v KeypairGetPublicKeyRetType) { - setKeypairGetPublicKeyAttributeType(&o.PublicKey, 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 *Keypair) GetUpdatedAt() (res KeypairGetUpdatedAtRetType) { - 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 *Keypair) GetUpdatedAtOk() (ret KeypairGetUpdatedAtRetType, ok bool) { - return getKeypairGetUpdatedAtAttributeTypeOk(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 *Keypair) 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 *Keypair) SetUpdatedAt(v KeypairGetUpdatedAtRetType) { - setKeypairGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Keypair) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getKeypairGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getKeypairGetFingerprintAttributeTypeOk(o.Fingerprint); ok { - toSerialize["Fingerprint"] = val - } - if val, ok := getKeypairGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getKeypairGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getKeypairGetPublicKeyAttributeTypeOk(o.PublicKey); ok { - toSerialize["PublicKey"] = val - } - if val, ok := getKeypairGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableKeypair struct { - value *Keypair - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableKeypair) Get() *Keypair { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableKeypair) Set(val *Keypair) { - 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 NullableKeypair) 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 *NullableKeypair) 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 NewNullableKeypair(val *Keypair) *NullableKeypair { - return &NullableKeypair{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 NullableKeypair) 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 *NullableKeypair) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_keypair_test.go b/services/iaas/model_keypair_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_keypair_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_machine_type.go b/services/iaas/model_machine_type.go deleted file mode 100644 index 22c4a950e2..0000000000 --- a/services/iaas/model_machine_type.go +++ /dev/null @@ -1,430 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the MachineType type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MachineType{} - -/* - 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 MachineTypeGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMachineTypeGetDescriptionAttributeTypeOk(arg MachineTypeGetDescriptionAttributeType) (ret MachineTypeGetDescriptionRetType, 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 setMachineTypeGetDescriptionAttributeType(arg *MachineTypeGetDescriptionAttributeType, val MachineTypeGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetDescriptionRetType = string - -/* - types and functions for disk -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetDiskAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetDiskArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetDiskRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMachineTypeGetDiskAttributeTypeOk(arg MachineTypeGetDiskAttributeType) (ret MachineTypeGetDiskRetType, 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 setMachineTypeGetDiskAttributeType(arg *MachineTypeGetDiskAttributeType, val MachineTypeGetDiskRetType) { - *arg = &val -} - -/* - types and functions for extraSpecs -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetExtraSpecsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetExtraSpecsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetExtraSpecsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMachineTypeGetExtraSpecsAttributeTypeOk(arg MachineTypeGetExtraSpecsAttributeType) (ret MachineTypeGetExtraSpecsRetType, 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 setMachineTypeGetExtraSpecsAttributeType(arg *MachineTypeGetExtraSpecsAttributeType, val MachineTypeGetExtraSpecsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMachineTypeGetNameAttributeTypeOk(arg MachineTypeGetNameAttributeType) (ret MachineTypeGetNameRetType, 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 setMachineTypeGetNameAttributeType(arg *MachineTypeGetNameAttributeType, val MachineTypeGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetNameRetType = string - -/* - types and functions for ram -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetRamAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetRamArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetRamRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMachineTypeGetRamAttributeTypeOk(arg MachineTypeGetRamAttributeType) (ret MachineTypeGetRamRetType, 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 setMachineTypeGetRamAttributeType(arg *MachineTypeGetRamAttributeType, val MachineTypeGetRamRetType) { - *arg = &val -} - -/* - types and functions for vcpus -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetVcpusAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetVcpusArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeGetVcpusRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMachineTypeGetVcpusAttributeTypeOk(arg MachineTypeGetVcpusAttributeType) (ret MachineTypeGetVcpusRetType, 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 setMachineTypeGetVcpusAttributeType(arg *MachineTypeGetVcpusAttributeType, val MachineTypeGetVcpusRetType) { - *arg = &val -} - -// MachineType Machine Type. Filterable Fields: `disk`, `extraSpecs`, `name`, `ram`, `vcpus`. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineType struct { - // Description Object. Allows string up to 255 Characters. - Description MachineTypeGetDescriptionAttributeType `json:"description,omitempty"` - // Size in Gigabyte. - // REQUIRED - Disk MachineTypeGetDiskAttributeType `json:"disk" required:"true"` - // Properties to control certain aspects or scheduling behavior for an object. - ExtraSpecs MachineTypeGetExtraSpecsAttributeType `json:"extraSpecs,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name MachineTypeGetNameAttributeType `json:"name" required:"true"` - // Size in Megabyte. - // REQUIRED - Ram MachineTypeGetRamAttributeType `json:"ram" required:"true"` - // The number of virtual CPUs of a server. - // REQUIRED - Vcpus MachineTypeGetVcpusAttributeType `json:"vcpus" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _MachineType MachineType - -// NewMachineType instantiates a new MachineType 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewMachineType(disk MachineTypeGetDiskArgType, name MachineTypeGetNameArgType, ram MachineTypeGetRamArgType, vcpus MachineTypeGetVcpusArgType) *MachineType { - this := MachineType{} - setMachineTypeGetDiskAttributeType(&this.Disk, disk) - setMachineTypeGetNameAttributeType(&this.Name, name) - setMachineTypeGetRamAttributeType(&this.Ram, ram) - setMachineTypeGetVcpusAttributeType(&this.Vcpus, vcpus) - return &this -} - -// NewMachineTypeWithDefaults instantiates a new MachineType 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewMachineTypeWithDefaults() *MachineType { - this := MachineType{} - 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 *MachineType) GetDescription() (res MachineTypeGetDescriptionRetType) { - 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 *MachineType) GetDescriptionOk() (ret MachineTypeGetDescriptionRetType, ok bool) { - return getMachineTypeGetDescriptionAttributeTypeOk(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 *MachineType) 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 *MachineType) SetDescription(v MachineTypeGetDescriptionRetType) { - setMachineTypeGetDescriptionAttributeType(&o.Description, v) -} - -// GetDisk returns the Disk field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineType) GetDisk() (ret MachineTypeGetDiskRetType) { - ret, _ = o.GetDiskOk() - return ret -} - -// GetDiskOk returns a tuple with the Disk field value -// 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 *MachineType) GetDiskOk() (ret MachineTypeGetDiskRetType, ok bool) { - return getMachineTypeGetDiskAttributeTypeOk(o.Disk) -} - -// SetDisk sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineType) SetDisk(v MachineTypeGetDiskRetType) { - setMachineTypeGetDiskAttributeType(&o.Disk, v) -} - -// GetExtraSpecs returns the ExtraSpecs 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 *MachineType) GetExtraSpecs() (res MachineTypeGetExtraSpecsRetType) { - res, _ = o.GetExtraSpecsOk() - return -} - -// GetExtraSpecsOk returns a tuple with the ExtraSpecs 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 *MachineType) GetExtraSpecsOk() (ret MachineTypeGetExtraSpecsRetType, ok bool) { - return getMachineTypeGetExtraSpecsAttributeTypeOk(o.ExtraSpecs) -} - -// HasExtraSpecs 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 *MachineType) HasExtraSpecs() bool { - _, ok := o.GetExtraSpecsOk() - return ok -} - -// SetExtraSpecs gets a reference to the given map[string]interface{} and assigns it to the ExtraSpecs field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineType) SetExtraSpecs(v MachineTypeGetExtraSpecsRetType) { - setMachineTypeGetExtraSpecsAttributeType(&o.ExtraSpecs, 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 *MachineType) GetName() (ret MachineTypeGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *MachineType) GetNameOk() (ret MachineTypeGetNameRetType, ok bool) { - return getMachineTypeGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineType) SetName(v MachineTypeGetNameRetType) { - setMachineTypeGetNameAttributeType(&o.Name, v) -} - -// GetRam returns the Ram field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineType) GetRam() (ret MachineTypeGetRamRetType) { - ret, _ = o.GetRamOk() - return ret -} - -// GetRamOk returns a tuple with the Ram field value -// 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 *MachineType) GetRamOk() (ret MachineTypeGetRamRetType, ok bool) { - return getMachineTypeGetRamAttributeTypeOk(o.Ram) -} - -// SetRam sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineType) SetRam(v MachineTypeGetRamRetType) { - setMachineTypeGetRamAttributeType(&o.Ram, v) -} - -// GetVcpus returns the Vcpus field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineType) GetVcpus() (ret MachineTypeGetVcpusRetType) { - ret, _ = o.GetVcpusOk() - return ret -} - -// GetVcpusOk returns a tuple with the Vcpus field value -// 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 *MachineType) GetVcpusOk() (ret MachineTypeGetVcpusRetType, ok bool) { - return getMachineTypeGetVcpusAttributeTypeOk(o.Vcpus) -} - -// SetVcpus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineType) SetVcpus(v MachineTypeGetVcpusRetType) { - setMachineTypeGetVcpusAttributeType(&o.Vcpus, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o MachineType) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getMachineTypeGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getMachineTypeGetDiskAttributeTypeOk(o.Disk); ok { - toSerialize["Disk"] = val - } - if val, ok := getMachineTypeGetExtraSpecsAttributeTypeOk(o.ExtraSpecs); ok { - toSerialize["ExtraSpecs"] = val - } - if val, ok := getMachineTypeGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getMachineTypeGetRamAttributeTypeOk(o.Ram); ok { - toSerialize["Ram"] = val - } - if val, ok := getMachineTypeGetVcpusAttributeTypeOk(o.Vcpus); ok { - toSerialize["Vcpus"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableMachineType struct { - value *MachineType - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMachineType) Get() *MachineType { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMachineType) Set(val *MachineType) { - 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 NullableMachineType) 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 *NullableMachineType) 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 NewNullableMachineType(val *MachineType) *NullableMachineType { - return &NullableMachineType{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 NullableMachineType) 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 *NullableMachineType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_machine_type_list_response.go b/services/iaas/model_machine_type_list_response.go deleted file mode 100644 index 7fe75188ea..0000000000 --- a/services/iaas/model_machine_type_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the MachineTypeListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MachineTypeListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeListResponseGetItemsAttributeType = *[]MachineType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeListResponseGetItemsArgType = []MachineType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeListResponseGetItemsRetType = []MachineType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMachineTypeListResponseGetItemsAttributeTypeOk(arg MachineTypeListResponseGetItemsAttributeType) (ret MachineTypeListResponseGetItemsRetType, 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 setMachineTypeListResponseGetItemsAttributeType(arg *MachineTypeListResponseGetItemsAttributeType, val MachineTypeListResponseGetItemsRetType) { - *arg = &val -} - -// MachineTypeListResponse Machine type list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MachineTypeListResponse struct { - // Machine type list. - // REQUIRED - Items MachineTypeListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _MachineTypeListResponse MachineTypeListResponse - -// NewMachineTypeListResponse instantiates a new MachineTypeListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewMachineTypeListResponse(items MachineTypeListResponseGetItemsArgType) *MachineTypeListResponse { - this := MachineTypeListResponse{} - setMachineTypeListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewMachineTypeListResponseWithDefaults instantiates a new MachineTypeListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewMachineTypeListResponseWithDefaults() *MachineTypeListResponse { - this := MachineTypeListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineTypeListResponse) GetItems() (ret MachineTypeListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *MachineTypeListResponse) GetItemsOk() (ret MachineTypeListResponseGetItemsRetType, ok bool) { - return getMachineTypeListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MachineTypeListResponse) SetItems(v MachineTypeListResponseGetItemsRetType) { - setMachineTypeListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o MachineTypeListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getMachineTypeListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableMachineTypeListResponse struct { - value *MachineTypeListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMachineTypeListResponse) Get() *MachineTypeListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMachineTypeListResponse) Set(val *MachineTypeListResponse) { - 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 NullableMachineTypeListResponse) 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 *NullableMachineTypeListResponse) 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 NewNullableMachineTypeListResponse(val *MachineTypeListResponse) *NullableMachineTypeListResponse { - return &NullableMachineTypeListResponse{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 NullableMachineTypeListResponse) 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 *NullableMachineTypeListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_machine_type_list_response_test.go b/services/iaas/model_machine_type_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_machine_type_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_machine_type_test.go b/services/iaas/model_machine_type_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_machine_type_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_network.go b/services/iaas/model_network.go deleted file mode 100644 index 0497e0c009..0000000000 --- a/services/iaas/model_network.go +++ /dev/null @@ -1,787 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Network type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Network{} - -/* - 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 NetworkGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetCreatedAtAttributeTypeOk(arg NetworkGetCreatedAtAttributeType) (ret NetworkGetCreatedAtRetType, 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 setNetworkGetCreatedAtAttributeType(arg *NetworkGetCreatedAtAttributeType, val NetworkGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for dhcp -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkgetDhcpAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkgetDhcpArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkgetDhcpRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkgetDhcpAttributeTypeOk(arg NetworkgetDhcpAttributeType) (ret NetworkgetDhcpRetType, 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 setNetworkgetDhcpAttributeType(arg *NetworkgetDhcpAttributeType, val NetworkgetDhcpRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetIdAttributeTypeOk(arg NetworkGetIdAttributeType) (ret NetworkGetIdRetType, 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 setNetworkGetIdAttributeType(arg *NetworkGetIdAttributeType, val NetworkGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIdRetType = string - -/* - types and functions for ipv4 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIpv4AttributeType = *NetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIpv4ArgType = NetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIpv4RetType = NetworkIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetIpv4AttributeTypeOk(arg NetworkGetIpv4AttributeType) (ret NetworkGetIpv4RetType, 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 setNetworkGetIpv4AttributeType(arg *NetworkGetIpv4AttributeType, val NetworkGetIpv4RetType) { - *arg = &val -} - -/* - types and functions for ipv6 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIpv6AttributeType = *NetworkIPv6 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIpv6ArgType = NetworkIPv6 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetIpv6RetType = NetworkIPv6 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetIpv6AttributeTypeOk(arg NetworkGetIpv6AttributeType) (ret NetworkGetIpv6RetType, 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 setNetworkGetIpv6AttributeType(arg *NetworkGetIpv6AttributeType, val NetworkGetIpv6RetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetLabelsAttributeTypeOk(arg NetworkGetLabelsAttributeType) (ret NetworkGetLabelsRetType, 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 setNetworkGetLabelsAttributeType(arg *NetworkGetLabelsAttributeType, val NetworkGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetNameAttributeTypeOk(arg NetworkGetNameAttributeType) (ret NetworkGetNameRetType, 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 setNetworkGetNameAttributeType(arg *NetworkGetNameAttributeType, val NetworkGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetNameRetType = string - -/* - types and functions for routed -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkgetRoutedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkgetRoutedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkgetRoutedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkgetRoutedAttributeTypeOk(arg NetworkgetRoutedAttributeType) (ret NetworkgetRoutedRetType, 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 setNetworkgetRoutedAttributeType(arg *NetworkgetRoutedAttributeType, val NetworkgetRoutedRetType) { - *arg = &val -} - -/* - types and functions for routingTableId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetRoutingTableIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetRoutingTableIdAttributeTypeOk(arg NetworkGetRoutingTableIdAttributeType) (ret NetworkGetRoutingTableIdRetType, 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 setNetworkGetRoutingTableIdAttributeType(arg *NetworkGetRoutingTableIdAttributeType, val NetworkGetRoutingTableIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetRoutingTableIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetRoutingTableIdRetType = string - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetStatusAttributeTypeOk(arg NetworkGetStatusAttributeType) (ret NetworkGetStatusRetType, 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 setNetworkGetStatusAttributeType(arg *NetworkGetStatusAttributeType, val NetworkGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetStatusRetType = 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 NetworkGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetUpdatedAtAttributeTypeOk(arg NetworkGetUpdatedAtAttributeType) (ret NetworkGetUpdatedAtRetType, 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 setNetworkGetUpdatedAtAttributeType(arg *NetworkGetUpdatedAtAttributeType, val NetworkGetUpdatedAtRetType) { - *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 NetworkGetVpcIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetVpcIdAttributeTypeOk(arg NetworkGetVpcIdAttributeType) (ret NetworkGetVpcIdRetType, 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 setNetworkGetVpcIdAttributeType(arg *NetworkGetVpcIdAttributeType, val NetworkGetVpcIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetVpcIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetVpcIdRetType = string - -// Network Object that represents a network. If no routing table is specified, the default routing table is used. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Network struct { - // Date-time when resource was created. - CreatedAt NetworkGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Enable or disable DHCP for a network. - Dhcp NetworkgetDhcpAttributeType `json:"dhcp,omitempty"` - // Universally Unique Identifier (UUID). - // REQUIRED - 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. - Labels NetworkGetLabelsAttributeType `json:"labels,omitempty"` - // REQUIRED - Name NetworkGetNameAttributeType `json:"name" required:"true"` - // Shows if the network is routed and therefore accessible from other networks. - Routed NetworkgetRoutedAttributeType `json:"routed,omitempty"` - // Universally Unique Identifier (UUID). - RoutingTableId NetworkGetRoutingTableIdAttributeType `json:"routingTableId,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - // REQUIRED - Status NetworkGetStatusAttributeType `json:"status" required:"true"` - // Date-time when resource was last updated. - UpdatedAt NetworkGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - // Universally Unique Identifier (UUID). - VpcId NetworkGetVpcIdAttributeType `json:"vpcId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetwork(id NetworkGetIdArgType, name NetworkGetNameArgType, status NetworkGetStatusArgType) *Network { - this := Network{} - setNetworkGetIdAttributeType(&this.Id, id) - setNetworkGetNameAttributeType(&this.Name, name) - setNetworkGetStatusAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkWithDefaults() *Network { - this := Network{} - 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 *Network) GetCreatedAt() (res NetworkGetCreatedAtRetType) { - 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 *Network) GetCreatedAtOk() (ret NetworkGetCreatedAtRetType, ok bool) { - return getNetworkGetCreatedAtAttributeTypeOk(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 *Network) 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 *Network) SetCreatedAt(v NetworkGetCreatedAtRetType) { - setNetworkGetCreatedAtAttributeType(&o.CreatedAt, 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) { - res, _ = o.GetDhcpOk() - return -} - -// GetDhcpOk returns a tuple with the Dhcp 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) GetDhcpOk() (ret NetworkgetDhcpRetType, ok bool) { - return getNetworkgetDhcpAttributeTypeOk(o.Dhcp) -} - -// HasDhcp 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) HasDhcp() bool { - _, ok := o.GetDhcpOk() - return ok -} - -// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetDhcp(v NetworkgetDhcpRetType) { - setNetworkgetDhcpAttributeType(&o.Dhcp, v) -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) GetId() (ret NetworkGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// 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) GetIdOk() (ret NetworkGetIdRetType, ok bool) { - return getNetworkGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetId(v NetworkGetIdRetType) { - setNetworkGetIdAttributeType(&o.Id, 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 *Network) GetIpv4() (res NetworkGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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) GetIpv4Ok() (ret NetworkGetIpv4RetType, ok bool) { - return getNetworkGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given NetworkIPv4 and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetIpv4(v NetworkGetIpv4RetType) { - setNetworkGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetIpv6 returns the Ipv6 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) GetIpv6() (res NetworkGetIpv6RetType) { - res, _ = o.GetIpv6Ok() - return -} - -// GetIpv6Ok returns a tuple with the Ipv6 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) GetIpv6Ok() (ret NetworkGetIpv6RetType, ok bool) { - return getNetworkGetIpv6AttributeTypeOk(o.Ipv6) -} - -// HasIpv6 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) HasIpv6() bool { - _, ok := o.GetIpv6Ok() - return ok -} - -// SetIpv6 gets a reference to the given NetworkIPv6 and assigns it to the Ipv6 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetIpv6(v NetworkGetIpv6RetType) { - setNetworkGetIpv6AttributeType(&o.Ipv6, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) GetLabels() (res NetworkGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) GetLabelsOk() (ret NetworkGetLabelsRetType, ok bool) { - return getNetworkGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetLabels(v NetworkGetLabelsRetType) { - setNetworkGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) GetName() (ret NetworkGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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) GetNameOk() (ret NetworkGetNameRetType, ok bool) { - return getNetworkGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetName(v NetworkGetNameRetType) { - setNetworkGetNameAttributeType(&o.Name, v) -} - -// GetRouted returns the Routed 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) GetRouted() (res NetworkgetRoutedRetType) { - res, _ = o.GetRoutedOk() - return -} - -// GetRoutedOk returns a tuple with the Routed 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) GetRoutedOk() (ret NetworkgetRoutedRetType, ok bool) { - return getNetworkgetRoutedAttributeTypeOk(o.Routed) -} - -// HasRouted 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) HasRouted() bool { - _, ok := o.GetRoutedOk() - return ok -} - -// SetRouted gets a reference to the given bool and assigns it to the Routed field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetRouted(v NetworkgetRoutedRetType) { - setNetworkgetRoutedAttributeType(&o.Routed, v) -} - -// GetRoutingTableId returns the RoutingTableId 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) GetRoutingTableId() (res NetworkGetRoutingTableIdRetType) { - res, _ = o.GetRoutingTableIdOk() - return -} - -// GetRoutingTableIdOk returns a tuple with the RoutingTableId 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) GetRoutingTableIdOk() (ret NetworkGetRoutingTableIdRetType, ok bool) { - return getNetworkGetRoutingTableIdAttributeTypeOk(o.RoutingTableId) -} - -// HasRoutingTableId 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) HasRoutingTableId() bool { - _, ok := o.GetRoutingTableIdOk() - return ok -} - -// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetRoutingTableId(v NetworkGetRoutingTableIdRetType) { - setNetworkGetRoutingTableIdAttributeType(&o.RoutingTableId, 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 *Network) GetStatus() (ret NetworkGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// 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) GetStatusOk() (ret NetworkGetStatusRetType, ok bool) { - return getNetworkGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetStatus(v NetworkGetStatusRetType) { - setNetworkGetStatusAttributeType(&o.Status, 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 *Network) GetUpdatedAt() (res NetworkGetUpdatedAtRetType) { - 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 *Network) GetUpdatedAtOk() (ret NetworkGetUpdatedAtRetType, ok bool) { - return getNetworkGetUpdatedAtAttributeTypeOk(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 *Network) 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 *Network) SetUpdatedAt(v NetworkGetUpdatedAtRetType) { - setNetworkGetUpdatedAtAttributeType(&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 *Network) GetVpcId() (res NetworkGetVpcIdRetType) { - 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 *Network) GetVpcIdOk() (ret NetworkGetVpcIdRetType, ok bool) { - return getNetworkGetVpcIdAttributeTypeOk(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 *Network) 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 *Network) SetVpcId(v NetworkGetVpcIdRetType) { - setNetworkGetVpcIdAttributeType(&o.VpcId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Network) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getNetworkgetDhcpAttributeTypeOk(o.Dhcp); ok { - toSerialize["Dhcp"] = val - } - if val, ok := getNetworkGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getNetworkGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getNetworkGetIpv6AttributeTypeOk(o.Ipv6); ok { - toSerialize["Ipv6"] = val - } - if val, ok := getNetworkGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getNetworkGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getNetworkgetRoutedAttributeTypeOk(o.Routed); ok { - toSerialize["Routed"] = val - } - if val, ok := getNetworkGetRoutingTableIdAttributeTypeOk(o.RoutingTableId); ok { - toSerialize["RoutingTableId"] = val - } - if val, ok := getNetworkGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getNetworkGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getNetworkGetVpcIdAttributeTypeOk(o.VpcId); ok { - toSerialize["VpcId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetwork struct { - value *Network - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetwork) Get() *Network { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetwork) Set(val *Network) { - 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 NullableNetwork) 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 *NullableNetwork) 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 NewNullableNetwork(val *Network) *NullableNetwork { - return &NullableNetwork{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 NullableNetwork) 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 *NullableNetwork) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_network_area.go b/services/iaas/model_network_area.go deleted file mode 100644 index f78d940c38..0000000000 --- a/services/iaas/model_network_area.go +++ /dev/null @@ -1,445 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the NetworkArea type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkArea{} - -/* - 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 NetworkAreaGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkAreaGetCreatedAtAttributeTypeOk(arg NetworkAreaGetCreatedAtAttributeType) (ret NetworkAreaGetCreatedAtRetType, 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 setNetworkAreaGetCreatedAtAttributeType(arg *NetworkAreaGetCreatedAtAttributeType, val NetworkAreaGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkAreaGetIdAttributeTypeOk(arg NetworkAreaGetIdAttributeType) (ret NetworkAreaGetIdRetType, 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 setNetworkAreaGetIdAttributeType(arg *NetworkAreaGetIdAttributeType, val NetworkAreaGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkAreaGetLabelsAttributeTypeOk(arg NetworkAreaGetLabelsAttributeType) (ret NetworkAreaGetLabelsRetType, 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 setNetworkAreaGetLabelsAttributeType(arg *NetworkAreaGetLabelsAttributeType, val NetworkAreaGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkAreaGetNameAttributeTypeOk(arg NetworkAreaGetNameAttributeType) (ret NetworkAreaGetNameRetType, 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 setNetworkAreaGetNameAttributeType(arg *NetworkAreaGetNameAttributeType, val NetworkAreaGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetNameRetType = string - -/* - types and functions for projectCount -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetProjectCountAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetProjectCountArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetProjectCountRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkAreaGetProjectCountAttributeTypeOk(arg NetworkAreaGetProjectCountAttributeType) (ret NetworkAreaGetProjectCountRetType, 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 setNetworkAreaGetProjectCountAttributeType(arg *NetworkAreaGetProjectCountAttributeType, val NetworkAreaGetProjectCountRetType) { - *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 NetworkAreaGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkAreaGetUpdatedAtAttributeTypeOk(arg NetworkAreaGetUpdatedAtAttributeType) (ret NetworkAreaGetUpdatedAtRetType, 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 setNetworkAreaGetUpdatedAtAttributeType(arg *NetworkAreaGetUpdatedAtAttributeType, val NetworkAreaGetUpdatedAtRetType) { - *arg = &val -} - -// NetworkArea Object that represents a network area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkArea struct { - // Date-time when resource was created. - 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. - Labels NetworkAreaGetLabelsAttributeType `json:"labels,omitempty"` - // REQUIRED - Name NetworkAreaGetNameAttributeType `json:"name" required:"true"` - // The amount of projects currently referencing a specific area. - ProjectCount NetworkAreaGetProjectCountAttributeType `json:"projectCount,omitempty"` - // Date-time when resource was last updated. - UpdatedAt NetworkAreaGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _NetworkArea NetworkArea - -// NewNetworkArea instantiates a new NetworkArea 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkArea(name NetworkAreaGetNameArgType) *NetworkArea { - this := NetworkArea{} - setNetworkAreaGetNameAttributeType(&this.Name, name) - return &this -} - -// NewNetworkAreaWithDefaults instantiates a new NetworkArea 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkAreaWithDefaults() *NetworkArea { - this := NetworkArea{} - 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 *NetworkArea) GetCreatedAt() (res NetworkAreaGetCreatedAtRetType) { - 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 *NetworkArea) GetCreatedAtOk() (ret NetworkAreaGetCreatedAtRetType, ok bool) { - return getNetworkAreaGetCreatedAtAttributeTypeOk(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 *NetworkArea) 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 *NetworkArea) SetCreatedAt(v NetworkAreaGetCreatedAtRetType) { - setNetworkAreaGetCreatedAtAttributeType(&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 *NetworkArea) GetId() (res NetworkAreaGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *NetworkArea) GetIdOk() (ret NetworkAreaGetIdRetType, ok bool) { - return getNetworkAreaGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *NetworkArea) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkArea) SetId(v NetworkAreaGetIdRetType) { - setNetworkAreaGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkArea) GetLabels() (res NetworkAreaGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkArea) GetLabelsOk() (ret NetworkAreaGetLabelsRetType, ok bool) { - return getNetworkAreaGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkArea) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkArea) SetLabels(v NetworkAreaGetLabelsRetType) { - setNetworkAreaGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkArea) GetName() (ret NetworkAreaGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *NetworkArea) GetNameOk() (ret NetworkAreaGetNameRetType, ok bool) { - return getNetworkAreaGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkArea) SetName(v NetworkAreaGetNameRetType) { - setNetworkAreaGetNameAttributeType(&o.Name, v) -} - -// GetProjectCount returns the ProjectCount 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 *NetworkArea) GetProjectCount() (res NetworkAreaGetProjectCountRetType) { - res, _ = o.GetProjectCountOk() - return -} - -// GetProjectCountOk returns a tuple with the ProjectCount 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 *NetworkArea) GetProjectCountOk() (ret NetworkAreaGetProjectCountRetType, ok bool) { - return getNetworkAreaGetProjectCountAttributeTypeOk(o.ProjectCount) -} - -// HasProjectCount 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 *NetworkArea) HasProjectCount() bool { - _, ok := o.GetProjectCountOk() - return ok -} - -// SetProjectCount gets a reference to the given int64 and assigns it to the ProjectCount field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkArea) SetProjectCount(v NetworkAreaGetProjectCountRetType) { - setNetworkAreaGetProjectCountAttributeType(&o.ProjectCount, 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 *NetworkArea) GetUpdatedAt() (res NetworkAreaGetUpdatedAtRetType) { - 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 *NetworkArea) GetUpdatedAtOk() (ret NetworkAreaGetUpdatedAtRetType, ok bool) { - return getNetworkAreaGetUpdatedAtAttributeTypeOk(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 *NetworkArea) 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 *NetworkArea) SetUpdatedAt(v NetworkAreaGetUpdatedAtRetType) { - setNetworkAreaGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NetworkArea) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkAreaGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getNetworkAreaGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getNetworkAreaGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getNetworkAreaGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getNetworkAreaGetProjectCountAttributeTypeOk(o.ProjectCount); ok { - toSerialize["ProjectCount"] = val - } - if val, ok := getNetworkAreaGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetworkArea struct { - value *NetworkArea - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetworkArea) Get() *NetworkArea { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetworkArea) Set(val *NetworkArea) { - 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 NullableNetworkArea) 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 *NullableNetworkArea) 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 NewNullableNetworkArea(val *NetworkArea) *NullableNetworkArea { - return &NullableNetworkArea{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 NullableNetworkArea) 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 *NullableNetworkArea) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_network_area_list_response.go b/services/iaas/model_network_area_list_response.go deleted file mode 100644 index 87cf2393da..0000000000 --- a/services/iaas/model_network_area_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NetworkAreaListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkAreaListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaListResponseGetItemsAttributeType = *[]NetworkArea - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaListResponseGetItemsArgType = []NetworkArea - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaListResponseGetItemsRetType = []NetworkArea - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkAreaListResponseGetItemsAttributeTypeOk(arg NetworkAreaListResponseGetItemsAttributeType) (ret NetworkAreaListResponseGetItemsRetType, 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 setNetworkAreaListResponseGetItemsAttributeType(arg *NetworkAreaListResponseGetItemsAttributeType, val NetworkAreaListResponseGetItemsRetType) { - *arg = &val -} - -// NetworkAreaListResponse Network area list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkAreaListResponse struct { - // A list of network areas. - // REQUIRED - Items NetworkAreaListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _NetworkAreaListResponse NetworkAreaListResponse - -// NewNetworkAreaListResponse instantiates a new NetworkAreaListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkAreaListResponse(items NetworkAreaListResponseGetItemsArgType) *NetworkAreaListResponse { - this := NetworkAreaListResponse{} - setNetworkAreaListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewNetworkAreaListResponseWithDefaults instantiates a new NetworkAreaListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkAreaListResponseWithDefaults() *NetworkAreaListResponse { - this := NetworkAreaListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkAreaListResponse) GetItems() (ret NetworkAreaListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *NetworkAreaListResponse) GetItemsOk() (ret NetworkAreaListResponseGetItemsRetType, ok bool) { - return getNetworkAreaListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkAreaListResponse) SetItems(v NetworkAreaListResponseGetItemsRetType) { - setNetworkAreaListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NetworkAreaListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkAreaListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetworkAreaListResponse struct { - value *NetworkAreaListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetworkAreaListResponse) Get() *NetworkAreaListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetworkAreaListResponse) Set(val *NetworkAreaListResponse) { - 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 NullableNetworkAreaListResponse) 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 *NullableNetworkAreaListResponse) 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 NewNullableNetworkAreaListResponse(val *NetworkAreaListResponse) *NullableNetworkAreaListResponse { - return &NullableNetworkAreaListResponse{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 NullableNetworkAreaListResponse) 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 *NullableNetworkAreaListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_network_area_list_response_test.go b/services/iaas/model_network_area_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_network_area_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_network_area_test.go b/services/iaas/model_network_area_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_network_area_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_network_ipv4.go b/services/iaas/model_network_ipv4.go deleted file mode 100644 index 5e389d0f42..0000000000 --- a/services/iaas/model_network_ipv4.go +++ /dev/null @@ -1,402 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NetworkIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkIPv4{} - -/* - types and functions for gateway -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetGatewayAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv4GetGatewayAttributeTypeOk(arg NetworkIPv4GetGatewayAttributeType) (ret NetworkIPv4GetGatewayRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setNetworkIPv4GetGatewayAttributeType(arg *NetworkIPv4GetGatewayAttributeType, val NetworkIPv4GetGatewayRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetGatewayArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetGatewayRetType = *string - -/* - types and functions for nameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv4GetNameserversAttributeTypeOk(arg NetworkIPv4GetNameserversAttributeType) (ret NetworkIPv4GetNameserversRetType, 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 setNetworkIPv4GetNameserversAttributeType(arg *NetworkIPv4GetNameserversAttributeType, val NetworkIPv4GetNameserversRetType) { - *arg = &val -} - -/* - types and functions for prefixes -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetPrefixesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetPrefixesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetPrefixesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv4GetPrefixesAttributeTypeOk(arg NetworkIPv4GetPrefixesAttributeType) (ret NetworkIPv4GetPrefixesRetType, 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 setNetworkIPv4GetPrefixesAttributeType(arg *NetworkIPv4GetPrefixesAttributeType, val NetworkIPv4GetPrefixesRetType) { - *arg = &val -} - -/* - types and functions for publicIp -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetPublicIpAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv4GetPublicIpAttributeTypeOk(arg NetworkIPv4GetPublicIpAttributeType) (ret NetworkIPv4GetPublicIpRetType, 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 setNetworkIPv4GetPublicIpAttributeType(arg *NetworkIPv4GetPublicIpAttributeType, val NetworkIPv4GetPublicIpRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetPublicIpArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetPublicIpRetType = string - -/* - types and functions for vpcNetworkRangeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetVpcNetworkRangeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv4GetVpcNetworkRangeIdAttributeTypeOk(arg NetworkIPv4GetVpcNetworkRangeIdAttributeType) (ret NetworkIPv4GetVpcNetworkRangeIdRetType, 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 setNetworkIPv4GetVpcNetworkRangeIdAttributeType(arg *NetworkIPv4GetVpcNetworkRangeIdAttributeType, val NetworkIPv4GetVpcNetworkRangeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetVpcNetworkRangeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv4GetVpcNetworkRangeIdRetType = string - -// NetworkIPv4 Object that represents the IPv4 part of a network. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 NetworkIPv4GetGatewayAttributeType `json:"gateway,omitempty"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers NetworkIPv4GetNameserversAttributeType `json:"nameservers,omitempty"` - // REQUIRED - Prefixes NetworkIPv4GetPrefixesAttributeType `json:"prefixes" required:"true"` - // String that represents an IPv4 address. - PublicIp NetworkIPv4GetPublicIpAttributeType `json:"publicIp,omitempty"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId NetworkIPv4GetVpcNetworkRangeIdAttributeType `json:"vpcNetworkRangeId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkIPv4(prefixes NetworkIPv4GetPrefixesArgType) *NetworkIPv4 { - this := NetworkIPv4{} - setNetworkIPv4GetPrefixesAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) GetGateway() (res NetworkIPv4GetGatewayRetType) { - res, _ = o.GetGatewayOk() - return -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) GetGatewayOk() (ret NetworkIPv4GetGatewayRetType, ok bool) { - return getNetworkIPv4GetGatewayAttributeTypeOk(o.Gateway) -} - -// HasGateway 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 *NetworkIPv4) HasGateway() bool { - _, ok := o.GetGatewayOk() - return ok -} - -// SetGateway gets a reference to the given string and assigns it to the Gateway field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) SetGateway(v NetworkIPv4GetGatewayRetType) { - setNetworkIPv4GetGatewayAttributeType(&o.Gateway, v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) SetGatewayNil() { - o.Gateway = nil -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) UnsetGateway() { - o.Gateway = nil -} - -// GetNameservers returns the Nameservers 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 *NetworkIPv4) GetNameservers() (res NetworkIPv4GetNameserversRetType) { - res, _ = o.GetNameserversOk() - return -} - -// GetNameserversOk returns a tuple with the Nameservers 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 *NetworkIPv4) GetNameserversOk() (ret NetworkIPv4GetNameserversRetType, ok bool) { - return getNetworkIPv4GetNameserversAttributeTypeOk(o.Nameservers) -} - -// HasNameservers 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 *NetworkIPv4) HasNameservers() bool { - _, ok := o.GetNameserversOk() - return ok -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) SetNameservers(v NetworkIPv4GetNameserversRetType) { - setNetworkIPv4GetNameserversAttributeType(&o.Nameservers, v) -} - -// GetPrefixes returns the Prefixes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) GetPrefixes() (ret NetworkIPv4GetPrefixesRetType) { - ret, _ = o.GetPrefixesOk() - return ret -} - -// GetPrefixesOk returns a tuple with the Prefixes field value -// 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 *NetworkIPv4) GetPrefixesOk() (ret NetworkIPv4GetPrefixesRetType, ok bool) { - return getNetworkIPv4GetPrefixesAttributeTypeOk(o.Prefixes) -} - -// SetPrefixes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) SetPrefixes(v NetworkIPv4GetPrefixesRetType) { - setNetworkIPv4GetPrefixesAttributeType(&o.Prefixes, v) -} - -// GetPublicIp returns the PublicIp 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 *NetworkIPv4) GetPublicIp() (res NetworkIPv4GetPublicIpRetType) { - res, _ = o.GetPublicIpOk() - return -} - -// GetPublicIpOk returns a tuple with the PublicIp 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 *NetworkIPv4) GetPublicIpOk() (ret NetworkIPv4GetPublicIpRetType, ok bool) { - return getNetworkIPv4GetPublicIpAttributeTypeOk(o.PublicIp) -} - -// HasPublicIp 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 *NetworkIPv4) HasPublicIp() bool { - _, ok := o.GetPublicIpOk() - return ok -} - -// SetPublicIp gets a reference to the given string and assigns it to the PublicIp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) SetPublicIp(v NetworkIPv4GetPublicIpRetType) { - setNetworkIPv4GetPublicIpAttributeType(&o.PublicIp, v) -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId 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 *NetworkIPv4) GetVpcNetworkRangeId() (res NetworkIPv4GetVpcNetworkRangeIdRetType) { - res, _ = o.GetVpcNetworkRangeIdOk() - return -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId 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 *NetworkIPv4) GetVpcNetworkRangeIdOk() (ret NetworkIPv4GetVpcNetworkRangeIdRetType, ok bool) { - return getNetworkIPv4GetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId) -} - -// HasVpcNetworkRangeId 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 *NetworkIPv4) HasVpcNetworkRangeId() bool { - _, ok := o.GetVpcNetworkRangeIdOk() - return ok -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv4) SetVpcNetworkRangeId(v NetworkIPv4GetVpcNetworkRangeIdRetType) { - setNetworkIPv4GetVpcNetworkRangeIdAttributeType(&o.VpcNetworkRangeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NetworkIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkIPv4GetGatewayAttributeTypeOk(o.Gateway); ok { - toSerialize["Gateway"] = val - } - if val, ok := getNetworkIPv4GetNameserversAttributeTypeOk(o.Nameservers); ok { - toSerialize["Nameservers"] = val - } - if val, ok := getNetworkIPv4GetPrefixesAttributeTypeOk(o.Prefixes); ok { - toSerialize["Prefixes"] = val - } - if val, ok := getNetworkIPv4GetPublicIpAttributeTypeOk(o.PublicIp); ok { - toSerialize["PublicIp"] = val - } - if val, ok := getNetworkIPv4GetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId); ok { - toSerialize["VpcNetworkRangeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetworkIPv4 struct { - value *NetworkIPv4 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetworkIPv4) Get() *NetworkIPv4 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetworkIPv4) Set(val *NetworkIPv4) { - 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 NullableNetworkIPv4) 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 *NullableNetworkIPv4) 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 NewNullableNetworkIPv4(val *NetworkIPv4) *NullableNetworkIPv4 { - return &NullableNetworkIPv4{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 NullableNetworkIPv4) 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 *NullableNetworkIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_network_ipv4_test.go b/services/iaas/model_network_ipv4_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_network_ipv4_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_network_ipv6.go b/services/iaas/model_network_ipv6.go deleted file mode 100644 index ac7700dd4b..0000000000 --- a/services/iaas/model_network_ipv6.go +++ /dev/null @@ -1,343 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NetworkIPv6 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkIPv6{} - -/* - types and functions for gateway -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetGatewayAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv6GetGatewayAttributeTypeOk(arg NetworkIPv6GetGatewayAttributeType) (ret NetworkIPv6GetGatewayRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setNetworkIPv6GetGatewayAttributeType(arg *NetworkIPv6GetGatewayAttributeType, val NetworkIPv6GetGatewayRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetGatewayArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetGatewayRetType = *string - -/* - types and functions for nameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv6GetNameserversAttributeTypeOk(arg NetworkIPv6GetNameserversAttributeType) (ret NetworkIPv6GetNameserversRetType, 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 setNetworkIPv6GetNameserversAttributeType(arg *NetworkIPv6GetNameserversAttributeType, val NetworkIPv6GetNameserversRetType) { - *arg = &val -} - -/* - types and functions for prefixes -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetPrefixesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetPrefixesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetPrefixesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv6GetPrefixesAttributeTypeOk(arg NetworkIPv6GetPrefixesAttributeType) (ret NetworkIPv6GetPrefixesRetType, 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 setNetworkIPv6GetPrefixesAttributeType(arg *NetworkIPv6GetPrefixesAttributeType, val NetworkIPv6GetPrefixesRetType) { - *arg = &val -} - -/* - types and functions for vpcNetworkRangeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetVpcNetworkRangeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkIPv6GetVpcNetworkRangeIdAttributeTypeOk(arg NetworkIPv6GetVpcNetworkRangeIdAttributeType) (ret NetworkIPv6GetVpcNetworkRangeIdRetType, 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 setNetworkIPv6GetVpcNetworkRangeIdAttributeType(arg *NetworkIPv6GetVpcNetworkRangeIdAttributeType, val NetworkIPv6GetVpcNetworkRangeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetVpcNetworkRangeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkIPv6GetVpcNetworkRangeIdRetType = string - -// NetworkIPv6 Object that represents the IPv6 part of a network. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 NetworkIPv6GetGatewayAttributeType `json:"gateway,omitempty"` - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers NetworkIPv6GetNameserversAttributeType `json:"nameservers,omitempty"` - // REQUIRED - Prefixes NetworkIPv6GetPrefixesAttributeType `json:"prefixes" required:"true"` - // Universally Unique Identifier (UUID). - VpcNetworkRangeId NetworkIPv6GetVpcNetworkRangeIdAttributeType `json:"vpcNetworkRangeId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkIPv6(prefixes NetworkIPv6GetPrefixesArgType) *NetworkIPv6 { - this := NetworkIPv6{} - setNetworkIPv6GetPrefixesAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) GetGateway() (res NetworkIPv6GetGatewayRetType) { - res, _ = o.GetGatewayOk() - return -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) GetGatewayOk() (ret NetworkIPv6GetGatewayRetType, ok bool) { - return getNetworkIPv6GetGatewayAttributeTypeOk(o.Gateway) -} - -// HasGateway 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 *NetworkIPv6) HasGateway() bool { - _, ok := o.GetGatewayOk() - return ok -} - -// SetGateway gets a reference to the given string and assigns it to the Gateway field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) SetGateway(v NetworkIPv6GetGatewayRetType) { - setNetworkIPv6GetGatewayAttributeType(&o.Gateway, v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) SetGatewayNil() { - o.Gateway = nil -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) UnsetGateway() { - o.Gateway = nil -} - -// GetNameservers returns the Nameservers 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 *NetworkIPv6) GetNameservers() (res NetworkIPv6GetNameserversRetType) { - res, _ = o.GetNameserversOk() - return -} - -// GetNameserversOk returns a tuple with the Nameservers 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 *NetworkIPv6) GetNameserversOk() (ret NetworkIPv6GetNameserversRetType, ok bool) { - return getNetworkIPv6GetNameserversAttributeTypeOk(o.Nameservers) -} - -// HasNameservers 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 *NetworkIPv6) HasNameservers() bool { - _, ok := o.GetNameserversOk() - return ok -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) SetNameservers(v NetworkIPv6GetNameserversRetType) { - setNetworkIPv6GetNameserversAttributeType(&o.Nameservers, v) -} - -// GetPrefixes returns the Prefixes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) GetPrefixes() (ret NetworkIPv6GetPrefixesRetType) { - ret, _ = o.GetPrefixesOk() - return ret -} - -// GetPrefixesOk returns a tuple with the Prefixes field value -// 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 *NetworkIPv6) GetPrefixesOk() (ret NetworkIPv6GetPrefixesRetType, ok bool) { - return getNetworkIPv6GetPrefixesAttributeTypeOk(o.Prefixes) -} - -// SetPrefixes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) SetPrefixes(v NetworkIPv6GetPrefixesRetType) { - setNetworkIPv6GetPrefixesAttributeType(&o.Prefixes, v) -} - -// GetVpcNetworkRangeId returns the VpcNetworkRangeId 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 *NetworkIPv6) GetVpcNetworkRangeId() (res NetworkIPv6GetVpcNetworkRangeIdRetType) { - res, _ = o.GetVpcNetworkRangeIdOk() - return -} - -// GetVpcNetworkRangeIdOk returns a tuple with the VpcNetworkRangeId 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 *NetworkIPv6) GetVpcNetworkRangeIdOk() (ret NetworkIPv6GetVpcNetworkRangeIdRetType, ok bool) { - return getNetworkIPv6GetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId) -} - -// HasVpcNetworkRangeId 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 *NetworkIPv6) HasVpcNetworkRangeId() bool { - _, ok := o.GetVpcNetworkRangeIdOk() - return ok -} - -// SetVpcNetworkRangeId gets a reference to the given string and assigns it to the VpcNetworkRangeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkIPv6) SetVpcNetworkRangeId(v NetworkIPv6GetVpcNetworkRangeIdRetType) { - setNetworkIPv6GetVpcNetworkRangeIdAttributeType(&o.VpcNetworkRangeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NetworkIPv6) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkIPv6GetGatewayAttributeTypeOk(o.Gateway); ok { - toSerialize["Gateway"] = val - } - if val, ok := getNetworkIPv6GetNameserversAttributeTypeOk(o.Nameservers); ok { - toSerialize["Nameservers"] = val - } - if val, ok := getNetworkIPv6GetPrefixesAttributeTypeOk(o.Prefixes); ok { - toSerialize["Prefixes"] = val - } - if val, ok := getNetworkIPv6GetVpcNetworkRangeIdAttributeTypeOk(o.VpcNetworkRangeId); ok { - toSerialize["VpcNetworkRangeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetworkIPv6 struct { - value *NetworkIPv6 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetworkIPv6) Get() *NetworkIPv6 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetworkIPv6) Set(val *NetworkIPv6) { - 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 NullableNetworkIPv6) 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 *NullableNetworkIPv6) 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 NewNullableNetworkIPv6(val *NetworkIPv6) *NullableNetworkIPv6 { - return &NullableNetworkIPv6{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 NullableNetworkIPv6) 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 *NullableNetworkIPv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_network_ipv6_test.go b/services/iaas/model_network_ipv6_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_network_ipv6_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_network_list_response.go b/services/iaas/model_network_list_response.go deleted file mode 100644 index fe887151d5..0000000000 --- a/services/iaas/model_network_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NetworkListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkListResponseGetItemsAttributeType = *[]Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkListResponseGetItemsArgType = []Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkListResponseGetItemsRetType = []Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkListResponseGetItemsAttributeTypeOk(arg NetworkListResponseGetItemsAttributeType) (ret NetworkListResponseGetItemsRetType, 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 setNetworkListResponseGetItemsAttributeType(arg *NetworkListResponseGetItemsAttributeType, val NetworkListResponseGetItemsRetType) { - *arg = &val -} - -// NetworkListResponse Network list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkListResponse struct { - // A list of networks. - // REQUIRED - Items NetworkListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkListResponse(items NetworkListResponseGetItemsArgType) *NetworkListResponse { - this := NetworkListResponse{} - setNetworkListResponseGetItemsAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkListResponseWithDefaults() *NetworkListResponse { - this := NetworkListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkListResponse) GetItems() (ret NetworkListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *NetworkListResponse) GetItemsOk() (ret NetworkListResponseGetItemsRetType, ok bool) { - return getNetworkListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkListResponse) SetItems(v NetworkListResponseGetItemsRetType) { - setNetworkListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NetworkListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetworkListResponse struct { - value *NetworkListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetworkListResponse) Get() *NetworkListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetworkListResponse) Set(val *NetworkListResponse) { - 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 NullableNetworkListResponse) 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 *NullableNetworkListResponse) 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 NewNullableNetworkListResponse(val *NetworkListResponse) *NullableNetworkListResponse { - return &NullableNetworkListResponse{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 NullableNetworkListResponse) 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 *NullableNetworkListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_network_list_response_test.go b/services/iaas/model_network_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_network_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_network_range.go b/services/iaas/model_network_range.go deleted file mode 100644 index 5837a66de0..0000000000 --- a/services/iaas/model_network_range.go +++ /dev/null @@ -1,328 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the NetworkRange type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkRange{} - -/* - 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 NetworkRangeGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkRangeGetCreatedAtAttributeTypeOk(arg NetworkRangeGetCreatedAtAttributeType) (ret NetworkRangeGetCreatedAtRetType, 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 setNetworkRangeGetCreatedAtAttributeType(arg *NetworkRangeGetCreatedAtAttributeType, val NetworkRangeGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkRangeGetIdAttributeTypeOk(arg NetworkRangeGetIdAttributeType) (ret NetworkRangeGetIdRetType, 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 setNetworkRangeGetIdAttributeType(arg *NetworkRangeGetIdAttributeType, val NetworkRangeGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetIdRetType = string - -/* - types and functions for prefix -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetPrefixAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkRangeGetPrefixAttributeTypeOk(arg NetworkRangeGetPrefixAttributeType) (ret NetworkRangeGetPrefixRetType, 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 setNetworkRangeGetPrefixAttributeType(arg *NetworkRangeGetPrefixAttributeType, val NetworkRangeGetPrefixRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetPrefixArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetPrefixRetType = 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 NetworkRangeGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkRangeGetUpdatedAtAttributeTypeOk(arg NetworkRangeGetUpdatedAtAttributeType) (ret NetworkRangeGetUpdatedAtRetType, 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 setNetworkRangeGetUpdatedAtAttributeType(arg *NetworkRangeGetUpdatedAtAttributeType, val NetworkRangeGetUpdatedAtRetType) { - *arg = &val -} - -// NetworkRange Object that represents a network range of a network area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRange struct { - // Date-time when resource was created. - CreatedAt NetworkRangeGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Universally Unique Identifier (UUID). - Id NetworkRangeGetIdAttributeType `json:"id,omitempty"` - // Classless Inter-Domain Routing (CIDR). - // REQUIRED - Prefix NetworkRangeGetPrefixAttributeType `json:"prefix" required:"true"` - // Date-time when resource was last updated. - UpdatedAt NetworkRangeGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _NetworkRange NetworkRange - -// NewNetworkRange instantiates a new NetworkRange 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkRange(prefix NetworkRangeGetPrefixArgType) *NetworkRange { - this := NetworkRange{} - setNetworkRangeGetPrefixAttributeType(&this.Prefix, prefix) - return &this -} - -// NewNetworkRangeWithDefaults instantiates a new NetworkRange 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkRangeWithDefaults() *NetworkRange { - this := NetworkRange{} - 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 *NetworkRange) GetCreatedAt() (res NetworkRangeGetCreatedAtRetType) { - 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 *NetworkRange) GetCreatedAtOk() (ret NetworkRangeGetCreatedAtRetType, ok bool) { - return getNetworkRangeGetCreatedAtAttributeTypeOk(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 *NetworkRange) 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 *NetworkRange) SetCreatedAt(v NetworkRangeGetCreatedAtRetType) { - setNetworkRangeGetCreatedAtAttributeType(&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 *NetworkRange) GetId() (res NetworkRangeGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *NetworkRange) GetIdOk() (ret NetworkRangeGetIdRetType, ok bool) { - return getNetworkRangeGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *NetworkRange) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkRange) SetId(v NetworkRangeGetIdRetType) { - setNetworkRangeGetIdAttributeType(&o.Id, v) -} - -// GetPrefix returns the Prefix field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkRange) GetPrefix() (ret NetworkRangeGetPrefixRetType) { - ret, _ = o.GetPrefixOk() - return ret -} - -// GetPrefixOk returns a tuple with the Prefix field value -// 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 *NetworkRange) GetPrefixOk() (ret NetworkRangeGetPrefixRetType, ok bool) { - return getNetworkRangeGetPrefixAttributeTypeOk(o.Prefix) -} - -// SetPrefix sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkRange) SetPrefix(v NetworkRangeGetPrefixRetType) { - setNetworkRangeGetPrefixAttributeType(&o.Prefix, 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 *NetworkRange) GetUpdatedAt() (res NetworkRangeGetUpdatedAtRetType) { - 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 *NetworkRange) GetUpdatedAtOk() (ret NetworkRangeGetUpdatedAtRetType, ok bool) { - return getNetworkRangeGetUpdatedAtAttributeTypeOk(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 *NetworkRange) 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 *NetworkRange) SetUpdatedAt(v NetworkRangeGetUpdatedAtRetType) { - setNetworkRangeGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NetworkRange) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkRangeGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getNetworkRangeGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getNetworkRangeGetPrefixAttributeTypeOk(o.Prefix); ok { - toSerialize["Prefix"] = val - } - if val, ok := getNetworkRangeGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetworkRange struct { - value *NetworkRange - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetworkRange) Get() *NetworkRange { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetworkRange) Set(val *NetworkRange) { - 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 NullableNetworkRange) 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 *NullableNetworkRange) 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 NewNullableNetworkRange(val *NetworkRange) *NullableNetworkRange { - return &NullableNetworkRange{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 NullableNetworkRange) 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 *NullableNetworkRange) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_network_range_list_response.go b/services/iaas/model_network_range_list_response.go deleted file mode 100644 index fd2ee376be..0000000000 --- a/services/iaas/model_network_range_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NetworkRangeListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkRangeListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeListResponseGetItemsAttributeType = *[]NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeListResponseGetItemsArgType = []NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeListResponseGetItemsRetType = []NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkRangeListResponseGetItemsAttributeTypeOk(arg NetworkRangeListResponseGetItemsAttributeType) (ret NetworkRangeListResponseGetItemsRetType, 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 setNetworkRangeListResponseGetItemsAttributeType(arg *NetworkRangeListResponseGetItemsAttributeType, val NetworkRangeListResponseGetItemsRetType) { - *arg = &val -} - -// NetworkRangeListResponse Network Range list response of a network area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRangeListResponse struct { - // A list of network area network ranges. - // REQUIRED - Items NetworkRangeListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _NetworkRangeListResponse NetworkRangeListResponse - -// NewNetworkRangeListResponse instantiates a new NetworkRangeListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkRangeListResponse(items NetworkRangeListResponseGetItemsArgType) *NetworkRangeListResponse { - this := NetworkRangeListResponse{} - setNetworkRangeListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewNetworkRangeListResponseWithDefaults instantiates a new NetworkRangeListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNetworkRangeListResponseWithDefaults() *NetworkRangeListResponse { - this := NetworkRangeListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkRangeListResponse) GetItems() (ret NetworkRangeListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *NetworkRangeListResponse) GetItemsOk() (ret NetworkRangeListResponseGetItemsRetType, ok bool) { - return getNetworkRangeListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NetworkRangeListResponse) SetItems(v NetworkRangeListResponseGetItemsRetType) { - setNetworkRangeListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NetworkRangeListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkRangeListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetworkRangeListResponse struct { - value *NetworkRangeListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetworkRangeListResponse) Get() *NetworkRangeListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetworkRangeListResponse) Set(val *NetworkRangeListResponse) { - 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 NullableNetworkRangeListResponse) 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 *NullableNetworkRangeListResponse) 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 NewNullableNetworkRangeListResponse(val *NetworkRangeListResponse) *NullableNetworkRangeListResponse { - return &NullableNetworkRangeListResponse{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 NullableNetworkRangeListResponse) 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 *NullableNetworkRangeListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_network_range_list_response_test.go b/services/iaas/model_network_range_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_network_range_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_network_range_test.go b/services/iaas/model_network_range_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_network_range_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_network_test.go b/services/iaas/model_network_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_network_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_nexthop_blackhole.go b/services/iaas/model_nexthop_blackhole.go deleted file mode 100644 index 506547cbd8..0000000000 --- a/services/iaas/model_nexthop_blackhole.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NexthopBlackhole type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NexthopBlackhole{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopBlackholeGetTypeAttributeType = *string - -// 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) { - 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 setNexthopBlackholeGetTypeAttributeType(arg *NexthopBlackholeGetTypeAttributeType, val NexthopBlackholeGetTypeRetType) { - *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 { - // REQUIRED - Type NexthopBlackholeGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNexthopBlackhole(types NexthopBlackholeGetTypeArgType) *NexthopBlackhole { - this := NexthopBlackhole{} - setNexthopBlackholeGetTypeAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNexthopBlackholeWithDefaults() *NexthopBlackhole { - this := NexthopBlackhole{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopBlackhole) GetType() (ret NexthopBlackholeGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *NexthopBlackhole) GetTypeOk() (ret NexthopBlackholeGetTypeRetType, ok bool) { - return getNexthopBlackholeGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopBlackhole) SetType(v NexthopBlackholeGetTypeRetType) { - setNexthopBlackholeGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NexthopBlackhole) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNexthopBlackholeGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNexthopBlackhole struct { - value *NexthopBlackhole - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNexthopBlackhole) Get() *NexthopBlackhole { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNexthopBlackhole) Set(val *NexthopBlackhole) { - 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 NullableNexthopBlackhole) 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 *NullableNexthopBlackhole) 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 NewNullableNexthopBlackhole(val *NexthopBlackhole) *NullableNexthopBlackhole { - return &NullableNexthopBlackhole{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 NullableNexthopBlackhole) 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 *NullableNexthopBlackhole) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_nexthop_blackhole_test.go b/services/iaas/model_nexthop_blackhole_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_nexthop_blackhole_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_nexthop_internet.go b/services/iaas/model_nexthop_internet.go deleted file mode 100644 index 50edd59bbd..0000000000 --- a/services/iaas/model_nexthop_internet.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NexthopInternet type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NexthopInternet{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopInternetGetTypeAttributeType = *string - -// 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) { - 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 setNexthopInternetGetTypeAttributeType(arg *NexthopInternetGetTypeAttributeType, val NexthopInternetGetTypeRetType) { - *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 { - // REQUIRED - Type NexthopInternetGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNexthopInternet(types NexthopInternetGetTypeArgType) *NexthopInternet { - this := NexthopInternet{} - setNexthopInternetGetTypeAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNexthopInternetWithDefaults() *NexthopInternet { - this := NexthopInternet{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopInternet) GetType() (ret NexthopInternetGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *NexthopInternet) GetTypeOk() (ret NexthopInternetGetTypeRetType, ok bool) { - return getNexthopInternetGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopInternet) SetType(v NexthopInternetGetTypeRetType) { - setNexthopInternetGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NexthopInternet) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNexthopInternetGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNexthopInternet struct { - value *NexthopInternet - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNexthopInternet) Get() *NexthopInternet { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNexthopInternet) Set(val *NexthopInternet) { - 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 NullableNexthopInternet) 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 *NullableNexthopInternet) 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 NewNullableNexthopInternet(val *NexthopInternet) *NullableNexthopInternet { - return &NullableNexthopInternet{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 NullableNexthopInternet) 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 *NullableNexthopInternet) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_nexthop_internet_test.go b/services/iaas/model_nexthop_internet_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_nexthop_internet_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_nexthop_ipv4.go b/services/iaas/model_nexthop_ipv4.go deleted file mode 100644 index 0a2a28f54f..0000000000 --- a/services/iaas/model_nexthop_ipv4.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NexthopIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NexthopIPv4{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv4GetTypeAttributeType = *string - -// 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) { - 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 setNexthopIPv4GetTypeAttributeType(arg *NexthopIPv4GetTypeAttributeType, val NexthopIPv4GetTypeRetType) { - *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 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv4GetValueAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNexthopIPv4GetValueAttributeTypeOk(arg NexthopIPv4GetValueAttributeType) (ret NexthopIPv4GetValueRetType, 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 setNexthopIPv4GetValueAttributeType(arg *NexthopIPv4GetValueAttributeType, val NexthopIPv4GetValueRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv4GetValueArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv4GetValueRetType = string - -// NexthopIPv4 Object that represents an IPv4 address. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv4 struct { - // REQUIRED - Type NexthopIPv4GetTypeAttributeType `json:"type" required:"true"` - // An IPv4 address. - // REQUIRED - Value NexthopIPv4GetValueAttributeType `json:"value" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNexthopIPv4(types NexthopIPv4GetTypeArgType, value NexthopIPv4GetValueArgType) *NexthopIPv4 { - this := NexthopIPv4{} - setNexthopIPv4GetTypeAttributeType(&this.Type, types) - setNexthopIPv4GetValueAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNexthopIPv4WithDefaults() *NexthopIPv4 { - this := NexthopIPv4{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopIPv4) GetType() (ret NexthopIPv4GetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *NexthopIPv4) GetTypeOk() (ret NexthopIPv4GetTypeRetType, ok bool) { - return getNexthopIPv4GetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopIPv4) SetType(v NexthopIPv4GetTypeRetType) { - setNexthopIPv4GetTypeAttributeType(&o.Type, v) -} - -// GetValue returns the Value field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopIPv4) GetValue() (ret NexthopIPv4GetValueRetType) { - ret, _ = o.GetValueOk() - return ret -} - -// GetValueOk returns a tuple with the Value field value -// 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 *NexthopIPv4) GetValueOk() (ret NexthopIPv4GetValueRetType, ok bool) { - return getNexthopIPv4GetValueAttributeTypeOk(o.Value) -} - -// SetValue sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopIPv4) SetValue(v NexthopIPv4GetValueRetType) { - setNexthopIPv4GetValueAttributeType(&o.Value, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NexthopIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNexthopIPv4GetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - if val, ok := getNexthopIPv4GetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNexthopIPv4 struct { - value *NexthopIPv4 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNexthopIPv4) Get() *NexthopIPv4 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNexthopIPv4) Set(val *NexthopIPv4) { - 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 NullableNexthopIPv4) 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 *NullableNexthopIPv4) 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 NewNullableNexthopIPv4(val *NexthopIPv4) *NullableNexthopIPv4 { - return &NullableNexthopIPv4{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 NullableNexthopIPv4) 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 *NullableNexthopIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_nexthop_ipv4_test.go b/services/iaas/model_nexthop_ipv4_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_nexthop_ipv4_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_nexthop_ipv6.go b/services/iaas/model_nexthop_ipv6.go deleted file mode 100644 index a66290df00..0000000000 --- a/services/iaas/model_nexthop_ipv6.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NexthopIPv6 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NexthopIPv6{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv6GetTypeAttributeType = *string - -// 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) { - 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 setNexthopIPv6GetTypeAttributeType(arg *NexthopIPv6GetTypeAttributeType, val NexthopIPv6GetTypeRetType) { - *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 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv6GetValueAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNexthopIPv6GetValueAttributeTypeOk(arg NexthopIPv6GetValueAttributeType) (ret NexthopIPv6GetValueRetType, 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 setNexthopIPv6GetValueAttributeType(arg *NexthopIPv6GetValueAttributeType, val NexthopIPv6GetValueRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv6GetValueArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv6GetValueRetType = string - -// NexthopIPv6 Object that represents an IPv6 address. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NexthopIPv6 struct { - // REQUIRED - Type NexthopIPv6GetTypeAttributeType `json:"type" required:"true"` - // An IPv6 address. - // REQUIRED - Value NexthopIPv6GetValueAttributeType `json:"value" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNexthopIPv6(types NexthopIPv6GetTypeArgType, value NexthopIPv6GetValueArgType) *NexthopIPv6 { - this := NexthopIPv6{} - setNexthopIPv6GetTypeAttributeType(&this.Type, types) - setNexthopIPv6GetValueAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNexthopIPv6WithDefaults() *NexthopIPv6 { - this := NexthopIPv6{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopIPv6) GetType() (ret NexthopIPv6GetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *NexthopIPv6) GetTypeOk() (ret NexthopIPv6GetTypeRetType, ok bool) { - return getNexthopIPv6GetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopIPv6) SetType(v NexthopIPv6GetTypeRetType) { - setNexthopIPv6GetTypeAttributeType(&o.Type, v) -} - -// GetValue returns the Value field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopIPv6) GetValue() (ret NexthopIPv6GetValueRetType) { - ret, _ = o.GetValueOk() - return ret -} - -// GetValueOk returns a tuple with the Value field value -// 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 *NexthopIPv6) GetValueOk() (ret NexthopIPv6GetValueRetType, ok bool) { - return getNexthopIPv6GetValueAttributeTypeOk(o.Value) -} - -// SetValue sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NexthopIPv6) SetValue(v NexthopIPv6GetValueRetType) { - setNexthopIPv6GetValueAttributeType(&o.Value, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NexthopIPv6) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNexthopIPv6GetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - if val, ok := getNexthopIPv6GetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNexthopIPv6 struct { - value *NexthopIPv6 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNexthopIPv6) Get() *NexthopIPv6 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNexthopIPv6) Set(val *NexthopIPv6) { - 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 NullableNexthopIPv6) 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 *NullableNexthopIPv6) 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 NewNullableNexthopIPv6(val *NexthopIPv6) *NullableNexthopIPv6 { - return &NullableNexthopIPv6{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 NullableNexthopIPv6) 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 *NullableNexthopIPv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_nexthop_ipv6_test.go b/services/iaas/model_nexthop_ipv6_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_nexthop_ipv6_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_nic.go b/services/iaas/model_nic.go deleted file mode 100644 index a1676a331e..0000000000 --- a/services/iaas/model_nic.go +++ /dev/null @@ -1,921 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NIC type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NIC{} - -/* - types and functions for allowedAddresses -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetAllowedAddressesAttributeType = *[]AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetAllowedAddressesArgType = []AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetAllowedAddressesRetType = []AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetAllowedAddressesAttributeTypeOk(arg NICGetAllowedAddressesAttributeType) (ret NICGetAllowedAddressesRetType, 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 setNICGetAllowedAddressesAttributeType(arg *NICGetAllowedAddressesAttributeType, val NICGetAllowedAddressesRetType) { - *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 NICGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetDescriptionAttributeTypeOk(arg NICGetDescriptionAttributeType) (ret NICGetDescriptionRetType, 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 setNICGetDescriptionAttributeType(arg *NICGetDescriptionAttributeType, val NICGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetDescriptionRetType = string - -/* - types and functions for device -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetDeviceAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetDeviceAttributeTypeOk(arg NICGetDeviceAttributeType) (ret NICGetDeviceRetType, 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 setNICGetDeviceAttributeType(arg *NICGetDeviceAttributeType, val NICGetDeviceRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetDeviceArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetDeviceRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetIdAttributeTypeOk(arg NICGetIdAttributeType) (ret NICGetIdRetType, 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 setNICGetIdAttributeType(arg *NICGetIdAttributeType, val NICGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIdRetType = string - -/* - types and functions for ipv4 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIpv4AttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetIpv4AttributeTypeOk(arg NICGetIpv4AttributeType) (ret NICGetIpv4RetType, 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 setNICGetIpv4AttributeType(arg *NICGetIpv4AttributeType, val NICGetIpv4RetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIpv4ArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIpv4RetType = string - -/* - types and functions for ipv6 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIpv6AttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetIpv6AttributeTypeOk(arg NICGetIpv6AttributeType) (ret NICGetIpv6RetType, 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 setNICGetIpv6AttributeType(arg *NICGetIpv6AttributeType, val NICGetIpv6RetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIpv6ArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetIpv6RetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetLabelsAttributeTypeOk(arg NICGetLabelsAttributeType) (ret NICGetLabelsRetType, 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 setNICGetLabelsAttributeType(arg *NICGetLabelsAttributeType, val NICGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for mac -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetMacAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetMacAttributeTypeOk(arg NICGetMacAttributeType) (ret NICGetMacRetType, 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 setNICGetMacAttributeType(arg *NICGetMacAttributeType, val NICGetMacRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetMacArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetMacRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetNameAttributeTypeOk(arg NICGetNameAttributeType) (ret NICGetNameRetType, 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 setNICGetNameAttributeType(arg *NICGetNameAttributeType, val NICGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetNameRetType = string - -/* - types and functions for networkId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetNetworkIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetNetworkIdAttributeTypeOk(arg NICGetNetworkIdAttributeType) (ret NICGetNetworkIdRetType, 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 setNICGetNetworkIdAttributeType(arg *NICGetNetworkIdAttributeType, val NICGetNetworkIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetNetworkIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetNetworkIdRetType = string - -/* - types and functions for nicSecurity -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICgetNicSecurityAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICgetNicSecurityArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICgetNicSecurityRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICgetNicSecurityAttributeTypeOk(arg NICgetNicSecurityAttributeType) (ret NICgetNicSecurityRetType, 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 setNICgetNicSecurityAttributeType(arg *NICgetNicSecurityAttributeType, val NICgetNicSecurityRetType) { - *arg = &val -} - -/* - types and functions for securityGroups -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetSecurityGroupsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetSecurityGroupsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetSecurityGroupsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetSecurityGroupsAttributeTypeOk(arg NICGetSecurityGroupsAttributeType) (ret NICGetSecurityGroupsRetType, 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 setNICGetSecurityGroupsAttributeType(arg *NICGetSecurityGroupsAttributeType, val NICGetSecurityGroupsRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetStatusAttributeTypeOk(arg NICGetStatusAttributeType) (ret NICGetStatusRetType, 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 setNICGetStatusAttributeType(arg *NICGetStatusAttributeType, val NICGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetStatusRetType = string - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICGetTypeAttributeTypeOk(arg NICGetTypeAttributeType) (ret NICGetTypeRetType, 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 setNICGetTypeAttributeType(arg *NICGetTypeAttributeType, val NICGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 - -// 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"` - // Description Object. Allows string up to 255 Characters. - Description NICGetDescriptionAttributeType `json:"description,omitempty"` - // Universally Unique Identifier (UUID). - Device NICGetDeviceAttributeType `json:"device,omitempty"` - // Universally Unique Identifier (UUID). - Id NICGetIdAttributeType `json:"id,omitempty"` - // Object that represents an IP address. - 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. - Labels NICGetLabelsAttributeType `json:"labels,omitempty"` - // Object that represents an MAC address. - Mac NICGetMacAttributeType `json:"mac,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name NICGetNameAttributeType `json:"name,omitempty"` - // Universally Unique Identifier (UUID). - NetworkId NICGetNetworkIdAttributeType `json:"networkId,omitempty"` - // If this is set to false, then no security groups will apply to this network interface. - NicSecurity NICgetNicSecurityAttributeType `json:"nicSecurity,omitempty"` - // A list of UUIDs. - SecurityGroups NICGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"` - // Possible values: `ACTIVE`, `DOWN`. - Status NICGetStatusAttributeType `json:"status,omitempty"` - // Possible values: `server`, `metadata`, `gateway`, `none`. - Type NICGetTypeAttributeType `json:"type,omitempty"` -} - -// NewNIC instantiates a new NIC 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNIC() *NIC { - this := NIC{} - return &this -} - -// NewNICWithDefaults instantiates a new NIC 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNICWithDefaults() *NIC { - this := NIC{} - var nicSecurity bool = true - this.NicSecurity = &nicSecurity - return &this -} - -// GetAllowedAddresses returns the AllowedAddresses 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) GetAllowedAddresses() (res NICGetAllowedAddressesRetType) { - res, _ = o.GetAllowedAddressesOk() - return -} - -// GetAllowedAddressesOk returns a tuple with the AllowedAddresses 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) GetAllowedAddressesOk() (ret NICGetAllowedAddressesRetType, ok bool) { - return getNICGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses) -} - -// HasAllowedAddresses 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) HasAllowedAddresses() bool { - _, ok := o.GetAllowedAddressesOk() - return ok -} - -// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetAllowedAddresses(v NICGetAllowedAddressesRetType) { - setNICGetAllowedAddressesAttributeType(&o.AllowedAddresses, 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) { - 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 *NIC) GetDescriptionOk() (ret NICGetDescriptionRetType, ok bool) { - return getNICGetDescriptionAttributeTypeOk(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 *NIC) 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 *NIC) SetDescription(v NICGetDescriptionRetType) { - setNICGetDescriptionAttributeType(&o.Description, v) -} - -// GetDevice returns the Device 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) GetDevice() (res NICGetDeviceRetType) { - res, _ = o.GetDeviceOk() - return -} - -// GetDeviceOk returns a tuple with the Device 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) GetDeviceOk() (ret NICGetDeviceRetType, ok bool) { - return getNICGetDeviceAttributeTypeOk(o.Device) -} - -// HasDevice 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) HasDevice() bool { - _, ok := o.GetDeviceOk() - return ok -} - -// SetDevice gets a reference to the given string and assigns it to the Device field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetDevice(v NICGetDeviceRetType) { - setNICGetDeviceAttributeType(&o.Device, 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 *NIC) GetId() (res NICGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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) GetIdOk() (ret NICGetIdRetType, ok bool) { - return getNICGetIdAttributeTypeOk(o.Id) -} - -// HasId 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) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetId(v NICGetIdRetType) { - setNICGetIdAttributeType(&o.Id, 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 *NIC) GetIpv4() (res NICGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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) GetIpv4Ok() (ret NICGetIpv4RetType, ok bool) { - return getNICGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given string and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetIpv4(v NICGetIpv4RetType) { - setNICGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetIpv6 returns the Ipv6 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) GetIpv6() (res NICGetIpv6RetType) { - res, _ = o.GetIpv6Ok() - return -} - -// GetIpv6Ok returns a tuple with the Ipv6 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) GetIpv6Ok() (ret NICGetIpv6RetType, ok bool) { - return getNICGetIpv6AttributeTypeOk(o.Ipv6) -} - -// HasIpv6 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) HasIpv6() bool { - _, ok := o.GetIpv6Ok() - return ok -} - -// SetIpv6 gets a reference to the given string and assigns it to the Ipv6 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetIpv6(v NICGetIpv6RetType) { - setNICGetIpv6AttributeType(&o.Ipv6, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) GetLabels() (res NICGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) GetLabelsOk() (ret NICGetLabelsRetType, ok bool) { - return getNICGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetLabels(v NICGetLabelsRetType) { - setNICGetLabelsAttributeType(&o.Labels, v) -} - -// GetMac returns the Mac 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) GetMac() (res NICGetMacRetType) { - res, _ = o.GetMacOk() - return -} - -// GetMacOk returns a tuple with the Mac 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) GetMacOk() (ret NICGetMacRetType, ok bool) { - return getNICGetMacAttributeTypeOk(o.Mac) -} - -// HasMac 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) HasMac() bool { - _, ok := o.GetMacOk() - return ok -} - -// SetMac gets a reference to the given string and assigns it to the Mac field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetMac(v NICGetMacRetType) { - setNICGetMacAttributeType(&o.Mac, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) GetName() (res NICGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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) GetNameOk() (ret NICGetNameRetType, ok bool) { - return getNICGetNameAttributeTypeOk(o.Name) -} - -// HasName 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) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetName(v NICGetNameRetType) { - setNICGetNameAttributeType(&o.Name, v) -} - -// GetNetworkId returns the NetworkId 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) GetNetworkId() (res NICGetNetworkIdRetType) { - res, _ = o.GetNetworkIdOk() - return -} - -// GetNetworkIdOk returns a tuple with the NetworkId 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) GetNetworkIdOk() (ret NICGetNetworkIdRetType, ok bool) { - return getNICGetNetworkIdAttributeTypeOk(o.NetworkId) -} - -// HasNetworkId 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) HasNetworkId() bool { - _, ok := o.GetNetworkIdOk() - return ok -} - -// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetNetworkId(v NICGetNetworkIdRetType) { - setNICGetNetworkIdAttributeType(&o.NetworkId, v) -} - -// GetNicSecurity returns the NicSecurity 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) GetNicSecurity() (res NICgetNicSecurityRetType) { - res, _ = o.GetNicSecurityOk() - return -} - -// GetNicSecurityOk returns a tuple with the NicSecurity 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) GetNicSecurityOk() (ret NICgetNicSecurityRetType, ok bool) { - return getNICgetNicSecurityAttributeTypeOk(o.NicSecurity) -} - -// HasNicSecurity 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) HasNicSecurity() bool { - _, ok := o.GetNicSecurityOk() - return ok -} - -// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetNicSecurity(v NICgetNicSecurityRetType) { - setNICgetNicSecurityAttributeType(&o.NicSecurity, v) -} - -// GetSecurityGroups returns the SecurityGroups 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) GetSecurityGroups() (res NICGetSecurityGroupsRetType) { - res, _ = o.GetSecurityGroupsOk() - return -} - -// GetSecurityGroupsOk returns a tuple with the SecurityGroups 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) GetSecurityGroupsOk() (ret NICGetSecurityGroupsRetType, ok bool) { - return getNICGetSecurityGroupsAttributeTypeOk(o.SecurityGroups) -} - -// HasSecurityGroups 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) HasSecurityGroups() bool { - _, ok := o.GetSecurityGroupsOk() - return ok -} - -// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetSecurityGroups(v NICGetSecurityGroupsRetType) { - setNICGetSecurityGroupsAttributeType(&o.SecurityGroups, v) -} - -// GetStatus returns the Status 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) GetStatus() (res NICGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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) GetStatusOk() (ret NICGetStatusRetType, ok bool) { - return getNICGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetStatus(v NICGetStatusRetType) { - setNICGetStatusAttributeType(&o.Status, v) -} - -// GetType returns the Type 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) GetType() (res NICGetTypeRetType) { - res, _ = o.GetTypeOk() - return -} - -// GetTypeOk returns a tuple with the Type 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) GetTypeOk() (ret NICGetTypeRetType, ok bool) { - return getNICGetTypeAttributeTypeOk(o.Type) -} - -// HasType 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) HasType() bool { - _, ok := o.GetTypeOk() - return ok -} - -// SetType gets a reference to the given string and assigns it to the Type field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NIC) SetType(v NICGetTypeRetType) { - setNICGetTypeAttributeType(&o.Type, 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 := getNICGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getNICGetDeviceAttributeTypeOk(o.Device); ok { - toSerialize["Device"] = val - } - if val, ok := getNICGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getNICGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getNICGetIpv6AttributeTypeOk(o.Ipv6); ok { - toSerialize["Ipv6"] = val - } - if val, ok := getNICGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getNICGetMacAttributeTypeOk(o.Mac); ok { - toSerialize["Mac"] = val - } - if val, ok := getNICGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getNICGetNetworkIdAttributeTypeOk(o.NetworkId); ok { - toSerialize["NetworkId"] = val - } - if val, ok := getNICgetNicSecurityAttributeTypeOk(o.NicSecurity); ok { - toSerialize["NicSecurity"] = val - } - if val, ok := getNICGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok { - toSerialize["SecurityGroups"] = val - } - if val, ok := getNICGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getNICGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNIC struct { - value *NIC - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNIC) Get() *NIC { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNIC) Set(val *NIC) { - 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 NullableNIC) 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 *NullableNIC) 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 NewNullableNIC(val *NIC) *NullableNIC { - return &NullableNIC{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 NullableNIC) 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 *NullableNIC) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_nic_list_response.go b/services/iaas/model_nic_list_response.go deleted file mode 100644 index 49790d5c8a..0000000000 --- a/services/iaas/model_nic_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the NICListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NICListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICListResponseGetItemsAttributeType = *[]NIC - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICListResponseGetItemsArgType = []NIC - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICListResponseGetItemsRetType = []NIC - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNICListResponseGetItemsAttributeTypeOk(arg NICListResponseGetItemsAttributeType) (ret NICListResponseGetItemsRetType, 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 setNICListResponseGetItemsAttributeType(arg *NICListResponseGetItemsAttributeType, val NICListResponseGetItemsRetType) { - *arg = &val -} - -// NICListResponse NIC list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NICListResponse struct { - // A list of network interfaces. - // REQUIRED - Items NICListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _NICListResponse NICListResponse - -// NewNICListResponse instantiates a new NICListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNICListResponse(items NICListResponseGetItemsArgType) *NICListResponse { - this := NICListResponse{} - setNICListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewNICListResponseWithDefaults instantiates a new NICListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNICListResponseWithDefaults() *NICListResponse { - this := NICListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NICListResponse) GetItems() (ret NICListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *NICListResponse) GetItemsOk() (ret NICListResponseGetItemsRetType, ok bool) { - return getNICListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NICListResponse) SetItems(v NICListResponseGetItemsRetType) { - setNICListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NICListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNICListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNICListResponse struct { - value *NICListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNICListResponse) Get() *NICListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNICListResponse) Set(val *NICListResponse) { - 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 NullableNICListResponse) 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 *NullableNICListResponse) 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 NewNullableNICListResponse(val *NICListResponse) *NullableNICListResponse { - return &NullableNICListResponse{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 NullableNICListResponse) 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 *NullableNICListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_nic_list_response_test.go b/services/iaas/model_nic_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_nic_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_nic_test.go b/services/iaas/model_nic_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_nic_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_partial_update_network_area_payload.go b/services/iaas/model_partial_update_network_area_payload.go deleted file mode 100644 index 4b162fed3b..0000000000 --- a/services/iaas/model_partial_update_network_area_payload.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the PartialUpdateNetworkAreaPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PartialUpdateNetworkAreaPayload{} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkAreaPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkAreaPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkAreaPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkAreaPayloadGetLabelsAttributeTypeOk(arg PartialUpdateNetworkAreaPayloadGetLabelsAttributeType) (ret PartialUpdateNetworkAreaPayloadGetLabelsRetType, 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 setPartialUpdateNetworkAreaPayloadGetLabelsAttributeType(arg *PartialUpdateNetworkAreaPayloadGetLabelsAttributeType, val PartialUpdateNetworkAreaPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkAreaPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkAreaPayloadGetNameAttributeTypeOk(arg PartialUpdateNetworkAreaPayloadGetNameAttributeType) (ret PartialUpdateNetworkAreaPayloadGetNameRetType, 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 setPartialUpdateNetworkAreaPayloadGetNameAttributeType(arg *PartialUpdateNetworkAreaPayloadGetNameAttributeType, val PartialUpdateNetworkAreaPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkAreaPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. - Labels PartialUpdateNetworkAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"` - Name PartialUpdateNetworkAreaPayloadGetNameAttributeType `json:"name,omitempty"` -} - -// NewPartialUpdateNetworkAreaPayload instantiates a new PartialUpdateNetworkAreaPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPartialUpdateNetworkAreaPayload() *PartialUpdateNetworkAreaPayload { - this := PartialUpdateNetworkAreaPayload{} - return &this -} - -// NewPartialUpdateNetworkAreaPayloadWithDefaults instantiates a new PartialUpdateNetworkAreaPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPartialUpdateNetworkAreaPayloadWithDefaults() *PartialUpdateNetworkAreaPayload { - this := PartialUpdateNetworkAreaPayload{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkAreaPayload) GetLabels() (res PartialUpdateNetworkAreaPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkAreaPayload) GetLabelsOk() (ret PartialUpdateNetworkAreaPayloadGetLabelsRetType, ok bool) { - return getPartialUpdateNetworkAreaPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkAreaPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkAreaPayload) SetLabels(v PartialUpdateNetworkAreaPayloadGetLabelsRetType) { - setPartialUpdateNetworkAreaPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkAreaPayload) GetName() (res PartialUpdateNetworkAreaPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *PartialUpdateNetworkAreaPayload) GetNameOk() (ret PartialUpdateNetworkAreaPayloadGetNameRetType, ok bool) { - return getPartialUpdateNetworkAreaPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *PartialUpdateNetworkAreaPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkAreaPayload) SetName(v PartialUpdateNetworkAreaPayloadGetNameRetType) { - setPartialUpdateNetworkAreaPayloadGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PartialUpdateNetworkAreaPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPartialUpdateNetworkAreaPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getPartialUpdateNetworkAreaPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePartialUpdateNetworkAreaPayload struct { - value *PartialUpdateNetworkAreaPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePartialUpdateNetworkAreaPayload) Get() *PartialUpdateNetworkAreaPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePartialUpdateNetworkAreaPayload) Set(val *PartialUpdateNetworkAreaPayload) { - 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 NullablePartialUpdateNetworkAreaPayload) 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 *NullablePartialUpdateNetworkAreaPayload) 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 NewNullablePartialUpdateNetworkAreaPayload(val *PartialUpdateNetworkAreaPayload) *NullablePartialUpdateNetworkAreaPayload { - return &NullablePartialUpdateNetworkAreaPayload{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 NullablePartialUpdateNetworkAreaPayload) 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 *NullablePartialUpdateNetworkAreaPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_partial_update_network_area_payload_test.go b/services/iaas/model_partial_update_network_area_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_partial_update_network_area_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_partial_update_network_payload.go b/services/iaas/model_partial_update_network_payload.go deleted file mode 100644 index 0101b05c86..0000000000 --- a/services/iaas/model_partial_update_network_payload.go +++ /dev/null @@ -1,504 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the PartialUpdateNetworkPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PartialUpdateNetworkPayload{} - -/* - types and functions for dhcp -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadgetDhcpAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadgetDhcpArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadgetDhcpRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(arg PartialUpdateNetworkPayloadgetDhcpAttributeType) (ret PartialUpdateNetworkPayloadgetDhcpRetType, 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 setPartialUpdateNetworkPayloadgetDhcpAttributeType(arg *PartialUpdateNetworkPayloadgetDhcpAttributeType, val PartialUpdateNetworkPayloadgetDhcpRetType) { - *arg = &val -} - -/* - types and functions for ipv4 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetIpv4AttributeType = *UpdateNetworkIPv4Body - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetIpv4ArgType = UpdateNetworkIPv4Body - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetIpv4RetType = UpdateNetworkIPv4Body - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkPayloadGetIpv4AttributeTypeOk(arg PartialUpdateNetworkPayloadGetIpv4AttributeType) (ret PartialUpdateNetworkPayloadGetIpv4RetType, 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 setPartialUpdateNetworkPayloadGetIpv4AttributeType(arg *PartialUpdateNetworkPayloadGetIpv4AttributeType, val PartialUpdateNetworkPayloadGetIpv4RetType) { - *arg = &val -} - -/* - types and functions for ipv6 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetIpv6AttributeType = *UpdateNetworkIPv6Body - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetIpv6ArgType = UpdateNetworkIPv6Body - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetIpv6RetType = UpdateNetworkIPv6Body - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkPayloadGetIpv6AttributeTypeOk(arg PartialUpdateNetworkPayloadGetIpv6AttributeType) (ret PartialUpdateNetworkPayloadGetIpv6RetType, 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 setPartialUpdateNetworkPayloadGetIpv6AttributeType(arg *PartialUpdateNetworkPayloadGetIpv6AttributeType, val PartialUpdateNetworkPayloadGetIpv6RetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkPayloadGetLabelsAttributeTypeOk(arg PartialUpdateNetworkPayloadGetLabelsAttributeType) (ret PartialUpdateNetworkPayloadGetLabelsRetType, 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 setPartialUpdateNetworkPayloadGetLabelsAttributeType(arg *PartialUpdateNetworkPayloadGetLabelsAttributeType, val PartialUpdateNetworkPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkPayloadGetNameAttributeTypeOk(arg PartialUpdateNetworkPayloadGetNameAttributeType) (ret PartialUpdateNetworkPayloadGetNameRetType, 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 setPartialUpdateNetworkPayloadGetNameAttributeType(arg *PartialUpdateNetworkPayloadGetNameAttributeType, val PartialUpdateNetworkPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetNameRetType = string - -/* - types and functions for routed -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadgetRoutedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadgetRoutedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadgetRoutedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkPayloadgetRoutedAttributeTypeOk(arg PartialUpdateNetworkPayloadgetRoutedAttributeType) (ret PartialUpdateNetworkPayloadgetRoutedRetType, 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 setPartialUpdateNetworkPayloadgetRoutedAttributeType(arg *PartialUpdateNetworkPayloadgetRoutedAttributeType, val PartialUpdateNetworkPayloadgetRoutedRetType) { - *arg = &val -} - -/* - types and functions for routingTableId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetRoutingTableIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateNetworkPayloadGetRoutingTableIdAttributeTypeOk(arg PartialUpdateNetworkPayloadGetRoutingTableIdAttributeType) (ret PartialUpdateNetworkPayloadGetRoutingTableIdRetType, 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 setPartialUpdateNetworkPayloadGetRoutingTableIdAttributeType(arg *PartialUpdateNetworkPayloadGetRoutingTableIdAttributeType, val PartialUpdateNetworkPayloadGetRoutingTableIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateNetworkPayloadGetRoutingTableIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 { - // 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. - Labels PartialUpdateNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name PartialUpdateNetworkPayloadGetNameAttributeType `json:"name,omitempty"` - // Shows if the network is routed and therefore accessible from other networks. - Routed PartialUpdateNetworkPayloadgetRoutedAttributeType `json:"routed,omitempty"` - // Universally Unique Identifier (UUID). - RoutingTableId PartialUpdateNetworkPayloadGetRoutingTableIdAttributeType `json:"routingTableId,omitempty"` -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPartialUpdateNetworkPayloadWithDefaults() *PartialUpdateNetworkPayload { - this := PartialUpdateNetworkPayload{} - return &this -} - -// 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) { - res, _ = o.GetDhcpOk() - return -} - -// GetDhcpOk returns a tuple with the Dhcp 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) GetDhcpOk() (ret PartialUpdateNetworkPayloadgetDhcpRetType, ok bool) { - return getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp) -} - -// HasDhcp 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) HasDhcp() bool { - _, ok := o.GetDhcpOk() - return ok -} - -// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) SetDhcp(v PartialUpdateNetworkPayloadgetDhcpRetType) { - setPartialUpdateNetworkPayloadgetDhcpAttributeType(&o.Dhcp, 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 *PartialUpdateNetworkPayload) GetIpv4() (res PartialUpdateNetworkPayloadGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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) GetIpv4Ok() (ret PartialUpdateNetworkPayloadGetIpv4RetType, ok bool) { - return getPartialUpdateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given UpdateNetworkIPv4Body and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) SetIpv4(v PartialUpdateNetworkPayloadGetIpv4RetType) { - setPartialUpdateNetworkPayloadGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetIpv6 returns the Ipv6 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) GetIpv6() (res PartialUpdateNetworkPayloadGetIpv6RetType) { - res, _ = o.GetIpv6Ok() - return -} - -// GetIpv6Ok returns a tuple with the Ipv6 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) GetIpv6Ok() (ret PartialUpdateNetworkPayloadGetIpv6RetType, ok bool) { - return getPartialUpdateNetworkPayloadGetIpv6AttributeTypeOk(o.Ipv6) -} - -// HasIpv6 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) HasIpv6() bool { - _, ok := o.GetIpv6Ok() - return ok -} - -// SetIpv6 gets a reference to the given UpdateNetworkIPv6Body and assigns it to the Ipv6 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) SetIpv6(v PartialUpdateNetworkPayloadGetIpv6RetType) { - setPartialUpdateNetworkPayloadGetIpv6AttributeType(&o.Ipv6, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) GetLabels() (res PartialUpdateNetworkPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) GetLabelsOk() (ret PartialUpdateNetworkPayloadGetLabelsRetType, ok bool) { - return getPartialUpdateNetworkPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) SetLabels(v PartialUpdateNetworkPayloadGetLabelsRetType) { - setPartialUpdateNetworkPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) GetName() (res PartialUpdateNetworkPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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) GetNameOk() (ret PartialUpdateNetworkPayloadGetNameRetType, ok bool) { - return getPartialUpdateNetworkPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) SetName(v PartialUpdateNetworkPayloadGetNameRetType) { - setPartialUpdateNetworkPayloadGetNameAttributeType(&o.Name, v) -} - -// GetRouted returns the Routed 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) GetRouted() (res PartialUpdateNetworkPayloadgetRoutedRetType) { - res, _ = o.GetRoutedOk() - return -} - -// GetRoutedOk returns a tuple with the Routed 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) GetRoutedOk() (ret PartialUpdateNetworkPayloadgetRoutedRetType, ok bool) { - return getPartialUpdateNetworkPayloadgetRoutedAttributeTypeOk(o.Routed) -} - -// HasRouted 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) HasRouted() bool { - _, ok := o.GetRoutedOk() - return ok -} - -// SetRouted gets a reference to the given bool and assigns it to the Routed field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) SetRouted(v PartialUpdateNetworkPayloadgetRoutedRetType) { - setPartialUpdateNetworkPayloadgetRoutedAttributeType(&o.Routed, v) -} - -// GetRoutingTableId returns the RoutingTableId 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) GetRoutingTableId() (res PartialUpdateNetworkPayloadGetRoutingTableIdRetType) { - res, _ = o.GetRoutingTableIdOk() - return -} - -// GetRoutingTableIdOk returns a tuple with the RoutingTableId 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) GetRoutingTableIdOk() (ret PartialUpdateNetworkPayloadGetRoutingTableIdRetType, ok bool) { - return getPartialUpdateNetworkPayloadGetRoutingTableIdAttributeTypeOk(o.RoutingTableId) -} - -// HasRoutingTableId 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) HasRoutingTableId() bool { - _, ok := o.GetRoutingTableIdOk() - return ok -} - -// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateNetworkPayload) SetRoutingTableId(v PartialUpdateNetworkPayloadGetRoutingTableIdRetType) { - setPartialUpdateNetworkPayloadGetRoutingTableIdAttributeType(&o.RoutingTableId, v) -} - -// 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 := getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok { - toSerialize["Dhcp"] = val - } - if val, ok := getPartialUpdateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getPartialUpdateNetworkPayloadGetIpv6AttributeTypeOk(o.Ipv6); ok { - toSerialize["Ipv6"] = val - } - if val, ok := getPartialUpdateNetworkPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getPartialUpdateNetworkPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getPartialUpdateNetworkPayloadgetRoutedAttributeTypeOk(o.Routed); ok { - toSerialize["Routed"] = val - } - if val, ok := getPartialUpdateNetworkPayloadGetRoutingTableIdAttributeTypeOk(o.RoutingTableId); ok { - toSerialize["RoutingTableId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePartialUpdateNetworkPayload struct { - value *PartialUpdateNetworkPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePartialUpdateNetworkPayload) Get() *PartialUpdateNetworkPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePartialUpdateNetworkPayload) Set(val *PartialUpdateNetworkPayload) { - 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 NullablePartialUpdateNetworkPayload) 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 *NullablePartialUpdateNetworkPayload) 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 NewNullablePartialUpdateNetworkPayload(val *PartialUpdateNetworkPayload) *NullablePartialUpdateNetworkPayload { - return &NullablePartialUpdateNetworkPayload{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 NullablePartialUpdateNetworkPayload) 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 *NullablePartialUpdateNetworkPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_partial_update_network_payload_test.go b/services/iaas/model_partial_update_network_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_partial_update_network_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_port_range.go b/services/iaas/model_port_range.go deleted file mode 100644 index 448a213653..0000000000 --- a/services/iaas/model_port_range.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the PortRange type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PortRange{} - -/* - types and functions for max -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PortRangeGetMaxAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PortRangeGetMaxArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PortRangeGetMaxRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPortRangeGetMaxAttributeTypeOk(arg PortRangeGetMaxAttributeType) (ret PortRangeGetMaxRetType, 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 setPortRangeGetMaxAttributeType(arg *PortRangeGetMaxAttributeType, val PortRangeGetMaxRetType) { - *arg = &val -} - -/* - types and functions for min -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PortRangeGetMinAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PortRangeGetMinArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PortRangeGetMinRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPortRangeGetMinAttributeTypeOk(arg PortRangeGetMinAttributeType) (ret PortRangeGetMinRetType, 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 setPortRangeGetMinAttributeType(arg *PortRangeGetMinAttributeType, val PortRangeGetMinRetType) { - *arg = &val -} - -// PortRange Object that represents a range of ports (this will be omitted if it covers the full default range 0/1-65535). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PortRange struct { - // The maximum port number. Should be greater or equal to the minimum. - // REQUIRED - Max PortRangeGetMaxAttributeType `json:"max" required:"true"` - // The minimum port number. Should be less or equal to the maximum. - // REQUIRED - Min PortRangeGetMinAttributeType `json:"min" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PortRange PortRange - -// NewPortRange instantiates a new PortRange 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPortRange(max PortRangeGetMaxArgType, min PortRangeGetMinArgType) *PortRange { - this := PortRange{} - setPortRangeGetMaxAttributeType(&this.Max, max) - setPortRangeGetMinAttributeType(&this.Min, min) - return &this -} - -// NewPortRangeWithDefaults instantiates a new PortRange 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPortRangeWithDefaults() *PortRange { - this := PortRange{} - return &this -} - -// GetMax returns the Max field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PortRange) GetMax() (ret PortRangeGetMaxRetType) { - ret, _ = o.GetMaxOk() - return ret -} - -// GetMaxOk returns a tuple with the Max field value -// 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 *PortRange) GetMaxOk() (ret PortRangeGetMaxRetType, ok bool) { - return getPortRangeGetMaxAttributeTypeOk(o.Max) -} - -// SetMax sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PortRange) SetMax(v PortRangeGetMaxRetType) { - setPortRangeGetMaxAttributeType(&o.Max, v) -} - -// GetMin returns the Min field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PortRange) GetMin() (ret PortRangeGetMinRetType) { - ret, _ = o.GetMinOk() - return ret -} - -// GetMinOk returns a tuple with the Min field value -// 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 *PortRange) GetMinOk() (ret PortRangeGetMinRetType, ok bool) { - return getPortRangeGetMinAttributeTypeOk(o.Min) -} - -// SetMin sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PortRange) SetMin(v PortRangeGetMinRetType) { - setPortRangeGetMinAttributeType(&o.Min, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PortRange) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPortRangeGetMaxAttributeTypeOk(o.Max); ok { - toSerialize["Max"] = val - } - if val, ok := getPortRangeGetMinAttributeTypeOk(o.Min); ok { - toSerialize["Min"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePortRange struct { - value *PortRange - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePortRange) Get() *PortRange { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePortRange) Set(val *PortRange) { - 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 NullablePortRange) 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 *NullablePortRange) 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 NewNullablePortRange(val *PortRange) *NullablePortRange { - return &NullablePortRange{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 NullablePortRange) 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 *NullablePortRange) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_port_range_test.go b/services/iaas/model_port_range_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_port_range_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_project.go b/services/iaas/model_project.go deleted file mode 100644 index dbf141ace7..0000000000 --- a/services/iaas/model_project.go +++ /dev/null @@ -1,434 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Project type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Project{} - -/* - types and functions for areaId -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetAreaIdAttributeType = *AreaId - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetAreaIdArgType = AreaId - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetAreaIdRetType = AreaId - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProjectGetAreaIdAttributeTypeOk(arg ProjectGetAreaIdAttributeType) (ret ProjectGetAreaIdRetType, 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 setProjectGetAreaIdAttributeType(arg *ProjectGetAreaIdAttributeType, val ProjectGetAreaIdRetType) { - *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 ProjectGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProjectGetCreatedAtAttributeTypeOk(arg ProjectGetCreatedAtAttributeType) (ret ProjectGetCreatedAtRetType, 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 setProjectGetCreatedAtAttributeType(arg *ProjectGetCreatedAtAttributeType, val ProjectGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProjectGetIdAttributeTypeOk(arg ProjectGetIdAttributeType) (ret ProjectGetIdRetType, 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 setProjectGetIdAttributeType(arg *ProjectGetIdAttributeType, val ProjectGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetIdRetType = string - -/* - types and functions for internetAccess -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectgetInternetAccessAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectgetInternetAccessArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectgetInternetAccessRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProjectgetInternetAccessAttributeTypeOk(arg ProjectgetInternetAccessAttributeType) (ret ProjectgetInternetAccessRetType, 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 setProjectgetInternetAccessAttributeType(arg *ProjectgetInternetAccessAttributeType, val ProjectgetInternetAccessRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProjectGetStatusAttributeTypeOk(arg ProjectGetStatusAttributeType) (ret ProjectGetStatusRetType, 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 setProjectGetStatusAttributeType(arg *ProjectGetStatusAttributeType, val ProjectGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetStatusRetType = 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 ProjectGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProjectGetUpdatedAtAttributeTypeOk(arg ProjectGetUpdatedAtAttributeType) (ret ProjectGetUpdatedAtRetType, 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 setProjectGetUpdatedAtAttributeType(arg *ProjectGetUpdatedAtAttributeType, val ProjectGetUpdatedAtRetType) { - *arg = &val -} - -// 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 { - // REQUIRED - AreaId ProjectGetAreaIdAttributeType `json:"areaId" required:"true"` - // Date-time when resource was created. - CreatedAt ProjectGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Universally Unique Identifier (UUID). - // REQUIRED - Id ProjectGetIdAttributeType `json:"id" required:"true"` - InternetAccess ProjectgetInternetAccessAttributeType `json:"internetAccess,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"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Project Project - -// NewProject instantiates a new Project 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewProject(areaId ProjectGetAreaIdArgType, id ProjectGetIdArgType, status ProjectGetStatusArgType) *Project { - this := Project{} - setProjectGetAreaIdAttributeType(&this.AreaId, areaId) - setProjectGetIdAttributeType(&this.Id, id) - setProjectGetStatusAttributeType(&this.Status, status) - return &this -} - -// NewProjectWithDefaults instantiates a new Project 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewProjectWithDefaults() *Project { - this := Project{} - return &this -} - -// GetAreaId returns the AreaId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Project) GetAreaId() (ret ProjectGetAreaIdRetType) { - ret, _ = o.GetAreaIdOk() - return ret -} - -// GetAreaIdOk returns a tuple with the AreaId field value -// 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) GetAreaIdOk() (ret ProjectGetAreaIdRetType, ok bool) { - return getProjectGetAreaIdAttributeTypeOk(o.AreaId) -} - -// SetAreaId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Project) SetAreaId(v ProjectGetAreaIdRetType) { - setProjectGetAreaIdAttributeType(&o.AreaId, 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 *Project) GetCreatedAt() (res ProjectGetCreatedAtRetType) { - 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 *Project) GetCreatedAtOk() (ret ProjectGetCreatedAtRetType, ok bool) { - return getProjectGetCreatedAtAttributeTypeOk(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 *Project) 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 *Project) SetCreatedAt(v ProjectGetCreatedAtRetType) { - setProjectGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Project) GetId() (ret ProjectGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// 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) GetIdOk() (ret ProjectGetIdRetType, ok bool) { - return getProjectGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Project) SetId(v ProjectGetIdRetType) { - setProjectGetIdAttributeType(&o.Id, v) -} - -// GetInternetAccess returns the InternetAccess 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) GetInternetAccess() (res ProjectgetInternetAccessRetType) { - res, _ = o.GetInternetAccessOk() - return -} - -// GetInternetAccessOk returns a tuple with the InternetAccess 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) GetInternetAccessOk() (ret ProjectgetInternetAccessRetType, ok bool) { - return getProjectgetInternetAccessAttributeTypeOk(o.InternetAccess) -} - -// HasInternetAccess 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) HasInternetAccess() bool { - _, ok := o.GetInternetAccessOk() - return ok -} - -// SetInternetAccess gets a reference to the given bool and assigns it to the InternetAccess field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Project) SetInternetAccess(v ProjectgetInternetAccessRetType) { - setProjectgetInternetAccessAttributeType(&o.InternetAccess, 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) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// 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) GetStatusOk() (ret ProjectGetStatusRetType, ok bool) { - return getProjectGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Project) SetStatus(v ProjectGetStatusRetType) { - setProjectGetStatusAttributeType(&o.Status, 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 *Project) GetUpdatedAt() (res ProjectGetUpdatedAtRetType) { - 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 *Project) GetUpdatedAtOk() (ret ProjectGetUpdatedAtRetType, ok bool) { - return getProjectGetUpdatedAtAttributeTypeOk(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 *Project) 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 *Project) SetUpdatedAt(v ProjectGetUpdatedAtRetType) { - setProjectGetUpdatedAtAttributeType(&o.UpdatedAt, 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{}{} - if val, ok := getProjectGetAreaIdAttributeTypeOk(o.AreaId); ok { - toSerialize["AreaId"] = val - } - if val, ok := getProjectGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getProjectGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getProjectgetInternetAccessAttributeTypeOk(o.InternetAccess); ok { - toSerialize["InternetAccess"] = val - } - if val, ok := getProjectGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getProjectGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableProject struct { - value *Project - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableProject) Get() *Project { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableProject) Set(val *Project) { - 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 NullableProject) 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 *NullableProject) 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 NewNullableProject(val *Project) *NullableProject { - return &NullableProject{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 NullableProject) 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 *NullableProject) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_project_list_response.go b/services/iaas/model_project_list_response.go deleted file mode 100644 index bcac369977..0000000000 --- a/services/iaas/model_project_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ProjectListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ProjectListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectListResponseGetItemsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectListResponseGetItemsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectListResponseGetItemsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProjectListResponseGetItemsAttributeTypeOk(arg ProjectListResponseGetItemsAttributeType) (ret ProjectListResponseGetItemsRetType, 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 setProjectListResponseGetItemsAttributeType(arg *ProjectListResponseGetItemsAttributeType, val ProjectListResponseGetItemsRetType) { - *arg = &val -} - -// ProjectListResponse Project list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProjectListResponse struct { - // A list of STACKIT projects. - // REQUIRED - Items ProjectListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ProjectListResponse ProjectListResponse - -// NewProjectListResponse instantiates a new ProjectListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewProjectListResponse(items ProjectListResponseGetItemsArgType) *ProjectListResponse { - this := ProjectListResponse{} - setProjectListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewProjectListResponseWithDefaults instantiates a new ProjectListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewProjectListResponseWithDefaults() *ProjectListResponse { - this := ProjectListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ProjectListResponse) GetItems() (ret ProjectListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *ProjectListResponse) GetItemsOk() (ret ProjectListResponseGetItemsRetType, ok bool) { - return getProjectListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ProjectListResponse) SetItems(v ProjectListResponseGetItemsRetType) { - setProjectListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ProjectListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getProjectListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableProjectListResponse struct { - value *ProjectListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableProjectListResponse) Get() *ProjectListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableProjectListResponse) Set(val *ProjectListResponse) { - 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 NullableProjectListResponse) 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 *NullableProjectListResponse) 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 NewNullableProjectListResponse(val *ProjectListResponse) *NullableProjectListResponse { - return &NullableProjectListResponse{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 NullableProjectListResponse) 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 *NullableProjectListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_project_list_response_test.go b/services/iaas/model_project_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_project_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_project_test.go b/services/iaas/model_project_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_project_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_protocol.go b/services/iaas/model_protocol.go deleted file mode 100644 index 9aa2574be2..0000000000 --- a/services/iaas/model_protocol.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the Protocol type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Protocol{} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProtocolGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProtocolGetNameAttributeTypeOk(arg ProtocolGetNameAttributeType) (ret ProtocolGetNameRetType, 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 setProtocolGetNameAttributeType(arg *ProtocolGetNameAttributeType, val ProtocolGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProtocolGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProtocolGetNameRetType = string - -/* - types and functions for number -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProtocolGetNumberAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProtocolGetNumberArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ProtocolGetNumberRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getProtocolGetNumberAttributeTypeOk(arg ProtocolGetNumberAttributeType) (ret ProtocolGetNumberRetType, 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 setProtocolGetNumberAttributeType(arg *ProtocolGetNumberAttributeType, val ProtocolGetNumberRetType) { - *arg = &val -} - -// Protocol The schema for a protocol of a security group rule. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Protocol struct { - // The protocol name which the rule should match. Possible values: `ah`, `dccp`, `egp`, `esp`, `gre`, `icmp`, `igmp`, `ipip`, `ipv6-encap`, `ipv6-frag`, `ipv6-icmp`, `ipv6-nonxt`, `ipv6-opts`, `ipv6-route`, `ospf`, `pgm`, `rsvp`, `sctp`, `tcp`, `udp`, `udplite`, `vrrp`. - Name ProtocolGetNameAttributeType `json:"name,omitempty"` - // The protocol number which the rule should match. - Number ProtocolGetNumberAttributeType `json:"number,omitempty"` -} - -// NewProtocol instantiates a new Protocol 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewProtocol() *Protocol { - this := Protocol{} - return &this -} - -// NewProtocolWithDefaults instantiates a new Protocol 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewProtocolWithDefaults() *Protocol { - this := Protocol{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Protocol) GetName() (res ProtocolGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *Protocol) GetNameOk() (ret ProtocolGetNameRetType, ok bool) { - return getProtocolGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *Protocol) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Protocol) SetName(v ProtocolGetNameRetType) { - setProtocolGetNameAttributeType(&o.Name, v) -} - -// GetNumber returns the Number 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 *Protocol) GetNumber() (res ProtocolGetNumberRetType) { - res, _ = o.GetNumberOk() - return -} - -// GetNumberOk returns a tuple with the Number 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 *Protocol) GetNumberOk() (ret ProtocolGetNumberRetType, ok bool) { - return getProtocolGetNumberAttributeTypeOk(o.Number) -} - -// HasNumber 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 *Protocol) HasNumber() bool { - _, ok := o.GetNumberOk() - return ok -} - -// SetNumber gets a reference to the given int64 and assigns it to the Number field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Protocol) SetNumber(v ProtocolGetNumberRetType) { - setProtocolGetNumberAttributeType(&o.Number, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Protocol) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getProtocolGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getProtocolGetNumberAttributeTypeOk(o.Number); ok { - toSerialize["Number"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableProtocol struct { - value *Protocol - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableProtocol) Get() *Protocol { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableProtocol) Set(val *Protocol) { - 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 NullableProtocol) 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 *NullableProtocol) 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 NewNullableProtocol(val *Protocol) *NullableProtocol { - return &NullableProtocol{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 NullableProtocol) 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 *NullableProtocol) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_protocol_test.go b/services/iaas/model_protocol_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_protocol_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_public_ip.go b/services/iaas/model_public_ip.go deleted file mode 100644 index 0f40f84f73..0000000000 --- a/services/iaas/model_public_ip.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the PublicIp type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PublicIp{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPublicIpGetIdAttributeTypeOk(arg PublicIpGetIdAttributeType) (ret PublicIpGetIdRetType, 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 setPublicIpGetIdAttributeType(arg *PublicIpGetIdAttributeType, val PublicIpGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetIdRetType = string - -/* - types and functions for ip -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetIpAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPublicIpGetIpAttributeTypeOk(arg PublicIpGetIpAttributeType) (ret PublicIpGetIpRetType, 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 setPublicIpGetIpAttributeType(arg *PublicIpGetIpAttributeType, val PublicIpGetIpRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetIpArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetIpRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPublicIpGetLabelsAttributeTypeOk(arg PublicIpGetLabelsAttributeType) (ret PublicIpGetLabelsRetType, 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 setPublicIpGetLabelsAttributeType(arg *PublicIpGetLabelsAttributeType, val PublicIpGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for networkInterface -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpGetNetworkInterfaceAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPublicIpGetNetworkInterfaceAttributeTypeOk(arg PublicIpGetNetworkInterfaceAttributeType) (ret PublicIpGetNetworkInterfaceRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPublicIpGetNetworkInterfaceAttributeType(arg *PublicIpGetNetworkInterfaceAttributeType, val PublicIpGetNetworkInterfaceRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 - -// 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 { - // 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. - Labels PublicIpGetLabelsAttributeType `json:"labels,omitempty"` - // Universally Unique Identifier (UUID). - NetworkInterface PublicIpGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"` -} - -// NewPublicIp instantiates a new PublicIp 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPublicIp() *PublicIp { - this := PublicIp{} - return &this -} - -// NewPublicIpWithDefaults instantiates a new PublicIp 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPublicIpWithDefaults() *PublicIp { - this := PublicIp{} - return &this -} - -// 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) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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) GetIdOk() (ret PublicIpGetIdRetType, ok bool) { - return getPublicIpGetIdAttributeTypeOk(o.Id) -} - -// HasId 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) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) SetId(v PublicIpGetIdRetType) { - setPublicIpGetIdAttributeType(&o.Id, v) -} - -// GetIp returns the Ip 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) GetIp() (res PublicIpGetIpRetType) { - res, _ = o.GetIpOk() - return -} - -// GetIpOk returns a tuple with the Ip 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) GetIpOk() (ret PublicIpGetIpRetType, ok bool) { - return getPublicIpGetIpAttributeTypeOk(o.Ip) -} - -// HasIp 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) HasIp() bool { - _, ok := o.GetIpOk() - return ok -} - -// SetIp gets a reference to the given string and assigns it to the Ip field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) SetIp(v PublicIpGetIpRetType) { - setPublicIpGetIpAttributeType(&o.Ip, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) GetLabels() (res PublicIpGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) GetLabelsOk() (ret PublicIpGetLabelsRetType, ok bool) { - return getPublicIpGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) SetLabels(v PublicIpGetLabelsRetType) { - setPublicIpGetLabelsAttributeType(&o.Labels, v) -} - -// GetNetworkInterface returns the NetworkInterface field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) GetNetworkInterface() (res PublicIpGetNetworkInterfaceRetType) { - res, _ = o.GetNetworkInterfaceOk() - return -} - -// GetNetworkInterfaceOk returns a tuple with the NetworkInterface 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) GetNetworkInterfaceOk() (ret PublicIpGetNetworkInterfaceRetType, ok bool) { - return getPublicIpGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface) -} - -// HasNetworkInterface 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) HasNetworkInterface() bool { - _, ok := o.GetNetworkInterfaceOk() - return ok -} - -// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) SetNetworkInterface(v PublicIpGetNetworkInterfaceRetType) { - setPublicIpGetNetworkInterfaceAttributeType(&o.NetworkInterface, v) -} - -// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) SetNetworkInterfaceNil() { - o.NetworkInterface = nil -} - -// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIp) UnsetNetworkInterface() { - o.NetworkInterface = nil -} - -// 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 := getPublicIpGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getPublicIpGetIpAttributeTypeOk(o.Ip); ok { - toSerialize["Ip"] = val - } - if val, ok := getPublicIpGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getPublicIpGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok { - toSerialize["NetworkInterface"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePublicIp struct { - value *PublicIp - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePublicIp) Get() *PublicIp { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePublicIp) Set(val *PublicIp) { - 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 NullablePublicIp) 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 *NullablePublicIp) 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 NewNullablePublicIp(val *PublicIp) *NullablePublicIp { - return &NullablePublicIp{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 NullablePublicIp) 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 *NullablePublicIp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_public_ip_list_response.go b/services/iaas/model_public_ip_list_response.go deleted file mode 100644 index 5a00d6f0ac..0000000000 --- a/services/iaas/model_public_ip_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the PublicIpListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PublicIpListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpListResponseGetItemsAttributeType = *[]PublicIp - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpListResponseGetItemsArgType = []PublicIp - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpListResponseGetItemsRetType = []PublicIp - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPublicIpListResponseGetItemsAttributeTypeOk(arg PublicIpListResponseGetItemsAttributeType) (ret PublicIpListResponseGetItemsRetType, 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 setPublicIpListResponseGetItemsAttributeType(arg *PublicIpListResponseGetItemsAttributeType, val PublicIpListResponseGetItemsRetType) { - *arg = &val -} - -// PublicIpListResponse Public IP list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicIpListResponse struct { - // A list of public IPs. - // REQUIRED - Items PublicIpListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PublicIpListResponse PublicIpListResponse - -// NewPublicIpListResponse instantiates a new PublicIpListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPublicIpListResponse(items PublicIpListResponseGetItemsArgType) *PublicIpListResponse { - this := PublicIpListResponse{} - setPublicIpListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewPublicIpListResponseWithDefaults instantiates a new PublicIpListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPublicIpListResponseWithDefaults() *PublicIpListResponse { - this := PublicIpListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIpListResponse) GetItems() (ret PublicIpListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *PublicIpListResponse) GetItemsOk() (ret PublicIpListResponseGetItemsRetType, ok bool) { - return getPublicIpListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicIpListResponse) SetItems(v PublicIpListResponseGetItemsRetType) { - setPublicIpListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PublicIpListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPublicIpListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePublicIpListResponse struct { - value *PublicIpListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePublicIpListResponse) Get() *PublicIpListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePublicIpListResponse) Set(val *PublicIpListResponse) { - 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 NullablePublicIpListResponse) 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 *NullablePublicIpListResponse) 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 NewNullablePublicIpListResponse(val *PublicIpListResponse) *NullablePublicIpListResponse { - return &NullablePublicIpListResponse{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 NullablePublicIpListResponse) 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 *NullablePublicIpListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_public_ip_list_response_test.go b/services/iaas/model_public_ip_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_public_ip_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_public_ip_test.go b/services/iaas/model_public_ip_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_public_ip_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_public_network.go b/services/iaas/model_public_network.go deleted file mode 100644 index 1ca2be0577..0000000000 --- a/services/iaas/model_public_network.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the PublicNetwork type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PublicNetwork{} - -/* - types and functions for cidr -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkGetCidrAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPublicNetworkGetCidrAttributeTypeOk(arg PublicNetworkGetCidrAttributeType) (ret PublicNetworkGetCidrRetType, 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 setPublicNetworkGetCidrAttributeType(arg *PublicNetworkGetCidrAttributeType, val PublicNetworkGetCidrRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkGetCidrArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkGetCidrRetType = string - -/* - types and functions for region -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPublicNetworkGetRegionAttributeTypeOk(arg PublicNetworkGetRegionAttributeType) (ret PublicNetworkGetRegionRetType, 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 setPublicNetworkGetRegionAttributeType(arg *PublicNetworkGetRegionAttributeType, val PublicNetworkGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkGetRegionRetType = string - -// PublicNetwork Public network. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetwork struct { - // Classless Inter-Domain Routing (CIDR). - // REQUIRED - Cidr PublicNetworkGetCidrAttributeType `json:"cidr" required:"true"` - // Name of the region. - // REQUIRED - Region PublicNetworkGetRegionAttributeType `json:"region" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PublicNetwork PublicNetwork - -// NewPublicNetwork instantiates a new PublicNetwork 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPublicNetwork(cidr PublicNetworkGetCidrArgType, region PublicNetworkGetRegionArgType) *PublicNetwork { - this := PublicNetwork{} - setPublicNetworkGetCidrAttributeType(&this.Cidr, cidr) - setPublicNetworkGetRegionAttributeType(&this.Region, region) - return &this -} - -// NewPublicNetworkWithDefaults instantiates a new PublicNetwork 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPublicNetworkWithDefaults() *PublicNetwork { - this := PublicNetwork{} - return &this -} - -// GetCidr returns the Cidr field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicNetwork) GetCidr() (ret PublicNetworkGetCidrRetType) { - ret, _ = o.GetCidrOk() - return ret -} - -// GetCidrOk returns a tuple with the Cidr field value -// 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 *PublicNetwork) GetCidrOk() (ret PublicNetworkGetCidrRetType, ok bool) { - return getPublicNetworkGetCidrAttributeTypeOk(o.Cidr) -} - -// SetCidr sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicNetwork) SetCidr(v PublicNetworkGetCidrRetType) { - setPublicNetworkGetCidrAttributeType(&o.Cidr, v) -} - -// GetRegion returns the Region field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicNetwork) GetRegion() (ret PublicNetworkGetRegionRetType) { - ret, _ = o.GetRegionOk() - return ret -} - -// GetRegionOk returns a tuple with the Region field value -// 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 *PublicNetwork) GetRegionOk() (ret PublicNetworkGetRegionRetType, ok bool) { - return getPublicNetworkGetRegionAttributeTypeOk(o.Region) -} - -// SetRegion sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicNetwork) SetRegion(v PublicNetworkGetRegionRetType) { - setPublicNetworkGetRegionAttributeType(&o.Region, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PublicNetwork) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPublicNetworkGetCidrAttributeTypeOk(o.Cidr); ok { - toSerialize["Cidr"] = val - } - if val, ok := getPublicNetworkGetRegionAttributeTypeOk(o.Region); ok { - toSerialize["Region"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePublicNetwork struct { - value *PublicNetwork - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePublicNetwork) Get() *PublicNetwork { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePublicNetwork) Set(val *PublicNetwork) { - 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 NullablePublicNetwork) 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 *NullablePublicNetwork) 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 NewNullablePublicNetwork(val *PublicNetwork) *NullablePublicNetwork { - return &NullablePublicNetwork{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 NullablePublicNetwork) 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 *NullablePublicNetwork) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_public_network_list_response.go b/services/iaas/model_public_network_list_response.go deleted file mode 100644 index 557fb79174..0000000000 --- a/services/iaas/model_public_network_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the PublicNetworkListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PublicNetworkListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkListResponseGetItemsAttributeType = *[]PublicNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkListResponseGetItemsArgType = []PublicNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkListResponseGetItemsRetType = []PublicNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPublicNetworkListResponseGetItemsAttributeTypeOk(arg PublicNetworkListResponseGetItemsAttributeType) (ret PublicNetworkListResponseGetItemsRetType, 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 setPublicNetworkListResponseGetItemsAttributeType(arg *PublicNetworkListResponseGetItemsAttributeType, val PublicNetworkListResponseGetItemsRetType) { - *arg = &val -} - -// PublicNetworkListResponse Public network list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PublicNetworkListResponse struct { - // A list of public networks. - // REQUIRED - Items PublicNetworkListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PublicNetworkListResponse PublicNetworkListResponse - -// NewPublicNetworkListResponse instantiates a new PublicNetworkListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPublicNetworkListResponse(items PublicNetworkListResponseGetItemsArgType) *PublicNetworkListResponse { - this := PublicNetworkListResponse{} - setPublicNetworkListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewPublicNetworkListResponseWithDefaults instantiates a new PublicNetworkListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPublicNetworkListResponseWithDefaults() *PublicNetworkListResponse { - this := PublicNetworkListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicNetworkListResponse) GetItems() (ret PublicNetworkListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *PublicNetworkListResponse) GetItemsOk() (ret PublicNetworkListResponseGetItemsRetType, ok bool) { - return getPublicNetworkListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PublicNetworkListResponse) SetItems(v PublicNetworkListResponseGetItemsRetType) { - setPublicNetworkListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PublicNetworkListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPublicNetworkListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePublicNetworkListResponse struct { - value *PublicNetworkListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePublicNetworkListResponse) Get() *PublicNetworkListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePublicNetworkListResponse) Set(val *PublicNetworkListResponse) { - 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 NullablePublicNetworkListResponse) 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 *NullablePublicNetworkListResponse) 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 NewNullablePublicNetworkListResponse(val *PublicNetworkListResponse) *NullablePublicNetworkListResponse { - return &NullablePublicNetworkListResponse{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 NullablePublicNetworkListResponse) 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 *NullablePublicNetworkListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_public_network_list_response_test.go b/services/iaas/model_public_network_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_public_network_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_public_network_test.go b/services/iaas/model_public_network_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_public_network_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota.go b/services/iaas/model_quota.go deleted file mode 100644 index cd62d2b036..0000000000 --- a/services/iaas/model_quota.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the Quota type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Quota{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaGetLimitAttributeTypeOk(arg QuotaGetLimitAttributeType) (ret QuotaGetLimitRetType, 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 setQuotaGetLimitAttributeType(arg *QuotaGetLimitAttributeType, val QuotaGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaGetUsageAttributeTypeOk(arg QuotaGetUsageAttributeType) (ret QuotaGetUsageRetType, 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 setQuotaGetUsageAttributeType(arg *QuotaGetUsageAttributeType, val QuotaGetUsageRetType) { - *arg = &val -} - -// Quota Object that represents a single resource quota. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Quota struct { - // REQUIRED - Limit QuotaGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Quota Quota - -// NewQuota instantiates a new Quota 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuota(limit QuotaGetLimitArgType, usage QuotaGetUsageArgType) *Quota { - this := Quota{} - setQuotaGetLimitAttributeType(&this.Limit, limit) - setQuotaGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaWithDefaults instantiates a new Quota 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaWithDefaults() *Quota { - this := Quota{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Quota) GetLimit() (ret QuotaGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *Quota) GetLimitOk() (ret QuotaGetLimitRetType, ok bool) { - return getQuotaGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Quota) SetLimit(v QuotaGetLimitRetType) { - setQuotaGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Quota) GetUsage() (ret QuotaGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *Quota) GetUsageOk() (ret QuotaGetUsageRetType, ok bool) { - return getQuotaGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Quota) SetUsage(v QuotaGetUsageRetType) { - setQuotaGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Quota) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuota struct { - value *Quota - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuota) Get() *Quota { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuota) Set(val *Quota) { - 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 NullableQuota) 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 *NullableQuota) 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 NewNullableQuota(val *Quota) *NullableQuota { - return &NullableQuota{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 NullableQuota) 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 *NullableQuota) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list.go b/services/iaas/model_quota_list.go deleted file mode 100644 index 55bb1c5e11..0000000000 --- a/services/iaas/model_quota_list.go +++ /dev/null @@ -1,732 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaList{} - -/* - types and functions for backupGigabytes -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetBackupGigabytesAttributeType = *QuotaListBackupGigabytes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetBackupGigabytesArgType = QuotaListBackupGigabytes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetBackupGigabytesRetType = QuotaListBackupGigabytes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetBackupGigabytesAttributeTypeOk(arg QuotaListGetBackupGigabytesAttributeType) (ret QuotaListGetBackupGigabytesRetType, 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 setQuotaListGetBackupGigabytesAttributeType(arg *QuotaListGetBackupGigabytesAttributeType, val QuotaListGetBackupGigabytesRetType) { - *arg = &val -} - -/* - types and functions for backups -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetBackupsAttributeType = *QuotaListBackups - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetBackupsArgType = QuotaListBackups - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetBackupsRetType = QuotaListBackups - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetBackupsAttributeTypeOk(arg QuotaListGetBackupsAttributeType) (ret QuotaListGetBackupsRetType, 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 setQuotaListGetBackupsAttributeType(arg *QuotaListGetBackupsAttributeType, val QuotaListGetBackupsRetType) { - *arg = &val -} - -/* - types and functions for gigabytes -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetGigabytesAttributeType = *QuotaListGigabytes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetGigabytesArgType = QuotaListGigabytes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetGigabytesRetType = QuotaListGigabytes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetGigabytesAttributeTypeOk(arg QuotaListGetGigabytesAttributeType) (ret QuotaListGetGigabytesRetType, 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 setQuotaListGetGigabytesAttributeType(arg *QuotaListGetGigabytesAttributeType, val QuotaListGetGigabytesRetType) { - *arg = &val -} - -/* - types and functions for networks -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetNetworksAttributeType = *QuotaListNetworks - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetNetworksArgType = QuotaListNetworks - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetNetworksRetType = QuotaListNetworks - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetNetworksAttributeTypeOk(arg QuotaListGetNetworksAttributeType) (ret QuotaListGetNetworksRetType, 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 setQuotaListGetNetworksAttributeType(arg *QuotaListGetNetworksAttributeType, val QuotaListGetNetworksRetType) { - *arg = &val -} - -/* - types and functions for nics -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetNicsAttributeType = *QuotaListNics - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetNicsArgType = QuotaListNics - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetNicsRetType = QuotaListNics - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetNicsAttributeTypeOk(arg QuotaListGetNicsAttributeType) (ret QuotaListGetNicsRetType, 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 setQuotaListGetNicsAttributeType(arg *QuotaListGetNicsAttributeType, val QuotaListGetNicsRetType) { - *arg = &val -} - -/* - types and functions for publicIps -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetPublicIpsAttributeType = *QuotaListPublicIps - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetPublicIpsArgType = QuotaListPublicIps - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetPublicIpsRetType = QuotaListPublicIps - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetPublicIpsAttributeTypeOk(arg QuotaListGetPublicIpsAttributeType) (ret QuotaListGetPublicIpsRetType, 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 setQuotaListGetPublicIpsAttributeType(arg *QuotaListGetPublicIpsAttributeType, val QuotaListGetPublicIpsRetType) { - *arg = &val -} - -/* - types and functions for ram -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetRamAttributeType = *QuotaListRam - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetRamArgType = QuotaListRam - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetRamRetType = QuotaListRam - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetRamAttributeTypeOk(arg QuotaListGetRamAttributeType) (ret QuotaListGetRamRetType, 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 setQuotaListGetRamAttributeType(arg *QuotaListGetRamAttributeType, val QuotaListGetRamRetType) { - *arg = &val -} - -/* - types and functions for securityGroupRules -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSecurityGroupRulesAttributeType = *QuotaListSecurityGroupRules - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSecurityGroupRulesArgType = QuotaListSecurityGroupRules - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSecurityGroupRulesRetType = QuotaListSecurityGroupRules - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetSecurityGroupRulesAttributeTypeOk(arg QuotaListGetSecurityGroupRulesAttributeType) (ret QuotaListGetSecurityGroupRulesRetType, 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 setQuotaListGetSecurityGroupRulesAttributeType(arg *QuotaListGetSecurityGroupRulesAttributeType, val QuotaListGetSecurityGroupRulesRetType) { - *arg = &val -} - -/* - types and functions for securityGroups -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSecurityGroupsAttributeType = *QuotaListSecurityGroups - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSecurityGroupsArgType = QuotaListSecurityGroups - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSecurityGroupsRetType = QuotaListSecurityGroups - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetSecurityGroupsAttributeTypeOk(arg QuotaListGetSecurityGroupsAttributeType) (ret QuotaListGetSecurityGroupsRetType, 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 setQuotaListGetSecurityGroupsAttributeType(arg *QuotaListGetSecurityGroupsAttributeType, val QuotaListGetSecurityGroupsRetType) { - *arg = &val -} - -/* - types and functions for snapshots -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSnapshotsAttributeType = *QuotaListSnapshots - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSnapshotsArgType = QuotaListSnapshots - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetSnapshotsRetType = QuotaListSnapshots - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetSnapshotsAttributeTypeOk(arg QuotaListGetSnapshotsAttributeType) (ret QuotaListGetSnapshotsRetType, 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 setQuotaListGetSnapshotsAttributeType(arg *QuotaListGetSnapshotsAttributeType, val QuotaListGetSnapshotsRetType) { - *arg = &val -} - -/* - types and functions for vcpu -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetVcpuAttributeType = *QuotaListVcpu - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetVcpuArgType = QuotaListVcpu - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetVcpuRetType = QuotaListVcpu - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetVcpuAttributeTypeOk(arg QuotaListGetVcpuAttributeType) (ret QuotaListGetVcpuRetType, 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 setQuotaListGetVcpuAttributeType(arg *QuotaListGetVcpuAttributeType, val QuotaListGetVcpuRetType) { - *arg = &val -} - -/* - types and functions for volumes -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetVolumesAttributeType = *QuotaListVolumes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetVolumesArgType = QuotaListVolumes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGetVolumesRetType = QuotaListVolumes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGetVolumesAttributeTypeOk(arg QuotaListGetVolumesAttributeType) (ret QuotaListGetVolumesRetType, 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 setQuotaListGetVolumesAttributeType(arg *QuotaListGetVolumesAttributeType, val QuotaListGetVolumesRetType) { - *arg = &val -} - -// QuotaList Object that represents the quotas for a project. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaList struct { - // REQUIRED - BackupGigabytes QuotaListGetBackupGigabytesAttributeType `json:"backupGigabytes" required:"true"` - // REQUIRED - Backups QuotaListGetBackupsAttributeType `json:"backups" required:"true"` - // REQUIRED - Gigabytes QuotaListGetGigabytesAttributeType `json:"gigabytes" required:"true"` - // REQUIRED - Networks QuotaListGetNetworksAttributeType `json:"networks" required:"true"` - // REQUIRED - Nics QuotaListGetNicsAttributeType `json:"nics" required:"true"` - // REQUIRED - PublicIps QuotaListGetPublicIpsAttributeType `json:"publicIps" required:"true"` - // REQUIRED - Ram QuotaListGetRamAttributeType `json:"ram" required:"true"` - // REQUIRED - SecurityGroupRules QuotaListGetSecurityGroupRulesAttributeType `json:"securityGroupRules" required:"true"` - // REQUIRED - SecurityGroups QuotaListGetSecurityGroupsAttributeType `json:"securityGroups" required:"true"` - // REQUIRED - Snapshots QuotaListGetSnapshotsAttributeType `json:"snapshots" required:"true"` - // REQUIRED - Vcpu QuotaListGetVcpuAttributeType `json:"vcpu" required:"true"` - // REQUIRED - Volumes QuotaListGetVolumesAttributeType `json:"volumes" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaList QuotaList - -// NewQuotaList instantiates a new QuotaList 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaList(backupGigabytes QuotaListGetBackupGigabytesArgType, backups QuotaListGetBackupsArgType, gigabytes QuotaListGetGigabytesArgType, networks QuotaListGetNetworksArgType, nics QuotaListGetNicsArgType, publicIps QuotaListGetPublicIpsArgType, ram QuotaListGetRamArgType, securityGroupRules QuotaListGetSecurityGroupRulesArgType, securityGroups QuotaListGetSecurityGroupsArgType, snapshots QuotaListGetSnapshotsArgType, vcpu QuotaListGetVcpuArgType, volumes QuotaListGetVolumesArgType) *QuotaList { - this := QuotaList{} - setQuotaListGetBackupGigabytesAttributeType(&this.BackupGigabytes, backupGigabytes) - setQuotaListGetBackupsAttributeType(&this.Backups, backups) - setQuotaListGetGigabytesAttributeType(&this.Gigabytes, gigabytes) - setQuotaListGetNetworksAttributeType(&this.Networks, networks) - setQuotaListGetNicsAttributeType(&this.Nics, nics) - setQuotaListGetPublicIpsAttributeType(&this.PublicIps, publicIps) - setQuotaListGetRamAttributeType(&this.Ram, ram) - setQuotaListGetSecurityGroupRulesAttributeType(&this.SecurityGroupRules, securityGroupRules) - setQuotaListGetSecurityGroupsAttributeType(&this.SecurityGroups, securityGroups) - setQuotaListGetSnapshotsAttributeType(&this.Snapshots, snapshots) - setQuotaListGetVcpuAttributeType(&this.Vcpu, vcpu) - setQuotaListGetVolumesAttributeType(&this.Volumes, volumes) - return &this -} - -// NewQuotaListWithDefaults instantiates a new QuotaList 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListWithDefaults() *QuotaList { - this := QuotaList{} - return &this -} - -// GetBackupGigabytes returns the BackupGigabytes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetBackupGigabytes() (ret QuotaListGetBackupGigabytesRetType) { - ret, _ = o.GetBackupGigabytesOk() - return ret -} - -// GetBackupGigabytesOk returns a tuple with the BackupGigabytes field value -// 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 *QuotaList) GetBackupGigabytesOk() (ret QuotaListGetBackupGigabytesRetType, ok bool) { - return getQuotaListGetBackupGigabytesAttributeTypeOk(o.BackupGigabytes) -} - -// SetBackupGigabytes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetBackupGigabytes(v QuotaListGetBackupGigabytesRetType) { - setQuotaListGetBackupGigabytesAttributeType(&o.BackupGigabytes, v) -} - -// GetBackups returns the Backups field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetBackups() (ret QuotaListGetBackupsRetType) { - ret, _ = o.GetBackupsOk() - return ret -} - -// GetBackupsOk returns a tuple with the Backups field value -// 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 *QuotaList) GetBackupsOk() (ret QuotaListGetBackupsRetType, ok bool) { - return getQuotaListGetBackupsAttributeTypeOk(o.Backups) -} - -// SetBackups sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetBackups(v QuotaListGetBackupsRetType) { - setQuotaListGetBackupsAttributeType(&o.Backups, v) -} - -// GetGigabytes returns the Gigabytes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetGigabytes() (ret QuotaListGetGigabytesRetType) { - ret, _ = o.GetGigabytesOk() - return ret -} - -// GetGigabytesOk returns a tuple with the Gigabytes field value -// 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 *QuotaList) GetGigabytesOk() (ret QuotaListGetGigabytesRetType, ok bool) { - return getQuotaListGetGigabytesAttributeTypeOk(o.Gigabytes) -} - -// SetGigabytes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetGigabytes(v QuotaListGetGigabytesRetType) { - setQuotaListGetGigabytesAttributeType(&o.Gigabytes, v) -} - -// GetNetworks returns the Networks field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetNetworks() (ret QuotaListGetNetworksRetType) { - ret, _ = o.GetNetworksOk() - return ret -} - -// GetNetworksOk returns a tuple with the Networks field value -// 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 *QuotaList) GetNetworksOk() (ret QuotaListGetNetworksRetType, ok bool) { - return getQuotaListGetNetworksAttributeTypeOk(o.Networks) -} - -// SetNetworks sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetNetworks(v QuotaListGetNetworksRetType) { - setQuotaListGetNetworksAttributeType(&o.Networks, v) -} - -// GetNics returns the Nics field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetNics() (ret QuotaListGetNicsRetType) { - ret, _ = o.GetNicsOk() - return ret -} - -// GetNicsOk returns a tuple with the Nics field value -// 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 *QuotaList) GetNicsOk() (ret QuotaListGetNicsRetType, ok bool) { - return getQuotaListGetNicsAttributeTypeOk(o.Nics) -} - -// SetNics sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetNics(v QuotaListGetNicsRetType) { - setQuotaListGetNicsAttributeType(&o.Nics, v) -} - -// GetPublicIps returns the PublicIps field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetPublicIps() (ret QuotaListGetPublicIpsRetType) { - ret, _ = o.GetPublicIpsOk() - return ret -} - -// GetPublicIpsOk returns a tuple with the PublicIps field value -// 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 *QuotaList) GetPublicIpsOk() (ret QuotaListGetPublicIpsRetType, ok bool) { - return getQuotaListGetPublicIpsAttributeTypeOk(o.PublicIps) -} - -// SetPublicIps sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetPublicIps(v QuotaListGetPublicIpsRetType) { - setQuotaListGetPublicIpsAttributeType(&o.PublicIps, v) -} - -// GetRam returns the Ram field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetRam() (ret QuotaListGetRamRetType) { - ret, _ = o.GetRamOk() - return ret -} - -// GetRamOk returns a tuple with the Ram field value -// 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 *QuotaList) GetRamOk() (ret QuotaListGetRamRetType, ok bool) { - return getQuotaListGetRamAttributeTypeOk(o.Ram) -} - -// SetRam sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetRam(v QuotaListGetRamRetType) { - setQuotaListGetRamAttributeType(&o.Ram, v) -} - -// GetSecurityGroupRules returns the SecurityGroupRules field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetSecurityGroupRules() (ret QuotaListGetSecurityGroupRulesRetType) { - ret, _ = o.GetSecurityGroupRulesOk() - return ret -} - -// GetSecurityGroupRulesOk returns a tuple with the SecurityGroupRules field value -// 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 *QuotaList) GetSecurityGroupRulesOk() (ret QuotaListGetSecurityGroupRulesRetType, ok bool) { - return getQuotaListGetSecurityGroupRulesAttributeTypeOk(o.SecurityGroupRules) -} - -// SetSecurityGroupRules sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetSecurityGroupRules(v QuotaListGetSecurityGroupRulesRetType) { - setQuotaListGetSecurityGroupRulesAttributeType(&o.SecurityGroupRules, v) -} - -// GetSecurityGroups returns the SecurityGroups field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetSecurityGroups() (ret QuotaListGetSecurityGroupsRetType) { - ret, _ = o.GetSecurityGroupsOk() - return ret -} - -// GetSecurityGroupsOk returns a tuple with the SecurityGroups field value -// 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 *QuotaList) GetSecurityGroupsOk() (ret QuotaListGetSecurityGroupsRetType, ok bool) { - return getQuotaListGetSecurityGroupsAttributeTypeOk(o.SecurityGroups) -} - -// SetSecurityGroups sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetSecurityGroups(v QuotaListGetSecurityGroupsRetType) { - setQuotaListGetSecurityGroupsAttributeType(&o.SecurityGroups, v) -} - -// GetSnapshots returns the Snapshots field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetSnapshots() (ret QuotaListGetSnapshotsRetType) { - ret, _ = o.GetSnapshotsOk() - return ret -} - -// GetSnapshotsOk returns a tuple with the Snapshots field value -// 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 *QuotaList) GetSnapshotsOk() (ret QuotaListGetSnapshotsRetType, ok bool) { - return getQuotaListGetSnapshotsAttributeTypeOk(o.Snapshots) -} - -// SetSnapshots sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetSnapshots(v QuotaListGetSnapshotsRetType) { - setQuotaListGetSnapshotsAttributeType(&o.Snapshots, v) -} - -// GetVcpu returns the Vcpu field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetVcpu() (ret QuotaListGetVcpuRetType) { - ret, _ = o.GetVcpuOk() - return ret -} - -// GetVcpuOk returns a tuple with the Vcpu field value -// 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 *QuotaList) GetVcpuOk() (ret QuotaListGetVcpuRetType, ok bool) { - return getQuotaListGetVcpuAttributeTypeOk(o.Vcpu) -} - -// SetVcpu sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetVcpu(v QuotaListGetVcpuRetType) { - setQuotaListGetVcpuAttributeType(&o.Vcpu, v) -} - -// GetVolumes returns the Volumes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) GetVolumes() (ret QuotaListGetVolumesRetType) { - ret, _ = o.GetVolumesOk() - return ret -} - -// GetVolumesOk returns a tuple with the Volumes field value -// 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 *QuotaList) GetVolumesOk() (ret QuotaListGetVolumesRetType, ok bool) { - return getQuotaListGetVolumesAttributeTypeOk(o.Volumes) -} - -// SetVolumes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaList) SetVolumes(v QuotaListGetVolumesRetType) { - setQuotaListGetVolumesAttributeType(&o.Volumes, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListGetBackupGigabytesAttributeTypeOk(o.BackupGigabytes); ok { - toSerialize["BackupGigabytes"] = val - } - if val, ok := getQuotaListGetBackupsAttributeTypeOk(o.Backups); ok { - toSerialize["Backups"] = val - } - if val, ok := getQuotaListGetGigabytesAttributeTypeOk(o.Gigabytes); ok { - toSerialize["Gigabytes"] = val - } - if val, ok := getQuotaListGetNetworksAttributeTypeOk(o.Networks); ok { - toSerialize["Networks"] = val - } - if val, ok := getQuotaListGetNicsAttributeTypeOk(o.Nics); ok { - toSerialize["Nics"] = val - } - if val, ok := getQuotaListGetPublicIpsAttributeTypeOk(o.PublicIps); ok { - toSerialize["PublicIps"] = val - } - if val, ok := getQuotaListGetRamAttributeTypeOk(o.Ram); ok { - toSerialize["Ram"] = val - } - if val, ok := getQuotaListGetSecurityGroupRulesAttributeTypeOk(o.SecurityGroupRules); ok { - toSerialize["SecurityGroupRules"] = val - } - if val, ok := getQuotaListGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok { - toSerialize["SecurityGroups"] = val - } - if val, ok := getQuotaListGetSnapshotsAttributeTypeOk(o.Snapshots); ok { - toSerialize["Snapshots"] = val - } - if val, ok := getQuotaListGetVcpuAttributeTypeOk(o.Vcpu); ok { - toSerialize["Vcpu"] = val - } - if val, ok := getQuotaListGetVolumesAttributeTypeOk(o.Volumes); ok { - toSerialize["Volumes"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaList struct { - value *QuotaList - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaList) Get() *QuotaList { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaList) Set(val *QuotaList) { - 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 NullableQuotaList) 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 *NullableQuotaList) 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 NewNullableQuotaList(val *QuotaList) *NullableQuotaList { - return &NullableQuotaList{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 NullableQuotaList) 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 *NullableQuotaList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_backup_gigabytes.go b/services/iaas/model_quota_list_backup_gigabytes.go deleted file mode 100644 index 56e3c98221..0000000000 --- a/services/iaas/model_quota_list_backup_gigabytes.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListBackupGigabytes type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListBackupGigabytes{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupGigabytesGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupGigabytesGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupGigabytesGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListBackupGigabytesGetLimitAttributeTypeOk(arg QuotaListBackupGigabytesGetLimitAttributeType) (ret QuotaListBackupGigabytesGetLimitRetType, 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 setQuotaListBackupGigabytesGetLimitAttributeType(arg *QuotaListBackupGigabytesGetLimitAttributeType, val QuotaListBackupGigabytesGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupGigabytesGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupGigabytesGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupGigabytesGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListBackupGigabytesGetUsageAttributeTypeOk(arg QuotaListBackupGigabytesGetUsageAttributeType) (ret QuotaListBackupGigabytesGetUsageRetType, 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 setQuotaListBackupGigabytesGetUsageAttributeType(arg *QuotaListBackupGigabytesGetUsageAttributeType, val QuotaListBackupGigabytesGetUsageRetType) { - *arg = &val -} - -// QuotaListBackupGigabytes Total size in GiB of backups. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupGigabytes struct { - // REQUIRED - Limit QuotaListBackupGigabytesGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListBackupGigabytesGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListBackupGigabytes QuotaListBackupGigabytes - -// NewQuotaListBackupGigabytes instantiates a new QuotaListBackupGigabytes 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListBackupGigabytes(limit QuotaListBackupGigabytesGetLimitArgType, usage QuotaListBackupGigabytesGetUsageArgType) *QuotaListBackupGigabytes { - this := QuotaListBackupGigabytes{} - setQuotaListBackupGigabytesGetLimitAttributeType(&this.Limit, limit) - setQuotaListBackupGigabytesGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListBackupGigabytesWithDefaults instantiates a new QuotaListBackupGigabytes 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListBackupGigabytesWithDefaults() *QuotaListBackupGigabytes { - this := QuotaListBackupGigabytes{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListBackupGigabytes) GetLimit() (ret QuotaListBackupGigabytesGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListBackupGigabytes) GetLimitOk() (ret QuotaListBackupGigabytesGetLimitRetType, ok bool) { - return getQuotaListBackupGigabytesGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListBackupGigabytes) SetLimit(v QuotaListBackupGigabytesGetLimitRetType) { - setQuotaListBackupGigabytesGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListBackupGigabytes) GetUsage() (ret QuotaListBackupGigabytesGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListBackupGigabytes) GetUsageOk() (ret QuotaListBackupGigabytesGetUsageRetType, ok bool) { - return getQuotaListBackupGigabytesGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListBackupGigabytes) SetUsage(v QuotaListBackupGigabytesGetUsageRetType) { - setQuotaListBackupGigabytesGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListBackupGigabytes) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListBackupGigabytesGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListBackupGigabytesGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListBackupGigabytes struct { - value *QuotaListBackupGigabytes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListBackupGigabytes) Get() *QuotaListBackupGigabytes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListBackupGigabytes) Set(val *QuotaListBackupGigabytes) { - 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 NullableQuotaListBackupGigabytes) 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 *NullableQuotaListBackupGigabytes) 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 NewNullableQuotaListBackupGigabytes(val *QuotaListBackupGigabytes) *NullableQuotaListBackupGigabytes { - return &NullableQuotaListBackupGigabytes{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 NullableQuotaListBackupGigabytes) 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 *NullableQuotaListBackupGigabytes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_backup_gigabytes_test.go b/services/iaas/model_quota_list_backup_gigabytes_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_backup_gigabytes_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_backups.go b/services/iaas/model_quota_list_backups.go deleted file mode 100644 index 2289d52176..0000000000 --- a/services/iaas/model_quota_list_backups.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListBackups type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListBackups{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupsGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupsGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupsGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListBackupsGetLimitAttributeTypeOk(arg QuotaListBackupsGetLimitAttributeType) (ret QuotaListBackupsGetLimitRetType, 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 setQuotaListBackupsGetLimitAttributeType(arg *QuotaListBackupsGetLimitAttributeType, val QuotaListBackupsGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupsGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupsGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackupsGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListBackupsGetUsageAttributeTypeOk(arg QuotaListBackupsGetUsageAttributeType) (ret QuotaListBackupsGetUsageRetType, 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 setQuotaListBackupsGetUsageAttributeType(arg *QuotaListBackupsGetUsageAttributeType, val QuotaListBackupsGetUsageRetType) { - *arg = &val -} - -// QuotaListBackups Number of backups. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListBackups struct { - // REQUIRED - Limit QuotaListBackupsGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListBackupsGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListBackups QuotaListBackups - -// NewQuotaListBackups instantiates a new QuotaListBackups 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListBackups(limit QuotaListBackupsGetLimitArgType, usage QuotaListBackupsGetUsageArgType) *QuotaListBackups { - this := QuotaListBackups{} - setQuotaListBackupsGetLimitAttributeType(&this.Limit, limit) - setQuotaListBackupsGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListBackupsWithDefaults instantiates a new QuotaListBackups 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListBackupsWithDefaults() *QuotaListBackups { - this := QuotaListBackups{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListBackups) GetLimit() (ret QuotaListBackupsGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListBackups) GetLimitOk() (ret QuotaListBackupsGetLimitRetType, ok bool) { - return getQuotaListBackupsGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListBackups) SetLimit(v QuotaListBackupsGetLimitRetType) { - setQuotaListBackupsGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListBackups) GetUsage() (ret QuotaListBackupsGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListBackups) GetUsageOk() (ret QuotaListBackupsGetUsageRetType, ok bool) { - return getQuotaListBackupsGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListBackups) SetUsage(v QuotaListBackupsGetUsageRetType) { - setQuotaListBackupsGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListBackups) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListBackupsGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListBackupsGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListBackups struct { - value *QuotaListBackups - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListBackups) Get() *QuotaListBackups { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListBackups) Set(val *QuotaListBackups) { - 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 NullableQuotaListBackups) 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 *NullableQuotaListBackups) 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 NewNullableQuotaListBackups(val *QuotaListBackups) *NullableQuotaListBackups { - return &NullableQuotaListBackups{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 NullableQuotaListBackups) 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 *NullableQuotaListBackups) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_backups_test.go b/services/iaas/model_quota_list_backups_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_backups_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_gigabytes.go b/services/iaas/model_quota_list_gigabytes.go deleted file mode 100644 index d99f222c0b..0000000000 --- a/services/iaas/model_quota_list_gigabytes.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListGigabytes type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListGigabytes{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGigabytesGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGigabytesGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGigabytesGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGigabytesGetLimitAttributeTypeOk(arg QuotaListGigabytesGetLimitAttributeType) (ret QuotaListGigabytesGetLimitRetType, 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 setQuotaListGigabytesGetLimitAttributeType(arg *QuotaListGigabytesGetLimitAttributeType, val QuotaListGigabytesGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGigabytesGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGigabytesGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGigabytesGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListGigabytesGetUsageAttributeTypeOk(arg QuotaListGigabytesGetUsageAttributeType) (ret QuotaListGigabytesGetUsageRetType, 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 setQuotaListGigabytesGetUsageAttributeType(arg *QuotaListGigabytesGetUsageAttributeType, val QuotaListGigabytesGetUsageRetType) { - *arg = &val -} - -// QuotaListGigabytes Total size in GiB of volumes and snapshots. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListGigabytes struct { - // REQUIRED - Limit QuotaListGigabytesGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListGigabytesGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListGigabytes QuotaListGigabytes - -// NewQuotaListGigabytes instantiates a new QuotaListGigabytes 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListGigabytes(limit QuotaListGigabytesGetLimitArgType, usage QuotaListGigabytesGetUsageArgType) *QuotaListGigabytes { - this := QuotaListGigabytes{} - setQuotaListGigabytesGetLimitAttributeType(&this.Limit, limit) - setQuotaListGigabytesGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListGigabytesWithDefaults instantiates a new QuotaListGigabytes 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListGigabytesWithDefaults() *QuotaListGigabytes { - this := QuotaListGigabytes{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListGigabytes) GetLimit() (ret QuotaListGigabytesGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListGigabytes) GetLimitOk() (ret QuotaListGigabytesGetLimitRetType, ok bool) { - return getQuotaListGigabytesGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListGigabytes) SetLimit(v QuotaListGigabytesGetLimitRetType) { - setQuotaListGigabytesGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListGigabytes) GetUsage() (ret QuotaListGigabytesGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListGigabytes) GetUsageOk() (ret QuotaListGigabytesGetUsageRetType, ok bool) { - return getQuotaListGigabytesGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListGigabytes) SetUsage(v QuotaListGigabytesGetUsageRetType) { - setQuotaListGigabytesGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListGigabytes) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListGigabytesGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListGigabytesGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListGigabytes struct { - value *QuotaListGigabytes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListGigabytes) Get() *QuotaListGigabytes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListGigabytes) Set(val *QuotaListGigabytes) { - 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 NullableQuotaListGigabytes) 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 *NullableQuotaListGigabytes) 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 NewNullableQuotaListGigabytes(val *QuotaListGigabytes) *NullableQuotaListGigabytes { - return &NullableQuotaListGigabytes{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 NullableQuotaListGigabytes) 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 *NullableQuotaListGigabytes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_gigabytes_test.go b/services/iaas/model_quota_list_gigabytes_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_gigabytes_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_networks.go b/services/iaas/model_quota_list_networks.go deleted file mode 100644 index ab7a933743..0000000000 --- a/services/iaas/model_quota_list_networks.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListNetworks type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListNetworks{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNetworksGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNetworksGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNetworksGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListNetworksGetLimitAttributeTypeOk(arg QuotaListNetworksGetLimitAttributeType) (ret QuotaListNetworksGetLimitRetType, 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 setQuotaListNetworksGetLimitAttributeType(arg *QuotaListNetworksGetLimitAttributeType, val QuotaListNetworksGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNetworksGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNetworksGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNetworksGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListNetworksGetUsageAttributeTypeOk(arg QuotaListNetworksGetUsageAttributeType) (ret QuotaListNetworksGetUsageRetType, 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 setQuotaListNetworksGetUsageAttributeType(arg *QuotaListNetworksGetUsageAttributeType, val QuotaListNetworksGetUsageRetType) { - *arg = &val -} - -// QuotaListNetworks Number of networks. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNetworks struct { - // REQUIRED - Limit QuotaListNetworksGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListNetworksGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListNetworks QuotaListNetworks - -// NewQuotaListNetworks instantiates a new QuotaListNetworks 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListNetworks(limit QuotaListNetworksGetLimitArgType, usage QuotaListNetworksGetUsageArgType) *QuotaListNetworks { - this := QuotaListNetworks{} - setQuotaListNetworksGetLimitAttributeType(&this.Limit, limit) - setQuotaListNetworksGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListNetworksWithDefaults instantiates a new QuotaListNetworks 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListNetworksWithDefaults() *QuotaListNetworks { - this := QuotaListNetworks{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListNetworks) GetLimit() (ret QuotaListNetworksGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListNetworks) GetLimitOk() (ret QuotaListNetworksGetLimitRetType, ok bool) { - return getQuotaListNetworksGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListNetworks) SetLimit(v QuotaListNetworksGetLimitRetType) { - setQuotaListNetworksGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListNetworks) GetUsage() (ret QuotaListNetworksGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListNetworks) GetUsageOk() (ret QuotaListNetworksGetUsageRetType, ok bool) { - return getQuotaListNetworksGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListNetworks) SetUsage(v QuotaListNetworksGetUsageRetType) { - setQuotaListNetworksGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListNetworks) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListNetworksGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListNetworksGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListNetworks struct { - value *QuotaListNetworks - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListNetworks) Get() *QuotaListNetworks { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListNetworks) Set(val *QuotaListNetworks) { - 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 NullableQuotaListNetworks) 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 *NullableQuotaListNetworks) 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 NewNullableQuotaListNetworks(val *QuotaListNetworks) *NullableQuotaListNetworks { - return &NullableQuotaListNetworks{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 NullableQuotaListNetworks) 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 *NullableQuotaListNetworks) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_networks_test.go b/services/iaas/model_quota_list_networks_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_networks_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_nics.go b/services/iaas/model_quota_list_nics.go deleted file mode 100644 index 45b5eea02b..0000000000 --- a/services/iaas/model_quota_list_nics.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListNics type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListNics{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNicsGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNicsGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNicsGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListNicsGetLimitAttributeTypeOk(arg QuotaListNicsGetLimitAttributeType) (ret QuotaListNicsGetLimitRetType, 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 setQuotaListNicsGetLimitAttributeType(arg *QuotaListNicsGetLimitAttributeType, val QuotaListNicsGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNicsGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNicsGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNicsGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListNicsGetUsageAttributeTypeOk(arg QuotaListNicsGetUsageAttributeType) (ret QuotaListNicsGetUsageRetType, 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 setQuotaListNicsGetUsageAttributeType(arg *QuotaListNicsGetUsageAttributeType, val QuotaListNicsGetUsageRetType) { - *arg = &val -} - -// QuotaListNics Number of network interfaces. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListNics struct { - // REQUIRED - Limit QuotaListNicsGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListNicsGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListNics QuotaListNics - -// NewQuotaListNics instantiates a new QuotaListNics 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListNics(limit QuotaListNicsGetLimitArgType, usage QuotaListNicsGetUsageArgType) *QuotaListNics { - this := QuotaListNics{} - setQuotaListNicsGetLimitAttributeType(&this.Limit, limit) - setQuotaListNicsGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListNicsWithDefaults instantiates a new QuotaListNics 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListNicsWithDefaults() *QuotaListNics { - this := QuotaListNics{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListNics) GetLimit() (ret QuotaListNicsGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListNics) GetLimitOk() (ret QuotaListNicsGetLimitRetType, ok bool) { - return getQuotaListNicsGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListNics) SetLimit(v QuotaListNicsGetLimitRetType) { - setQuotaListNicsGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListNics) GetUsage() (ret QuotaListNicsGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListNics) GetUsageOk() (ret QuotaListNicsGetUsageRetType, ok bool) { - return getQuotaListNicsGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListNics) SetUsage(v QuotaListNicsGetUsageRetType) { - setQuotaListNicsGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListNics) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListNicsGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListNicsGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListNics struct { - value *QuotaListNics - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListNics) Get() *QuotaListNics { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListNics) Set(val *QuotaListNics) { - 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 NullableQuotaListNics) 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 *NullableQuotaListNics) 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 NewNullableQuotaListNics(val *QuotaListNics) *NullableQuotaListNics { - return &NullableQuotaListNics{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 NullableQuotaListNics) 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 *NullableQuotaListNics) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_nics_test.go b/services/iaas/model_quota_list_nics_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_nics_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_public_ips.go b/services/iaas/model_quota_list_public_ips.go deleted file mode 100644 index 690ce26458..0000000000 --- a/services/iaas/model_quota_list_public_ips.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListPublicIps type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListPublicIps{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListPublicIpsGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListPublicIpsGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListPublicIpsGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListPublicIpsGetLimitAttributeTypeOk(arg QuotaListPublicIpsGetLimitAttributeType) (ret QuotaListPublicIpsGetLimitRetType, 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 setQuotaListPublicIpsGetLimitAttributeType(arg *QuotaListPublicIpsGetLimitAttributeType, val QuotaListPublicIpsGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListPublicIpsGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListPublicIpsGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListPublicIpsGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListPublicIpsGetUsageAttributeTypeOk(arg QuotaListPublicIpsGetUsageAttributeType) (ret QuotaListPublicIpsGetUsageRetType, 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 setQuotaListPublicIpsGetUsageAttributeType(arg *QuotaListPublicIpsGetUsageAttributeType, val QuotaListPublicIpsGetUsageRetType) { - *arg = &val -} - -// QuotaListPublicIps Number of public IP addresses. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListPublicIps struct { - // REQUIRED - Limit QuotaListPublicIpsGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListPublicIpsGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListPublicIps QuotaListPublicIps - -// NewQuotaListPublicIps instantiates a new QuotaListPublicIps 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListPublicIps(limit QuotaListPublicIpsGetLimitArgType, usage QuotaListPublicIpsGetUsageArgType) *QuotaListPublicIps { - this := QuotaListPublicIps{} - setQuotaListPublicIpsGetLimitAttributeType(&this.Limit, limit) - setQuotaListPublicIpsGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListPublicIpsWithDefaults instantiates a new QuotaListPublicIps 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListPublicIpsWithDefaults() *QuotaListPublicIps { - this := QuotaListPublicIps{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListPublicIps) GetLimit() (ret QuotaListPublicIpsGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListPublicIps) GetLimitOk() (ret QuotaListPublicIpsGetLimitRetType, ok bool) { - return getQuotaListPublicIpsGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListPublicIps) SetLimit(v QuotaListPublicIpsGetLimitRetType) { - setQuotaListPublicIpsGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListPublicIps) GetUsage() (ret QuotaListPublicIpsGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListPublicIps) GetUsageOk() (ret QuotaListPublicIpsGetUsageRetType, ok bool) { - return getQuotaListPublicIpsGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListPublicIps) SetUsage(v QuotaListPublicIpsGetUsageRetType) { - setQuotaListPublicIpsGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListPublicIps) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListPublicIpsGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListPublicIpsGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListPublicIps struct { - value *QuotaListPublicIps - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListPublicIps) Get() *QuotaListPublicIps { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListPublicIps) Set(val *QuotaListPublicIps) { - 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 NullableQuotaListPublicIps) 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 *NullableQuotaListPublicIps) 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 NewNullableQuotaListPublicIps(val *QuotaListPublicIps) *NullableQuotaListPublicIps { - return &NullableQuotaListPublicIps{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 NullableQuotaListPublicIps) 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 *NullableQuotaListPublicIps) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_public_ips_test.go b/services/iaas/model_quota_list_public_ips_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_public_ips_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_ram.go b/services/iaas/model_quota_list_ram.go deleted file mode 100644 index 46cbf34cdc..0000000000 --- a/services/iaas/model_quota_list_ram.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListRam type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListRam{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListRamGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListRamGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListRamGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListRamGetLimitAttributeTypeOk(arg QuotaListRamGetLimitAttributeType) (ret QuotaListRamGetLimitRetType, 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 setQuotaListRamGetLimitAttributeType(arg *QuotaListRamGetLimitAttributeType, val QuotaListRamGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListRamGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListRamGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListRamGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListRamGetUsageAttributeTypeOk(arg QuotaListRamGetUsageAttributeType) (ret QuotaListRamGetUsageRetType, 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 setQuotaListRamGetUsageAttributeType(arg *QuotaListRamGetUsageAttributeType, val QuotaListRamGetUsageRetType) { - *arg = &val -} - -// QuotaListRam Amount of server RAM in MiB. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListRam struct { - // REQUIRED - Limit QuotaListRamGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListRamGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListRam QuotaListRam - -// NewQuotaListRam instantiates a new QuotaListRam 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListRam(limit QuotaListRamGetLimitArgType, usage QuotaListRamGetUsageArgType) *QuotaListRam { - this := QuotaListRam{} - setQuotaListRamGetLimitAttributeType(&this.Limit, limit) - setQuotaListRamGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListRamWithDefaults instantiates a new QuotaListRam 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListRamWithDefaults() *QuotaListRam { - this := QuotaListRam{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListRam) GetLimit() (ret QuotaListRamGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListRam) GetLimitOk() (ret QuotaListRamGetLimitRetType, ok bool) { - return getQuotaListRamGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListRam) SetLimit(v QuotaListRamGetLimitRetType) { - setQuotaListRamGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListRam) GetUsage() (ret QuotaListRamGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListRam) GetUsageOk() (ret QuotaListRamGetUsageRetType, ok bool) { - return getQuotaListRamGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListRam) SetUsage(v QuotaListRamGetUsageRetType) { - setQuotaListRamGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListRam) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListRamGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListRamGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListRam struct { - value *QuotaListRam - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListRam) Get() *QuotaListRam { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListRam) Set(val *QuotaListRam) { - 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 NullableQuotaListRam) 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 *NullableQuotaListRam) 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 NewNullableQuotaListRam(val *QuotaListRam) *NullableQuotaListRam { - return &NullableQuotaListRam{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 NullableQuotaListRam) 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 *NullableQuotaListRam) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_ram_test.go b/services/iaas/model_quota_list_ram_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_ram_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_response.go b/services/iaas/model_quota_list_response.go deleted file mode 100644 index 41b1fed4e2..0000000000 --- a/services/iaas/model_quota_list_response.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListResponse{} - -/* - types and functions for quotas -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListResponseGetQuotasAttributeType = *QuotaList - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListResponseGetQuotasArgType = QuotaList - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListResponseGetQuotasRetType = QuotaList - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListResponseGetQuotasAttributeTypeOk(arg QuotaListResponseGetQuotasAttributeType) (ret QuotaListResponseGetQuotasRetType, 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 setQuotaListResponseGetQuotasAttributeType(arg *QuotaListResponseGetQuotasAttributeType, val QuotaListResponseGetQuotasRetType) { - *arg = &val -} - -// QuotaListResponse Quotas list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListResponse struct { - // REQUIRED - Quotas QuotaListResponseGetQuotasAttributeType `json:"quotas" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListResponse QuotaListResponse - -// NewQuotaListResponse instantiates a new QuotaListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListResponse(quotas QuotaListResponseGetQuotasArgType) *QuotaListResponse { - this := QuotaListResponse{} - setQuotaListResponseGetQuotasAttributeType(&this.Quotas, quotas) - return &this -} - -// NewQuotaListResponseWithDefaults instantiates a new QuotaListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListResponseWithDefaults() *QuotaListResponse { - this := QuotaListResponse{} - return &this -} - -// GetQuotas returns the Quotas field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListResponse) GetQuotas() (ret QuotaListResponseGetQuotasRetType) { - ret, _ = o.GetQuotasOk() - return ret -} - -// GetQuotasOk returns a tuple with the Quotas field value -// 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 *QuotaListResponse) GetQuotasOk() (ret QuotaListResponseGetQuotasRetType, ok bool) { - return getQuotaListResponseGetQuotasAttributeTypeOk(o.Quotas) -} - -// SetQuotas sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListResponse) SetQuotas(v QuotaListResponseGetQuotasRetType) { - setQuotaListResponseGetQuotasAttributeType(&o.Quotas, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListResponseGetQuotasAttributeTypeOk(o.Quotas); ok { - toSerialize["Quotas"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListResponse struct { - value *QuotaListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListResponse) Get() *QuotaListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListResponse) Set(val *QuotaListResponse) { - 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 NullableQuotaListResponse) 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 *NullableQuotaListResponse) 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 NewNullableQuotaListResponse(val *QuotaListResponse) *NullableQuotaListResponse { - return &NullableQuotaListResponse{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 NullableQuotaListResponse) 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 *NullableQuotaListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_response_test.go b/services/iaas/model_quota_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_security_group_rules.go b/services/iaas/model_quota_list_security_group_rules.go deleted file mode 100644 index f668a46548..0000000000 --- a/services/iaas/model_quota_list_security_group_rules.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListSecurityGroupRules type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListSecurityGroupRules{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupRulesGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupRulesGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupRulesGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListSecurityGroupRulesGetLimitAttributeTypeOk(arg QuotaListSecurityGroupRulesGetLimitAttributeType) (ret QuotaListSecurityGroupRulesGetLimitRetType, 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 setQuotaListSecurityGroupRulesGetLimitAttributeType(arg *QuotaListSecurityGroupRulesGetLimitAttributeType, val QuotaListSecurityGroupRulesGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupRulesGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupRulesGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupRulesGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListSecurityGroupRulesGetUsageAttributeTypeOk(arg QuotaListSecurityGroupRulesGetUsageAttributeType) (ret QuotaListSecurityGroupRulesGetUsageRetType, 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 setQuotaListSecurityGroupRulesGetUsageAttributeType(arg *QuotaListSecurityGroupRulesGetUsageAttributeType, val QuotaListSecurityGroupRulesGetUsageRetType) { - *arg = &val -} - -// QuotaListSecurityGroupRules Number of security group rules. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupRules struct { - // REQUIRED - Limit QuotaListSecurityGroupRulesGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListSecurityGroupRulesGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListSecurityGroupRules QuotaListSecurityGroupRules - -// NewQuotaListSecurityGroupRules instantiates a new QuotaListSecurityGroupRules 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListSecurityGroupRules(limit QuotaListSecurityGroupRulesGetLimitArgType, usage QuotaListSecurityGroupRulesGetUsageArgType) *QuotaListSecurityGroupRules { - this := QuotaListSecurityGroupRules{} - setQuotaListSecurityGroupRulesGetLimitAttributeType(&this.Limit, limit) - setQuotaListSecurityGroupRulesGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListSecurityGroupRulesWithDefaults instantiates a new QuotaListSecurityGroupRules 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListSecurityGroupRulesWithDefaults() *QuotaListSecurityGroupRules { - this := QuotaListSecurityGroupRules{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSecurityGroupRules) GetLimit() (ret QuotaListSecurityGroupRulesGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListSecurityGroupRules) GetLimitOk() (ret QuotaListSecurityGroupRulesGetLimitRetType, ok bool) { - return getQuotaListSecurityGroupRulesGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSecurityGroupRules) SetLimit(v QuotaListSecurityGroupRulesGetLimitRetType) { - setQuotaListSecurityGroupRulesGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSecurityGroupRules) GetUsage() (ret QuotaListSecurityGroupRulesGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListSecurityGroupRules) GetUsageOk() (ret QuotaListSecurityGroupRulesGetUsageRetType, ok bool) { - return getQuotaListSecurityGroupRulesGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSecurityGroupRules) SetUsage(v QuotaListSecurityGroupRulesGetUsageRetType) { - setQuotaListSecurityGroupRulesGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListSecurityGroupRules) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListSecurityGroupRulesGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListSecurityGroupRulesGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListSecurityGroupRules struct { - value *QuotaListSecurityGroupRules - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListSecurityGroupRules) Get() *QuotaListSecurityGroupRules { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListSecurityGroupRules) Set(val *QuotaListSecurityGroupRules) { - 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 NullableQuotaListSecurityGroupRules) 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 *NullableQuotaListSecurityGroupRules) 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 NewNullableQuotaListSecurityGroupRules(val *QuotaListSecurityGroupRules) *NullableQuotaListSecurityGroupRules { - return &NullableQuotaListSecurityGroupRules{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 NullableQuotaListSecurityGroupRules) 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 *NullableQuotaListSecurityGroupRules) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_security_group_rules_test.go b/services/iaas/model_quota_list_security_group_rules_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_security_group_rules_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_security_groups.go b/services/iaas/model_quota_list_security_groups.go deleted file mode 100644 index 9e714e3d89..0000000000 --- a/services/iaas/model_quota_list_security_groups.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListSecurityGroups type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListSecurityGroups{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupsGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupsGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupsGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListSecurityGroupsGetLimitAttributeTypeOk(arg QuotaListSecurityGroupsGetLimitAttributeType) (ret QuotaListSecurityGroupsGetLimitRetType, 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 setQuotaListSecurityGroupsGetLimitAttributeType(arg *QuotaListSecurityGroupsGetLimitAttributeType, val QuotaListSecurityGroupsGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupsGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupsGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroupsGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListSecurityGroupsGetUsageAttributeTypeOk(arg QuotaListSecurityGroupsGetUsageAttributeType) (ret QuotaListSecurityGroupsGetUsageRetType, 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 setQuotaListSecurityGroupsGetUsageAttributeType(arg *QuotaListSecurityGroupsGetUsageAttributeType, val QuotaListSecurityGroupsGetUsageRetType) { - *arg = &val -} - -// QuotaListSecurityGroups Number of security groups. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSecurityGroups struct { - // REQUIRED - Limit QuotaListSecurityGroupsGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListSecurityGroupsGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListSecurityGroups QuotaListSecurityGroups - -// NewQuotaListSecurityGroups instantiates a new QuotaListSecurityGroups 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListSecurityGroups(limit QuotaListSecurityGroupsGetLimitArgType, usage QuotaListSecurityGroupsGetUsageArgType) *QuotaListSecurityGroups { - this := QuotaListSecurityGroups{} - setQuotaListSecurityGroupsGetLimitAttributeType(&this.Limit, limit) - setQuotaListSecurityGroupsGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListSecurityGroupsWithDefaults instantiates a new QuotaListSecurityGroups 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListSecurityGroupsWithDefaults() *QuotaListSecurityGroups { - this := QuotaListSecurityGroups{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSecurityGroups) GetLimit() (ret QuotaListSecurityGroupsGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListSecurityGroups) GetLimitOk() (ret QuotaListSecurityGroupsGetLimitRetType, ok bool) { - return getQuotaListSecurityGroupsGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSecurityGroups) SetLimit(v QuotaListSecurityGroupsGetLimitRetType) { - setQuotaListSecurityGroupsGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSecurityGroups) GetUsage() (ret QuotaListSecurityGroupsGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListSecurityGroups) GetUsageOk() (ret QuotaListSecurityGroupsGetUsageRetType, ok bool) { - return getQuotaListSecurityGroupsGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSecurityGroups) SetUsage(v QuotaListSecurityGroupsGetUsageRetType) { - setQuotaListSecurityGroupsGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListSecurityGroups) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListSecurityGroupsGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListSecurityGroupsGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListSecurityGroups struct { - value *QuotaListSecurityGroups - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListSecurityGroups) Get() *QuotaListSecurityGroups { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListSecurityGroups) Set(val *QuotaListSecurityGroups) { - 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 NullableQuotaListSecurityGroups) 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 *NullableQuotaListSecurityGroups) 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 NewNullableQuotaListSecurityGroups(val *QuotaListSecurityGroups) *NullableQuotaListSecurityGroups { - return &NullableQuotaListSecurityGroups{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 NullableQuotaListSecurityGroups) 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 *NullableQuotaListSecurityGroups) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_security_groups_test.go b/services/iaas/model_quota_list_security_groups_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_security_groups_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_snapshots.go b/services/iaas/model_quota_list_snapshots.go deleted file mode 100644 index 926dcfe225..0000000000 --- a/services/iaas/model_quota_list_snapshots.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListSnapshots type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListSnapshots{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSnapshotsGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSnapshotsGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSnapshotsGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListSnapshotsGetLimitAttributeTypeOk(arg QuotaListSnapshotsGetLimitAttributeType) (ret QuotaListSnapshotsGetLimitRetType, 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 setQuotaListSnapshotsGetLimitAttributeType(arg *QuotaListSnapshotsGetLimitAttributeType, val QuotaListSnapshotsGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSnapshotsGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSnapshotsGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSnapshotsGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListSnapshotsGetUsageAttributeTypeOk(arg QuotaListSnapshotsGetUsageAttributeType) (ret QuotaListSnapshotsGetUsageRetType, 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 setQuotaListSnapshotsGetUsageAttributeType(arg *QuotaListSnapshotsGetUsageAttributeType, val QuotaListSnapshotsGetUsageRetType) { - *arg = &val -} - -// QuotaListSnapshots Number of snapshots. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListSnapshots struct { - // REQUIRED - Limit QuotaListSnapshotsGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListSnapshotsGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListSnapshots QuotaListSnapshots - -// NewQuotaListSnapshots instantiates a new QuotaListSnapshots 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListSnapshots(limit QuotaListSnapshotsGetLimitArgType, usage QuotaListSnapshotsGetUsageArgType) *QuotaListSnapshots { - this := QuotaListSnapshots{} - setQuotaListSnapshotsGetLimitAttributeType(&this.Limit, limit) - setQuotaListSnapshotsGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListSnapshotsWithDefaults instantiates a new QuotaListSnapshots 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListSnapshotsWithDefaults() *QuotaListSnapshots { - this := QuotaListSnapshots{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSnapshots) GetLimit() (ret QuotaListSnapshotsGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListSnapshots) GetLimitOk() (ret QuotaListSnapshotsGetLimitRetType, ok bool) { - return getQuotaListSnapshotsGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSnapshots) SetLimit(v QuotaListSnapshotsGetLimitRetType) { - setQuotaListSnapshotsGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSnapshots) GetUsage() (ret QuotaListSnapshotsGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListSnapshots) GetUsageOk() (ret QuotaListSnapshotsGetUsageRetType, ok bool) { - return getQuotaListSnapshotsGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListSnapshots) SetUsage(v QuotaListSnapshotsGetUsageRetType) { - setQuotaListSnapshotsGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListSnapshots) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListSnapshotsGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListSnapshotsGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListSnapshots struct { - value *QuotaListSnapshots - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListSnapshots) Get() *QuotaListSnapshots { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListSnapshots) Set(val *QuotaListSnapshots) { - 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 NullableQuotaListSnapshots) 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 *NullableQuotaListSnapshots) 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 NewNullableQuotaListSnapshots(val *QuotaListSnapshots) *NullableQuotaListSnapshots { - return &NullableQuotaListSnapshots{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 NullableQuotaListSnapshots) 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 *NullableQuotaListSnapshots) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_snapshots_test.go b/services/iaas/model_quota_list_snapshots_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_snapshots_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_test.go b/services/iaas/model_quota_list_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_vcpu.go b/services/iaas/model_quota_list_vcpu.go deleted file mode 100644 index 63e0b064f1..0000000000 --- a/services/iaas/model_quota_list_vcpu.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListVcpu type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListVcpu{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVcpuGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVcpuGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVcpuGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListVcpuGetLimitAttributeTypeOk(arg QuotaListVcpuGetLimitAttributeType) (ret QuotaListVcpuGetLimitRetType, 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 setQuotaListVcpuGetLimitAttributeType(arg *QuotaListVcpuGetLimitAttributeType, val QuotaListVcpuGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVcpuGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVcpuGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVcpuGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListVcpuGetUsageAttributeTypeOk(arg QuotaListVcpuGetUsageAttributeType) (ret QuotaListVcpuGetUsageRetType, 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 setQuotaListVcpuGetUsageAttributeType(arg *QuotaListVcpuGetUsageAttributeType, val QuotaListVcpuGetUsageRetType) { - *arg = &val -} - -// QuotaListVcpu Number of server cores. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVcpu struct { - // REQUIRED - Limit QuotaListVcpuGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListVcpuGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListVcpu QuotaListVcpu - -// NewQuotaListVcpu instantiates a new QuotaListVcpu 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListVcpu(limit QuotaListVcpuGetLimitArgType, usage QuotaListVcpuGetUsageArgType) *QuotaListVcpu { - this := QuotaListVcpu{} - setQuotaListVcpuGetLimitAttributeType(&this.Limit, limit) - setQuotaListVcpuGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListVcpuWithDefaults instantiates a new QuotaListVcpu 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListVcpuWithDefaults() *QuotaListVcpu { - this := QuotaListVcpu{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListVcpu) GetLimit() (ret QuotaListVcpuGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListVcpu) GetLimitOk() (ret QuotaListVcpuGetLimitRetType, ok bool) { - return getQuotaListVcpuGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListVcpu) SetLimit(v QuotaListVcpuGetLimitRetType) { - setQuotaListVcpuGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListVcpu) GetUsage() (ret QuotaListVcpuGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListVcpu) GetUsageOk() (ret QuotaListVcpuGetUsageRetType, ok bool) { - return getQuotaListVcpuGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListVcpu) SetUsage(v QuotaListVcpuGetUsageRetType) { - setQuotaListVcpuGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListVcpu) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListVcpuGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListVcpuGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListVcpu struct { - value *QuotaListVcpu - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListVcpu) Get() *QuotaListVcpu { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListVcpu) Set(val *QuotaListVcpu) { - 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 NullableQuotaListVcpu) 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 *NullableQuotaListVcpu) 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 NewNullableQuotaListVcpu(val *QuotaListVcpu) *NullableQuotaListVcpu { - return &NullableQuotaListVcpu{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 NullableQuotaListVcpu) 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 *NullableQuotaListVcpu) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_vcpu_test.go b/services/iaas/model_quota_list_vcpu_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_vcpu_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_list_volumes.go b/services/iaas/model_quota_list_volumes.go deleted file mode 100644 index 3e9863060e..0000000000 --- a/services/iaas/model_quota_list_volumes.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the QuotaListVolumes type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QuotaListVolumes{} - -/* - types and functions for limit -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVolumesGetLimitAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVolumesGetLimitArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVolumesGetLimitRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListVolumesGetLimitAttributeTypeOk(arg QuotaListVolumesGetLimitAttributeType) (ret QuotaListVolumesGetLimitRetType, 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 setQuotaListVolumesGetLimitAttributeType(arg *QuotaListVolumesGetLimitAttributeType, val QuotaListVolumesGetLimitRetType) { - *arg = &val -} - -/* - types and functions for usage -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVolumesGetUsageAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVolumesGetUsageArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVolumesGetUsageRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getQuotaListVolumesGetUsageAttributeTypeOk(arg QuotaListVolumesGetUsageAttributeType) (ret QuotaListVolumesGetUsageRetType, 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 setQuotaListVolumesGetUsageAttributeType(arg *QuotaListVolumesGetUsageAttributeType, val QuotaListVolumesGetUsageRetType) { - *arg = &val -} - -// QuotaListVolumes Number of volumes. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type QuotaListVolumes struct { - // REQUIRED - Limit QuotaListVolumesGetLimitAttributeType `json:"limit" required:"true"` - // REQUIRED - Usage QuotaListVolumesGetUsageAttributeType `json:"usage" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _QuotaListVolumes QuotaListVolumes - -// NewQuotaListVolumes instantiates a new QuotaListVolumes 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListVolumes(limit QuotaListVolumesGetLimitArgType, usage QuotaListVolumesGetUsageArgType) *QuotaListVolumes { - this := QuotaListVolumes{} - setQuotaListVolumesGetLimitAttributeType(&this.Limit, limit) - setQuotaListVolumesGetUsageAttributeType(&this.Usage, usage) - return &this -} - -// NewQuotaListVolumesWithDefaults instantiates a new QuotaListVolumes 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewQuotaListVolumesWithDefaults() *QuotaListVolumes { - this := QuotaListVolumes{} - return &this -} - -// GetLimit returns the Limit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListVolumes) GetLimit() (ret QuotaListVolumesGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// 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 *QuotaListVolumes) GetLimitOk() (ret QuotaListVolumesGetLimitRetType, ok bool) { - return getQuotaListVolumesGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListVolumes) SetLimit(v QuotaListVolumesGetLimitRetType) { - setQuotaListVolumesGetLimitAttributeType(&o.Limit, v) -} - -// GetUsage returns the Usage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListVolumes) GetUsage() (ret QuotaListVolumesGetUsageRetType) { - ret, _ = o.GetUsageOk() - return ret -} - -// GetUsageOk returns a tuple with the Usage field value -// 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 *QuotaListVolumes) GetUsageOk() (ret QuotaListVolumesGetUsageRetType, ok bool) { - return getQuotaListVolumesGetUsageAttributeTypeOk(o.Usage) -} - -// SetUsage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *QuotaListVolumes) SetUsage(v QuotaListVolumesGetUsageRetType) { - setQuotaListVolumesGetUsageAttributeType(&o.Usage, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o QuotaListVolumes) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQuotaListVolumesGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - if val, ok := getQuotaListVolumesGetUsageAttributeTypeOk(o.Usage); ok { - toSerialize["Usage"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableQuotaListVolumes struct { - value *QuotaListVolumes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableQuotaListVolumes) Get() *QuotaListVolumes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableQuotaListVolumes) Set(val *QuotaListVolumes) { - 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 NullableQuotaListVolumes) 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 *NullableQuotaListVolumes) 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 NewNullableQuotaListVolumes(val *QuotaListVolumes) *NullableQuotaListVolumes { - return &NullableQuotaListVolumes{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 NullableQuotaListVolumes) 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 *NullableQuotaListVolumes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_quota_list_volumes_test.go b/services/iaas/model_quota_list_volumes_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_list_volumes_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_quota_test.go b/services/iaas/model_quota_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_quota_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_regional_area.go b/services/iaas/model_regional_area.go deleted file mode 100644 index da8e67bec5..0000000000 --- a/services/iaas/model_regional_area.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the RegionalArea type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegionalArea{} - -/* - types and functions for ipv4 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaGetIpv4AttributeType = *RegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaGetIpv4ArgType = RegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaGetIpv4RetType = RegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaGetIpv4AttributeTypeOk(arg RegionalAreaGetIpv4AttributeType) (ret RegionalAreaGetIpv4RetType, 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 setRegionalAreaGetIpv4AttributeType(arg *RegionalAreaGetIpv4AttributeType, val RegionalAreaGetIpv4RetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaGetStatusAttributeTypeOk(arg RegionalAreaGetStatusAttributeType) (ret RegionalAreaGetStatusRetType, 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 setRegionalAreaGetStatusAttributeType(arg *RegionalAreaGetStatusAttributeType, val RegionalAreaGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaGetStatusRetType = string - -// RegionalArea The basic properties of a regional network area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalArea struct { - Ipv4 RegionalAreaGetIpv4AttributeType `json:"ipv4,omitempty"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - Status RegionalAreaGetStatusAttributeType `json:"status,omitempty"` -} - -// NewRegionalArea instantiates a new RegionalArea 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRegionalArea() *RegionalArea { - this := RegionalArea{} - return &this -} - -// NewRegionalAreaWithDefaults instantiates a new RegionalArea 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRegionalAreaWithDefaults() *RegionalArea { - this := RegionalArea{} - return &this -} - -// 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 *RegionalArea) GetIpv4() (res RegionalAreaGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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 *RegionalArea) GetIpv4Ok() (ret RegionalAreaGetIpv4RetType, ok bool) { - return getRegionalAreaGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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 *RegionalArea) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given RegionalAreaIPv4 and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalArea) SetIpv4(v RegionalAreaGetIpv4RetType) { - setRegionalAreaGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetStatus returns the Status 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 *RegionalArea) GetStatus() (res RegionalAreaGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *RegionalArea) GetStatusOk() (ret RegionalAreaGetStatusRetType, ok bool) { - return getRegionalAreaGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *RegionalArea) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalArea) SetStatus(v RegionalAreaGetStatusRetType) { - setRegionalAreaGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RegionalArea) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRegionalAreaGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getRegionalAreaGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRegionalArea struct { - value *RegionalArea - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRegionalArea) Get() *RegionalArea { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRegionalArea) Set(val *RegionalArea) { - 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 NullableRegionalArea) 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 *NullableRegionalArea) 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 NewNullableRegionalArea(val *RegionalArea) *NullableRegionalArea { - return &NullableRegionalArea{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 NullableRegionalArea) 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 *NullableRegionalArea) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_regional_area_ipv4.go b/services/iaas/model_regional_area_ipv4.go deleted file mode 100644 index 52e49cbc3b..0000000000 --- a/services/iaas/model_regional_area_ipv4.go +++ /dev/null @@ -1,430 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the RegionalAreaIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegionalAreaIPv4{} - -/* - types and functions for defaultNameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetDefaultNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetDefaultNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetDefaultNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaIPv4GetDefaultNameserversAttributeTypeOk(arg RegionalAreaIPv4GetDefaultNameserversAttributeType) (ret RegionalAreaIPv4GetDefaultNameserversRetType, 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 setRegionalAreaIPv4GetDefaultNameserversAttributeType(arg *RegionalAreaIPv4GetDefaultNameserversAttributeType, val RegionalAreaIPv4GetDefaultNameserversRetType) { - *arg = &val -} - -/* - types and functions for defaultPrefixLen -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetDefaultPrefixLenAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetDefaultPrefixLenArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetDefaultPrefixLenRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaIPv4GetDefaultPrefixLenAttributeTypeOk(arg RegionalAreaIPv4GetDefaultPrefixLenAttributeType) (ret RegionalAreaIPv4GetDefaultPrefixLenRetType, 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 setRegionalAreaIPv4GetDefaultPrefixLenAttributeType(arg *RegionalAreaIPv4GetDefaultPrefixLenAttributeType, val RegionalAreaIPv4GetDefaultPrefixLenRetType) { - *arg = &val -} - -/* - types and functions for maxPrefixLen -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetMaxPrefixLenAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetMaxPrefixLenArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetMaxPrefixLenRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaIPv4GetMaxPrefixLenAttributeTypeOk(arg RegionalAreaIPv4GetMaxPrefixLenAttributeType) (ret RegionalAreaIPv4GetMaxPrefixLenRetType, 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 setRegionalAreaIPv4GetMaxPrefixLenAttributeType(arg *RegionalAreaIPv4GetMaxPrefixLenAttributeType, val RegionalAreaIPv4GetMaxPrefixLenRetType) { - *arg = &val -} - -/* - types and functions for minPrefixLen -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetMinPrefixLenAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetMinPrefixLenArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetMinPrefixLenRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaIPv4GetMinPrefixLenAttributeTypeOk(arg RegionalAreaIPv4GetMinPrefixLenAttributeType) (ret RegionalAreaIPv4GetMinPrefixLenRetType, 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 setRegionalAreaIPv4GetMinPrefixLenAttributeType(arg *RegionalAreaIPv4GetMinPrefixLenAttributeType, val RegionalAreaIPv4GetMinPrefixLenRetType) { - *arg = &val -} - -/* - types and functions for networkRanges -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetNetworkRangesAttributeType = *[]NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetNetworkRangesArgType = []NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetNetworkRangesRetType = []NetworkRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaIPv4GetNetworkRangesAttributeTypeOk(arg RegionalAreaIPv4GetNetworkRangesAttributeType) (ret RegionalAreaIPv4GetNetworkRangesRetType, 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 setRegionalAreaIPv4GetNetworkRangesAttributeType(arg *RegionalAreaIPv4GetNetworkRangesAttributeType, val RegionalAreaIPv4GetNetworkRangesRetType) { - *arg = &val -} - -/* - types and functions for transferNetwork -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetTransferNetworkAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaIPv4GetTransferNetworkAttributeTypeOk(arg RegionalAreaIPv4GetTransferNetworkAttributeType) (ret RegionalAreaIPv4GetTransferNetworkRetType, 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 setRegionalAreaIPv4GetTransferNetworkAttributeType(arg *RegionalAreaIPv4GetTransferNetworkAttributeType, val RegionalAreaIPv4GetTransferNetworkRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetTransferNetworkArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4GetTransferNetworkRetType = string - -// RegionalAreaIPv4 The regional IPv4 config of a network area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaIPv4 struct { - DefaultNameservers RegionalAreaIPv4GetDefaultNameserversAttributeType `json:"defaultNameservers,omitempty"` - // The default prefix length for networks in the network area. - // REQUIRED - DefaultPrefixLen RegionalAreaIPv4GetDefaultPrefixLenAttributeType `json:"defaultPrefixLen" required:"true"` - // The maximal prefix length for networks in the network area. - // REQUIRED - MaxPrefixLen RegionalAreaIPv4GetMaxPrefixLenAttributeType `json:"maxPrefixLen" required:"true"` - // The minimal prefix length for networks in the network area. - // REQUIRED - MinPrefixLen RegionalAreaIPv4GetMinPrefixLenAttributeType `json:"minPrefixLen" required:"true"` - // A list of network area network ranges. - // REQUIRED - NetworkRanges RegionalAreaIPv4GetNetworkRangesAttributeType `json:"networkRanges" required:"true"` - // IPv4 Classless Inter-Domain Routing (CIDR). - // REQUIRED - TransferNetwork RegionalAreaIPv4GetTransferNetworkAttributeType `json:"transferNetwork" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _RegionalAreaIPv4 RegionalAreaIPv4 - -// NewRegionalAreaIPv4 instantiates a new RegionalAreaIPv4 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRegionalAreaIPv4(defaultPrefixLen RegionalAreaIPv4GetDefaultPrefixLenArgType, maxPrefixLen RegionalAreaIPv4GetMaxPrefixLenArgType, minPrefixLen RegionalAreaIPv4GetMinPrefixLenArgType, networkRanges RegionalAreaIPv4GetNetworkRangesArgType, transferNetwork RegionalAreaIPv4GetTransferNetworkArgType) *RegionalAreaIPv4 { - this := RegionalAreaIPv4{} - setRegionalAreaIPv4GetDefaultPrefixLenAttributeType(&this.DefaultPrefixLen, defaultPrefixLen) - setRegionalAreaIPv4GetMaxPrefixLenAttributeType(&this.MaxPrefixLen, maxPrefixLen) - setRegionalAreaIPv4GetMinPrefixLenAttributeType(&this.MinPrefixLen, minPrefixLen) - setRegionalAreaIPv4GetNetworkRangesAttributeType(&this.NetworkRanges, networkRanges) - setRegionalAreaIPv4GetTransferNetworkAttributeType(&this.TransferNetwork, transferNetwork) - return &this -} - -// NewRegionalAreaIPv4WithDefaults instantiates a new RegionalAreaIPv4 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRegionalAreaIPv4WithDefaults() *RegionalAreaIPv4 { - this := RegionalAreaIPv4{} - var defaultPrefixLen int64 = 25 - this.DefaultPrefixLen = &defaultPrefixLen - var maxPrefixLen int64 = 29 - this.MaxPrefixLen = &maxPrefixLen - var minPrefixLen int64 = 24 - this.MinPrefixLen = &minPrefixLen - return &this -} - -// GetDefaultNameservers returns the DefaultNameservers 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 *RegionalAreaIPv4) GetDefaultNameservers() (res RegionalAreaIPv4GetDefaultNameserversRetType) { - res, _ = o.GetDefaultNameserversOk() - return -} - -// GetDefaultNameserversOk returns a tuple with the DefaultNameservers 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 *RegionalAreaIPv4) GetDefaultNameserversOk() (ret RegionalAreaIPv4GetDefaultNameserversRetType, ok bool) { - return getRegionalAreaIPv4GetDefaultNameserversAttributeTypeOk(o.DefaultNameservers) -} - -// HasDefaultNameservers 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 *RegionalAreaIPv4) HasDefaultNameservers() bool { - _, ok := o.GetDefaultNameserversOk() - return ok -} - -// SetDefaultNameservers gets a reference to the given []string and assigns it to the DefaultNameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) SetDefaultNameservers(v RegionalAreaIPv4GetDefaultNameserversRetType) { - setRegionalAreaIPv4GetDefaultNameserversAttributeType(&o.DefaultNameservers, v) -} - -// GetDefaultPrefixLen returns the DefaultPrefixLen field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) GetDefaultPrefixLen() (ret RegionalAreaIPv4GetDefaultPrefixLenRetType) { - ret, _ = o.GetDefaultPrefixLenOk() - return ret -} - -// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value -// 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 *RegionalAreaIPv4) GetDefaultPrefixLenOk() (ret RegionalAreaIPv4GetDefaultPrefixLenRetType, ok bool) { - return getRegionalAreaIPv4GetDefaultPrefixLenAttributeTypeOk(o.DefaultPrefixLen) -} - -// SetDefaultPrefixLen sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) SetDefaultPrefixLen(v RegionalAreaIPv4GetDefaultPrefixLenRetType) { - setRegionalAreaIPv4GetDefaultPrefixLenAttributeType(&o.DefaultPrefixLen, v) -} - -// GetMaxPrefixLen returns the MaxPrefixLen field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) GetMaxPrefixLen() (ret RegionalAreaIPv4GetMaxPrefixLenRetType) { - ret, _ = o.GetMaxPrefixLenOk() - return ret -} - -// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value -// 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 *RegionalAreaIPv4) GetMaxPrefixLenOk() (ret RegionalAreaIPv4GetMaxPrefixLenRetType, ok bool) { - return getRegionalAreaIPv4GetMaxPrefixLenAttributeTypeOk(o.MaxPrefixLen) -} - -// SetMaxPrefixLen sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) SetMaxPrefixLen(v RegionalAreaIPv4GetMaxPrefixLenRetType) { - setRegionalAreaIPv4GetMaxPrefixLenAttributeType(&o.MaxPrefixLen, v) -} - -// GetMinPrefixLen returns the MinPrefixLen field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) GetMinPrefixLen() (ret RegionalAreaIPv4GetMinPrefixLenRetType) { - ret, _ = o.GetMinPrefixLenOk() - return ret -} - -// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value -// 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 *RegionalAreaIPv4) GetMinPrefixLenOk() (ret RegionalAreaIPv4GetMinPrefixLenRetType, ok bool) { - return getRegionalAreaIPv4GetMinPrefixLenAttributeTypeOk(o.MinPrefixLen) -} - -// SetMinPrefixLen sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) SetMinPrefixLen(v RegionalAreaIPv4GetMinPrefixLenRetType) { - setRegionalAreaIPv4GetMinPrefixLenAttributeType(&o.MinPrefixLen, v) -} - -// GetNetworkRanges returns the NetworkRanges field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) GetNetworkRanges() (ret RegionalAreaIPv4GetNetworkRangesRetType) { - ret, _ = o.GetNetworkRangesOk() - return ret -} - -// GetNetworkRangesOk returns a tuple with the NetworkRanges field value -// 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 *RegionalAreaIPv4) GetNetworkRangesOk() (ret RegionalAreaIPv4GetNetworkRangesRetType, ok bool) { - return getRegionalAreaIPv4GetNetworkRangesAttributeTypeOk(o.NetworkRanges) -} - -// SetNetworkRanges sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) SetNetworkRanges(v RegionalAreaIPv4GetNetworkRangesRetType) { - setRegionalAreaIPv4GetNetworkRangesAttributeType(&o.NetworkRanges, v) -} - -// GetTransferNetwork returns the TransferNetwork field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) GetTransferNetwork() (ret RegionalAreaIPv4GetTransferNetworkRetType) { - ret, _ = o.GetTransferNetworkOk() - return ret -} - -// GetTransferNetworkOk returns a tuple with the TransferNetwork field value -// 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 *RegionalAreaIPv4) GetTransferNetworkOk() (ret RegionalAreaIPv4GetTransferNetworkRetType, ok bool) { - return getRegionalAreaIPv4GetTransferNetworkAttributeTypeOk(o.TransferNetwork) -} - -// SetTransferNetwork sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaIPv4) SetTransferNetwork(v RegionalAreaIPv4GetTransferNetworkRetType) { - setRegionalAreaIPv4GetTransferNetworkAttributeType(&o.TransferNetwork, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RegionalAreaIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRegionalAreaIPv4GetDefaultNameserversAttributeTypeOk(o.DefaultNameservers); ok { - toSerialize["DefaultNameservers"] = val - } - if val, ok := getRegionalAreaIPv4GetDefaultPrefixLenAttributeTypeOk(o.DefaultPrefixLen); ok { - toSerialize["DefaultPrefixLen"] = val - } - if val, ok := getRegionalAreaIPv4GetMaxPrefixLenAttributeTypeOk(o.MaxPrefixLen); ok { - toSerialize["MaxPrefixLen"] = val - } - if val, ok := getRegionalAreaIPv4GetMinPrefixLenAttributeTypeOk(o.MinPrefixLen); ok { - toSerialize["MinPrefixLen"] = val - } - if val, ok := getRegionalAreaIPv4GetNetworkRangesAttributeTypeOk(o.NetworkRanges); ok { - toSerialize["NetworkRanges"] = val - } - if val, ok := getRegionalAreaIPv4GetTransferNetworkAttributeTypeOk(o.TransferNetwork); ok { - toSerialize["TransferNetwork"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRegionalAreaIPv4 struct { - value *RegionalAreaIPv4 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRegionalAreaIPv4) Get() *RegionalAreaIPv4 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRegionalAreaIPv4) Set(val *RegionalAreaIPv4) { - 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 NullableRegionalAreaIPv4) 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 *NullableRegionalAreaIPv4) 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 NewNullableRegionalAreaIPv4(val *RegionalAreaIPv4) *NullableRegionalAreaIPv4 { - return &NullableRegionalAreaIPv4{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 NullableRegionalAreaIPv4) 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 *NullableRegionalAreaIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_regional_area_ipv4_test.go b/services/iaas/model_regional_area_ipv4_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_regional_area_ipv4_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_regional_area_list_response.go b/services/iaas/model_regional_area_list_response.go deleted file mode 100644 index 39a8a7c662..0000000000 --- a/services/iaas/model_regional_area_list_response.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the RegionalAreaListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegionalAreaListResponse{} - -/* - types and functions for regions -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaListResponseGetRegionsAttributeType = *map[string]RegionalArea - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaListResponseGetRegionsArgType = map[string]RegionalArea - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaListResponseGetRegionsRetType = map[string]RegionalArea - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRegionalAreaListResponseGetRegionsAttributeTypeOk(arg RegionalAreaListResponseGetRegionsAttributeType) (ret RegionalAreaListResponseGetRegionsRetType, 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 setRegionalAreaListResponseGetRegionsAttributeType(arg *RegionalAreaListResponseGetRegionsAttributeType, val RegionalAreaListResponseGetRegionsRetType) { - *arg = &val -} - -// RegionalAreaListResponse Regional area list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RegionalAreaListResponse struct { - // REQUIRED - Regions RegionalAreaListResponseGetRegionsAttributeType `json:"regions" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _RegionalAreaListResponse RegionalAreaListResponse - -// NewRegionalAreaListResponse instantiates a new RegionalAreaListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRegionalAreaListResponse(regions RegionalAreaListResponseGetRegionsArgType) *RegionalAreaListResponse { - this := RegionalAreaListResponse{} - setRegionalAreaListResponseGetRegionsAttributeType(&this.Regions, regions) - return &this -} - -// NewRegionalAreaListResponseWithDefaults instantiates a new RegionalAreaListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRegionalAreaListResponseWithDefaults() *RegionalAreaListResponse { - this := RegionalAreaListResponse{} - return &this -} - -// GetRegions returns the Regions field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaListResponse) GetRegions() (ret RegionalAreaListResponseGetRegionsRetType) { - ret, _ = o.GetRegionsOk() - return ret -} - -// GetRegionsOk returns a tuple with the Regions field value -// 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 *RegionalAreaListResponse) GetRegionsOk() (ret RegionalAreaListResponseGetRegionsRetType, ok bool) { - return getRegionalAreaListResponseGetRegionsAttributeTypeOk(o.Regions) -} - -// SetRegions sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RegionalAreaListResponse) SetRegions(v RegionalAreaListResponseGetRegionsRetType) { - setRegionalAreaListResponseGetRegionsAttributeType(&o.Regions, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RegionalAreaListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRegionalAreaListResponseGetRegionsAttributeTypeOk(o.Regions); ok { - toSerialize["Regions"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRegionalAreaListResponse struct { - value *RegionalAreaListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRegionalAreaListResponse) Get() *RegionalAreaListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRegionalAreaListResponse) Set(val *RegionalAreaListResponse) { - 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 NullableRegionalAreaListResponse) 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 *NullableRegionalAreaListResponse) 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 NewNullableRegionalAreaListResponse(val *RegionalAreaListResponse) *NullableRegionalAreaListResponse { - return &NullableRegionalAreaListResponse{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 NullableRegionalAreaListResponse) 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 *NullableRegionalAreaListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_regional_area_list_response_test.go b/services/iaas/model_regional_area_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_regional_area_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_regional_area_test.go b/services/iaas/model_regional_area_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_regional_area_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_request.go b/services/iaas/model_request.go deleted file mode 100644 index ac639c9172..0000000000 --- a/services/iaas/model_request.go +++ /dev/null @@ -1,423 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Request{} - -/* - types and functions for details -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetDetailsAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestGetDetailsAttributeTypeOk(arg RequestGetDetailsAttributeType) (ret RequestGetDetailsRetType, 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 setRequestGetDetailsAttributeType(arg *RequestGetDetailsAttributeType, val RequestGetDetailsRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetDetailsArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetDetailsRetType = string - -/* - types and functions for requestAction -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestActionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestGetRequestActionAttributeTypeOk(arg RequestGetRequestActionAttributeType) (ret RequestGetRequestActionRetType, 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 setRequestGetRequestActionAttributeType(arg *RequestGetRequestActionAttributeType, val RequestGetRequestActionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestActionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestActionRetType = string - -/* - types and functions for requestId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestGetRequestIdAttributeTypeOk(arg RequestGetRequestIdAttributeType) (ret RequestGetRequestIdRetType, 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 setRequestGetRequestIdAttributeType(arg *RequestGetRequestIdAttributeType, val RequestGetRequestIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestIdRetType = string - -/* - types and functions for requestType -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestGetRequestTypeAttributeTypeOk(arg RequestGetRequestTypeAttributeType) (ret RequestGetRequestTypeRetType, 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 setRequestGetRequestTypeAttributeType(arg *RequestGetRequestTypeAttributeType, val RequestGetRequestTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetRequestTypeRetType = string - -/* - types and functions for resources -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetResourcesAttributeType = *[]RequestResource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetResourcesArgType = []RequestResource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetResourcesRetType = []RequestResource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestGetResourcesAttributeTypeOk(arg RequestGetResourcesAttributeType) (ret RequestGetResourcesRetType, 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 setRequestGetResourcesAttributeType(arg *RequestGetResourcesAttributeType, val RequestGetResourcesRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestGetStatusAttributeTypeOk(arg RequestGetStatusAttributeType) (ret RequestGetStatusRetType, 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 setRequestGetStatusAttributeType(arg *RequestGetStatusAttributeType, val RequestGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestGetStatusRetType = string - -// Request Object that represents a request. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Request struct { - Details RequestGetDetailsAttributeType `json:"details,omitempty"` - // Object that represents a resource action. Possible values: `CREATE`, `DELETE`, `UPDATE`. - // REQUIRED - RequestAction RequestGetRequestActionAttributeType `json:"requestAction" required:"true"` - // Identifier (ID) representing a single API request. - // REQUIRED - RequestId RequestGetRequestIdAttributeType `json:"requestId" required:"true"` - // Object that represents a resource type. Possible values: `BACKUP`, `IMAGE`, `NETWORK`, `NETWORKAREA`, `NIC`, `PROJECT`, `ROUTE`, `SERVER`, `SERVICEACCOUNT`, `SNAPSHOT`, `VIRTUALIP`, `VOLUME`, `VPC`, `VPCNETWORKRANGE`. - // REQUIRED - RequestType RequestGetRequestTypeAttributeType `json:"requestType" required:"true"` - // REQUIRED - Resources RequestGetResourcesAttributeType `json:"resources" required:"true"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - // REQUIRED - Status RequestGetStatusAttributeType `json:"status" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Request Request - -// NewRequest instantiates a new Request 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRequest(requestAction RequestGetRequestActionArgType, requestId RequestGetRequestIdArgType, requestType RequestGetRequestTypeArgType, resources RequestGetResourcesArgType, status RequestGetStatusArgType) *Request { - this := Request{} - setRequestGetRequestActionAttributeType(&this.RequestAction, requestAction) - setRequestGetRequestIdAttributeType(&this.RequestId, requestId) - setRequestGetRequestTypeAttributeType(&this.RequestType, requestType) - setRequestGetResourcesAttributeType(&this.Resources, resources) - setRequestGetStatusAttributeType(&this.Status, status) - return &this -} - -// NewRequestWithDefaults instantiates a new Request 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRequestWithDefaults() *Request { - this := Request{} - return &this -} - -// GetDetails returns the Details 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 *Request) GetDetails() (res RequestGetDetailsRetType) { - res, _ = o.GetDetailsOk() - return -} - -// GetDetailsOk returns a tuple with the Details 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 *Request) GetDetailsOk() (ret RequestGetDetailsRetType, ok bool) { - return getRequestGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails 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 *Request) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given string and assigns it to the Details field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) SetDetails(v RequestGetDetailsRetType) { - setRequestGetDetailsAttributeType(&o.Details, v) -} - -// GetRequestAction returns the RequestAction field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) GetRequestAction() (ret RequestGetRequestActionRetType) { - ret, _ = o.GetRequestActionOk() - return ret -} - -// GetRequestActionOk returns a tuple with the RequestAction field value -// 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 *Request) GetRequestActionOk() (ret RequestGetRequestActionRetType, ok bool) { - return getRequestGetRequestActionAttributeTypeOk(o.RequestAction) -} - -// SetRequestAction sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) SetRequestAction(v RequestGetRequestActionRetType) { - setRequestGetRequestActionAttributeType(&o.RequestAction, v) -} - -// GetRequestId returns the RequestId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) GetRequestId() (ret RequestGetRequestIdRetType) { - ret, _ = o.GetRequestIdOk() - return ret -} - -// GetRequestIdOk returns a tuple with the RequestId field value -// 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 *Request) GetRequestIdOk() (ret RequestGetRequestIdRetType, ok bool) { - return getRequestGetRequestIdAttributeTypeOk(o.RequestId) -} - -// SetRequestId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) SetRequestId(v RequestGetRequestIdRetType) { - setRequestGetRequestIdAttributeType(&o.RequestId, v) -} - -// GetRequestType returns the RequestType field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) GetRequestType() (ret RequestGetRequestTypeRetType) { - ret, _ = o.GetRequestTypeOk() - return ret -} - -// GetRequestTypeOk returns a tuple with the RequestType field value -// 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 *Request) GetRequestTypeOk() (ret RequestGetRequestTypeRetType, ok bool) { - return getRequestGetRequestTypeAttributeTypeOk(o.RequestType) -} - -// SetRequestType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) SetRequestType(v RequestGetRequestTypeRetType) { - setRequestGetRequestTypeAttributeType(&o.RequestType, v) -} - -// GetResources returns the Resources field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) GetResources() (ret RequestGetResourcesRetType) { - ret, _ = o.GetResourcesOk() - return ret -} - -// GetResourcesOk returns a tuple with the Resources field value -// 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 *Request) GetResourcesOk() (ret RequestGetResourcesRetType, ok bool) { - return getRequestGetResourcesAttributeTypeOk(o.Resources) -} - -// SetResources sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) SetResources(v RequestGetResourcesRetType) { - setRequestGetResourcesAttributeType(&o.Resources, 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 *Request) GetStatus() (ret RequestGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// 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 *Request) GetStatusOk() (ret RequestGetStatusRetType, ok bool) { - return getRequestGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Request) SetStatus(v RequestGetStatusRetType) { - setRequestGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRequestGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getRequestGetRequestActionAttributeTypeOk(o.RequestAction); ok { - toSerialize["RequestAction"] = val - } - if val, ok := getRequestGetRequestIdAttributeTypeOk(o.RequestId); ok { - toSerialize["RequestId"] = val - } - if val, ok := getRequestGetRequestTypeAttributeTypeOk(o.RequestType); ok { - toSerialize["RequestType"] = val - } - if val, ok := getRequestGetResourcesAttributeTypeOk(o.Resources); ok { - toSerialize["Resources"] = val - } - if val, ok := getRequestGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRequest struct { - value *Request - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRequest) Get() *Request { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRequest) Set(val *Request) { - 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 NullableRequest) 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 *NullableRequest) 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 NewNullableRequest(val *Request) *NullableRequest { - return &NullableRequest{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 NullableRequest) 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 *NullableRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_request_resource.go b/services/iaas/model_request_resource.go deleted file mode 100644 index a094610b1b..0000000000 --- a/services/iaas/model_request_resource.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the RequestResource type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RequestResource{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestResourceGetIdAttributeTypeOk(arg RequestResourceGetIdAttributeType) (ret RequestResourceGetIdRetType, 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 setRequestResourceGetIdAttributeType(arg *RequestResourceGetIdAttributeType, val RequestResourceGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetIdRetType = string - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestResourceGetStatusAttributeTypeOk(arg RequestResourceGetStatusAttributeType) (ret RequestResourceGetStatusRetType, 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 setRequestResourceGetStatusAttributeType(arg *RequestResourceGetStatusAttributeType, val RequestResourceGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetStatusRetType = string - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRequestResourceGetTypeAttributeTypeOk(arg RequestResourceGetTypeAttributeType) (ret RequestResourceGetTypeRetType, 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 setRequestResourceGetTypeAttributeType(arg *RequestResourceGetTypeAttributeType, val RequestResourceGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResourceGetTypeRetType = string - -// RequestResource Object that represents a resource as part of a request. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RequestResource struct { - // Universally Unique Identifier (UUID). - // REQUIRED - Id RequestResourceGetIdAttributeType `json:"id" required:"true"` - // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. - // REQUIRED - Status RequestResourceGetStatusAttributeType `json:"status" required:"true"` - // Object that represents a resource type. Possible values: `BACKUP`, `IMAGE`, `NETWORK`, `NETWORKAREA`, `NIC`, `PROJECT`, `ROUTE`, `SERVER`, `SERVICEACCOUNT`, `SNAPSHOT`, `VIRTUALIP`, `VOLUME`, `VPC`, `VPCNETWORKRANGE`. - // REQUIRED - Type RequestResourceGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _RequestResource RequestResource - -// NewRequestResource instantiates a new RequestResource 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRequestResource(id RequestResourceGetIdArgType, status RequestResourceGetStatusArgType, types RequestResourceGetTypeArgType) *RequestResource { - this := RequestResource{} - setRequestResourceGetIdAttributeType(&this.Id, id) - setRequestResourceGetStatusAttributeType(&this.Status, status) - setRequestResourceGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewRequestResourceWithDefaults instantiates a new RequestResource 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRequestResourceWithDefaults() *RequestResource { - this := RequestResource{} - return &this -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RequestResource) GetId() (ret RequestResourceGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// 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 *RequestResource) GetIdOk() (ret RequestResourceGetIdRetType, ok bool) { - return getRequestResourceGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RequestResource) SetId(v RequestResourceGetIdRetType) { - setRequestResourceGetIdAttributeType(&o.Id, 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 *RequestResource) GetStatus() (ret RequestResourceGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// 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 *RequestResource) GetStatusOk() (ret RequestResourceGetStatusRetType, ok bool) { - return getRequestResourceGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RequestResource) SetStatus(v RequestResourceGetStatusRetType) { - setRequestResourceGetStatusAttributeType(&o.Status, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RequestResource) GetType() (ret RequestResourceGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *RequestResource) GetTypeOk() (ret RequestResourceGetTypeRetType, ok bool) { - return getRequestResourceGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RequestResource) SetType(v RequestResourceGetTypeRetType) { - setRequestResourceGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RequestResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRequestResourceGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getRequestResourceGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getRequestResourceGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRequestResource struct { - value *RequestResource - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRequestResource) Get() *RequestResource { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRequestResource) Set(val *RequestResource) { - 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 NullableRequestResource) 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 *NullableRequestResource) 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 NewNullableRequestResource(val *RequestResource) *NullableRequestResource { - return &NullableRequestResource{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 NullableRequestResource) 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 *NullableRequestResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_request_resource_test.go b/services/iaas/model_request_resource_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_request_resource_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_request_test.go b/services/iaas/model_request_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_request_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_rescue_server_payload.go b/services/iaas/model_rescue_server_payload.go deleted file mode 100644 index 688d0d4c18..0000000000 --- a/services/iaas/model_rescue_server_payload.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the RescueServerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RescueServerPayload{} - -/* - types and functions for image -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RescueServerPayloadGetImageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRescueServerPayloadGetImageAttributeTypeOk(arg RescueServerPayloadGetImageAttributeType) (ret RescueServerPayloadGetImageRetType, 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 setRescueServerPayloadGetImageAttributeType(arg *RescueServerPayloadGetImageAttributeType, val RescueServerPayloadGetImageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RescueServerPayloadGetImageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RescueServerPayloadGetImageRetType = string - -// RescueServerPayload struct for RescueServerPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RescueServerPayload struct { - // Universally Unique Identifier (UUID). - // REQUIRED - Image RescueServerPayloadGetImageAttributeType `json:"image" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _RescueServerPayload RescueServerPayload - -// NewRescueServerPayload instantiates a new RescueServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRescueServerPayload(image RescueServerPayloadGetImageArgType) *RescueServerPayload { - this := RescueServerPayload{} - setRescueServerPayloadGetImageAttributeType(&this.Image, image) - return &this -} - -// NewRescueServerPayloadWithDefaults instantiates a new RescueServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRescueServerPayloadWithDefaults() *RescueServerPayload { - this := RescueServerPayload{} - return &this -} - -// GetImage returns the Image field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RescueServerPayload) GetImage() (ret RescueServerPayloadGetImageRetType) { - ret, _ = o.GetImageOk() - return ret -} - -// GetImageOk returns a tuple with the Image field value -// 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 *RescueServerPayload) GetImageOk() (ret RescueServerPayloadGetImageRetType, ok bool) { - return getRescueServerPayloadGetImageAttributeTypeOk(o.Image) -} - -// SetImage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RescueServerPayload) SetImage(v RescueServerPayloadGetImageRetType) { - setRescueServerPayloadGetImageAttributeType(&o.Image, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RescueServerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRescueServerPayloadGetImageAttributeTypeOk(o.Image); ok { - toSerialize["Image"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRescueServerPayload struct { - value *RescueServerPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRescueServerPayload) Get() *RescueServerPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRescueServerPayload) Set(val *RescueServerPayload) { - 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 NullableRescueServerPayload) 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 *NullableRescueServerPayload) 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 NewNullableRescueServerPayload(val *RescueServerPayload) *NullableRescueServerPayload { - return &NullableRescueServerPayload{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 NullableRescueServerPayload) 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 *NullableRescueServerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_rescue_server_payload_test.go b/services/iaas/model_rescue_server_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_rescue_server_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_resize_server_payload.go b/services/iaas/model_resize_server_payload.go deleted file mode 100644 index 2724149894..0000000000 --- a/services/iaas/model_resize_server_payload.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ResizeServerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ResizeServerPayload{} - -/* - types and functions for machineType -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeServerPayloadGetMachineTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getResizeServerPayloadGetMachineTypeAttributeTypeOk(arg ResizeServerPayloadGetMachineTypeAttributeType) (ret ResizeServerPayloadGetMachineTypeRetType, 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 setResizeServerPayloadGetMachineTypeAttributeType(arg *ResizeServerPayloadGetMachineTypeAttributeType, val ResizeServerPayloadGetMachineTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeServerPayloadGetMachineTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeServerPayloadGetMachineTypeRetType = string - -// ResizeServerPayload struct for ResizeServerPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeServerPayload struct { - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - MachineType ResizeServerPayloadGetMachineTypeAttributeType `json:"machineType" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ResizeServerPayload ResizeServerPayload - -// NewResizeServerPayload instantiates a new ResizeServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewResizeServerPayload(machineType ResizeServerPayloadGetMachineTypeArgType) *ResizeServerPayload { - this := ResizeServerPayload{} - setResizeServerPayloadGetMachineTypeAttributeType(&this.MachineType, machineType) - return &this -} - -// NewResizeServerPayloadWithDefaults instantiates a new ResizeServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewResizeServerPayloadWithDefaults() *ResizeServerPayload { - this := ResizeServerPayload{} - return &this -} - -// GetMachineType returns the MachineType field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ResizeServerPayload) GetMachineType() (ret ResizeServerPayloadGetMachineTypeRetType) { - ret, _ = o.GetMachineTypeOk() - return ret -} - -// GetMachineTypeOk returns a tuple with the MachineType field value -// 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 *ResizeServerPayload) GetMachineTypeOk() (ret ResizeServerPayloadGetMachineTypeRetType, ok bool) { - return getResizeServerPayloadGetMachineTypeAttributeTypeOk(o.MachineType) -} - -// SetMachineType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ResizeServerPayload) SetMachineType(v ResizeServerPayloadGetMachineTypeRetType) { - setResizeServerPayloadGetMachineTypeAttributeType(&o.MachineType, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ResizeServerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getResizeServerPayloadGetMachineTypeAttributeTypeOk(o.MachineType); ok { - toSerialize["MachineType"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableResizeServerPayload struct { - value *ResizeServerPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableResizeServerPayload) Get() *ResizeServerPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableResizeServerPayload) Set(val *ResizeServerPayload) { - 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 NullableResizeServerPayload) 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 *NullableResizeServerPayload) 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 NewNullableResizeServerPayload(val *ResizeServerPayload) *NullableResizeServerPayload { - return &NullableResizeServerPayload{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 NullableResizeServerPayload) 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 *NullableResizeServerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_resize_server_payload_test.go b/services/iaas/model_resize_server_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_resize_server_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_resize_volume_payload.go b/services/iaas/model_resize_volume_payload.go deleted file mode 100644 index a73c7301e9..0000000000 --- a/services/iaas/model_resize_volume_payload.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ResizeVolumePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ResizeVolumePayload{} - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeVolumePayloadGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeVolumePayloadGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeVolumePayloadGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getResizeVolumePayloadGetSizeAttributeTypeOk(arg ResizeVolumePayloadGetSizeAttributeType) (ret ResizeVolumePayloadGetSizeRetType, 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 setResizeVolumePayloadGetSizeAttributeType(arg *ResizeVolumePayloadGetSizeAttributeType, val ResizeVolumePayloadGetSizeRetType) { - *arg = &val -} - -// ResizeVolumePayload struct for ResizeVolumePayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResizeVolumePayload struct { - // Size in Gigabyte. - // REQUIRED - Size ResizeVolumePayloadGetSizeAttributeType `json:"size" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ResizeVolumePayload ResizeVolumePayload - -// NewResizeVolumePayload instantiates a new ResizeVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewResizeVolumePayload(size ResizeVolumePayloadGetSizeArgType) *ResizeVolumePayload { - this := ResizeVolumePayload{} - setResizeVolumePayloadGetSizeAttributeType(&this.Size, size) - return &this -} - -// NewResizeVolumePayloadWithDefaults instantiates a new ResizeVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewResizeVolumePayloadWithDefaults() *ResizeVolumePayload { - this := ResizeVolumePayload{} - return &this -} - -// GetSize returns the Size field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ResizeVolumePayload) GetSize() (ret ResizeVolumePayloadGetSizeRetType) { - ret, _ = o.GetSizeOk() - return ret -} - -// GetSizeOk returns a tuple with the Size field value -// 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 *ResizeVolumePayload) GetSizeOk() (ret ResizeVolumePayloadGetSizeRetType, ok bool) { - return getResizeVolumePayloadGetSizeAttributeTypeOk(o.Size) -} - -// SetSize sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ResizeVolumePayload) SetSize(v ResizeVolumePayloadGetSizeRetType) { - setResizeVolumePayloadGetSizeAttributeType(&o.Size, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ResizeVolumePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getResizeVolumePayloadGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableResizeVolumePayload struct { - value *ResizeVolumePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableResizeVolumePayload) Get() *ResizeVolumePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableResizeVolumePayload) Set(val *ResizeVolumePayload) { - 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 NullableResizeVolumePayload) 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 *NullableResizeVolumePayload) 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 NewNullableResizeVolumePayload(val *ResizeVolumePayload) *NullableResizeVolumePayload { - return &NullableResizeVolumePayload{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 NullableResizeVolumePayload) 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 *NullableResizeVolumePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_resize_volume_payload_test.go b/services/iaas/model_resize_volume_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_resize_volume_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_route.go b/services/iaas/model_route.go deleted file mode 100644 index 40c9e4a6e4..0000000000 --- a/services/iaas/model_route.go +++ /dev/null @@ -1,439 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Route type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Route{} - -/* - 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 RouteGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRouteGetCreatedAtAttributeTypeOk(arg RouteGetCreatedAtAttributeType) (ret RouteGetCreatedAtRetType, 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 setRouteGetCreatedAtAttributeType(arg *RouteGetCreatedAtAttributeType, val RouteGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for destination -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetDestinationAttributeType = *RouteDestination - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetDestinationArgType = RouteDestination - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetDestinationRetType = RouteDestination - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRouteGetDestinationAttributeTypeOk(arg RouteGetDestinationAttributeType) (ret RouteGetDestinationRetType, 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 setRouteGetDestinationAttributeType(arg *RouteGetDestinationAttributeType, val RouteGetDestinationRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRouteGetIdAttributeTypeOk(arg RouteGetIdAttributeType) (ret RouteGetIdRetType, 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 setRouteGetIdAttributeType(arg *RouteGetIdAttributeType, val RouteGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRouteGetLabelsAttributeTypeOk(arg RouteGetLabelsAttributeType) (ret RouteGetLabelsRetType, 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 setRouteGetLabelsAttributeType(arg *RouteGetLabelsAttributeType, val RouteGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for nexthop -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetNexthopAttributeType = *RouteNexthop - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetNexthopArgType = RouteNexthop - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetNexthopRetType = RouteNexthop - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRouteGetNexthopAttributeTypeOk(arg RouteGetNexthopAttributeType) (ret RouteGetNexthopRetType, 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 setRouteGetNexthopAttributeType(arg *RouteGetNexthopAttributeType, val RouteGetNexthopRetType) { - *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 RouteGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRouteGetUpdatedAtAttributeTypeOk(arg RouteGetUpdatedAtAttributeType) (ret RouteGetUpdatedAtRetType, 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 setRouteGetUpdatedAtAttributeType(arg *RouteGetUpdatedAtAttributeType, val RouteGetUpdatedAtRetType) { - *arg = &val -} - -// Route Object represents a network route. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Route struct { - // Date-time when resource was created. - CreatedAt RouteGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // REQUIRED - 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. - Labels RouteGetLabelsAttributeType `json:"labels,omitempty"` - // REQUIRED - Nexthop RouteGetNexthopAttributeType `json:"nexthop" required:"true"` - // Date-time when resource was last updated. - UpdatedAt RouteGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRoute(destination RouteGetDestinationArgType, nexthop RouteGetNexthopArgType) *Route { - this := Route{} - setRouteGetDestinationAttributeType(&this.Destination, destination) - setRouteGetNexthopAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRouteWithDefaults() *Route { - this := Route{} - 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 *Route) GetCreatedAt() (res RouteGetCreatedAtRetType) { - 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 *Route) GetCreatedAtOk() (ret RouteGetCreatedAtRetType, ok bool) { - return getRouteGetCreatedAtAttributeTypeOk(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 *Route) 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 *Route) SetCreatedAt(v RouteGetCreatedAtRetType) { - setRouteGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetDestination returns the Destination field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) GetDestination() (ret RouteGetDestinationRetType) { - ret, _ = o.GetDestinationOk() - return ret -} - -// GetDestinationOk returns a tuple with the Destination field value -// 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 *Route) GetDestinationOk() (ret RouteGetDestinationRetType, ok bool) { - return getRouteGetDestinationAttributeTypeOk(o.Destination) -} - -// SetDestination sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) SetDestination(v RouteGetDestinationRetType) { - setRouteGetDestinationAttributeType(&o.Destination, 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 *Route) GetId() (res RouteGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *Route) GetIdOk() (ret RouteGetIdRetType, ok bool) { - return getRouteGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Route) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) SetId(v RouteGetIdRetType) { - setRouteGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) GetLabels() (res RouteGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) GetLabelsOk() (ret RouteGetLabelsRetType, ok bool) { - return getRouteGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) SetLabels(v RouteGetLabelsRetType) { - setRouteGetLabelsAttributeType(&o.Labels, v) -} - -// GetNexthop returns the Nexthop field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) GetNexthop() (ret RouteGetNexthopRetType) { - ret, _ = o.GetNexthopOk() - return ret -} - -// GetNexthopOk returns a tuple with the Nexthop field value -// 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 *Route) GetNexthopOk() (ret RouteGetNexthopRetType, ok bool) { - return getRouteGetNexthopAttributeTypeOk(o.Nexthop) -} - -// SetNexthop sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Route) SetNexthop(v RouteGetNexthopRetType) { - setRouteGetNexthopAttributeType(&o.Nexthop, 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 *Route) GetUpdatedAt() (res RouteGetUpdatedAtRetType) { - 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 *Route) GetUpdatedAtOk() (ret RouteGetUpdatedAtRetType, ok bool) { - return getRouteGetUpdatedAtAttributeTypeOk(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 *Route) 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 *Route) SetUpdatedAt(v RouteGetUpdatedAtRetType) { - setRouteGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Route) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRouteGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getRouteGetDestinationAttributeTypeOk(o.Destination); ok { - toSerialize["Destination"] = val - } - if val, ok := getRouteGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getRouteGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getRouteGetNexthopAttributeTypeOk(o.Nexthop); ok { - toSerialize["Nexthop"] = val - } - if val, ok := getRouteGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRoute struct { - value *Route - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRoute) Get() *Route { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRoute) Set(val *Route) { - 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 NullableRoute) 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 *NullableRoute) 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 NewNullableRoute(val *Route) *NullableRoute { - return &NullableRoute{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 NullableRoute) 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 *NullableRoute) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_route_destination.go b/services/iaas/model_route_destination.go deleted file mode 100644 index 9ab00e4994..0000000000 --- a/services/iaas/model_route_destination.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" -) - -// RouteDestination - struct for RouteDestination -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteDestination struct { - DestinationCIDRv4 *DestinationCIDRv4 - DestinationCIDRv6 *DestinationCIDRv6 -} - -// DestinationCIDRv4AsRouteDestination is a convenience function that returns DestinationCIDRv4 wrapped in RouteDestination -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DestinationCIDRv4AsRouteDestination(v *DestinationCIDRv4) RouteDestination { - return RouteDestination{ - DestinationCIDRv4: v, - } -} - -// DestinationCIDRv6AsRouteDestination is a convenience function that returns DestinationCIDRv6 wrapped in RouteDestination -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DestinationCIDRv6AsRouteDestination(v *DestinationCIDRv6) RouteDestination { - return RouteDestination{ - DestinationCIDRv6: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 'DestinationCIDRv4' - if jsonDict["type"] == "DestinationCIDRv4" { - // 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 'DestinationCIDRv6' - if jsonDict["type"] == "DestinationCIDRv6" { - // 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()) - } - } - - // 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) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.DestinationCIDRv4 != nil { - return json.Marshal(&src.DestinationCIDRv4) - } - - if src.DestinationCIDRv6 != nil { - return json.Marshal(&src.DestinationCIDRv6) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRouteDestination struct { - value *RouteDestination - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRouteDestination) Get() *RouteDestination { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRouteDestination) Set(val *RouteDestination) { - 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 NullableRouteDestination) 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 *NullableRouteDestination) 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 NewNullableRouteDestination(val *RouteDestination) *NullableRouteDestination { - return &NullableRouteDestination{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 NullableRouteDestination) 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 *NullableRouteDestination) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_route_destination_test.go b/services/iaas/model_route_destination_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_route_destination_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_route_list_response.go b/services/iaas/model_route_list_response.go deleted file mode 100644 index 25baea67d9..0000000000 --- a/services/iaas/model_route_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the RouteListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RouteListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteListResponseGetItemsAttributeType = *[]Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteListResponseGetItemsArgType = []Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteListResponseGetItemsRetType = []Route - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRouteListResponseGetItemsAttributeTypeOk(arg RouteListResponseGetItemsAttributeType) (ret RouteListResponseGetItemsRetType, 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 setRouteListResponseGetItemsAttributeType(arg *RouteListResponseGetItemsAttributeType, val RouteListResponseGetItemsRetType) { - *arg = &val -} - -// RouteListResponse Route list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteListResponse struct { - // A list of routes. - // REQUIRED - Items RouteListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRouteListResponse(items RouteListResponseGetItemsArgType) *RouteListResponse { - this := RouteListResponse{} - setRouteListResponseGetItemsAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRouteListResponseWithDefaults() *RouteListResponse { - this := RouteListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RouteListResponse) GetItems() (ret RouteListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *RouteListResponse) GetItemsOk() (ret RouteListResponseGetItemsRetType, ok bool) { - return getRouteListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RouteListResponse) SetItems(v RouteListResponseGetItemsRetType) { - setRouteListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RouteListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRouteListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRouteListResponse struct { - value *RouteListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRouteListResponse) Get() *RouteListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRouteListResponse) Set(val *RouteListResponse) { - 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 NullableRouteListResponse) 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 *NullableRouteListResponse) 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 NewNullableRouteListResponse(val *RouteListResponse) *NullableRouteListResponse { - return &NullableRouteListResponse{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 NullableRouteListResponse) 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 *NullableRouteListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_route_list_response_test.go b/services/iaas/model_route_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_route_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_route_nexthop.go b/services/iaas/model_route_nexthop.go deleted file mode 100644 index 00ff093a22..0000000000 --- a/services/iaas/model_route_nexthop.go +++ /dev/null @@ -1,260 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" -) - -// RouteNexthop - struct for RouteNexthop -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RouteNexthop struct { - NexthopBlackhole *NexthopBlackhole - NexthopIPv4 *NexthopIPv4 - NexthopIPv6 *NexthopIPv6 - NexthopInternet *NexthopInternet -} - -// NexthopBlackholeAsRouteNexthop is a convenience function that returns NexthopBlackhole wrapped in RouteNexthop -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NexthopBlackholeAsRouteNexthop(v *NexthopBlackhole) RouteNexthop { - return RouteNexthop{ - NexthopBlackhole: v, - } -} - -// NexthopIPv4AsRouteNexthop is a convenience function that returns NexthopIPv4 wrapped in RouteNexthop -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NexthopIPv4AsRouteNexthop(v *NexthopIPv4) RouteNexthop { - return RouteNexthop{ - NexthopIPv4: v, - } -} - -// NexthopIPv6AsRouteNexthop is a convenience function that returns NexthopIPv6 wrapped in RouteNexthop -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NexthopIPv6AsRouteNexthop(v *NexthopIPv6) RouteNexthop { - return RouteNexthop{ - NexthopIPv6: v, - } -} - -// NexthopInternetAsRouteNexthop is a convenience function that returns NexthopInternet wrapped in RouteNexthop -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NexthopInternetAsRouteNexthop(v *NexthopInternet) RouteNexthop { - return RouteNexthop{ - NexthopInternet: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 'NexthopBlackhole' - if jsonDict["type"] == "NexthopBlackhole" { - // 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 'NexthopIPv4' - if jsonDict["type"] == "NexthopIPv4" { - // 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 'NexthopIPv6' - if jsonDict["type"] == "NexthopIPv6" { - // 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()) - } - } - - // check if the discriminator value is 'NexthopInternet' - if jsonDict["type"] == "NexthopInternet" { - // 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 '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) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - 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 []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRouteNexthop struct { - value *RouteNexthop - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRouteNexthop) Get() *RouteNexthop { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRouteNexthop) Set(val *RouteNexthop) { - 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 NullableRouteNexthop) 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 *NullableRouteNexthop) 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 NewNullableRouteNexthop(val *RouteNexthop) *NullableRouteNexthop { - return &NullableRouteNexthop{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 NullableRouteNexthop) 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 *NullableRouteNexthop) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_route_nexthop_test.go b/services/iaas/model_route_nexthop_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_route_nexthop_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_route_test.go b/services/iaas/model_route_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_route_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_routing_table.go b/services/iaas/model_routing_table.go deleted file mode 100644 index ac8735e532..0000000000 --- a/services/iaas/model_routing_table.go +++ /dev/null @@ -1,627 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the RoutingTable type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RoutingTable{} - -/* - 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 RoutingTableGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTableGetCreatedAtAttributeTypeOk(arg RoutingTableGetCreatedAtAttributeType) (ret RoutingTableGetCreatedAtRetType, 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 setRoutingTableGetCreatedAtAttributeType(arg *RoutingTableGetCreatedAtAttributeType, val RoutingTableGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for default -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetDefaultAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetDefaultArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetDefaultRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTablegetDefaultAttributeTypeOk(arg RoutingTablegetDefaultAttributeType) (ret RoutingTablegetDefaultRetType, 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 setRoutingTablegetDefaultAttributeType(arg *RoutingTablegetDefaultAttributeType, val RoutingTablegetDefaultRetType) { - *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 RoutingTableGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTableGetDescriptionAttributeTypeOk(arg RoutingTableGetDescriptionAttributeType) (ret RoutingTableGetDescriptionRetType, 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 setRoutingTableGetDescriptionAttributeType(arg *RoutingTableGetDescriptionAttributeType, val RoutingTableGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetDescriptionRetType = string - -/* - types and functions for dynamicRoutes -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetDynamicRoutesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetDynamicRoutesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetDynamicRoutesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTablegetDynamicRoutesAttributeTypeOk(arg RoutingTablegetDynamicRoutesAttributeType) (ret RoutingTablegetDynamicRoutesRetType, 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 setRoutingTablegetDynamicRoutesAttributeType(arg *RoutingTablegetDynamicRoutesAttributeType, val RoutingTablegetDynamicRoutesRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTableGetIdAttributeTypeOk(arg RoutingTableGetIdAttributeType) (ret RoutingTableGetIdRetType, 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 setRoutingTableGetIdAttributeType(arg *RoutingTableGetIdAttributeType, val RoutingTableGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTableGetLabelsAttributeTypeOk(arg RoutingTableGetLabelsAttributeType) (ret RoutingTableGetLabelsRetType, 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 setRoutingTableGetLabelsAttributeType(arg *RoutingTableGetLabelsAttributeType, val RoutingTableGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTableGetNameAttributeTypeOk(arg RoutingTableGetNameAttributeType) (ret RoutingTableGetNameRetType, 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 setRoutingTableGetNameAttributeType(arg *RoutingTableGetNameAttributeType, val RoutingTableGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetNameRetType = string - -/* - types and functions for systemRoutes -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetSystemRoutesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetSystemRoutesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTablegetSystemRoutesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTablegetSystemRoutesAttributeTypeOk(arg RoutingTablegetSystemRoutesAttributeType) (ret RoutingTablegetSystemRoutesRetType, 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 setRoutingTablegetSystemRoutesAttributeType(arg *RoutingTablegetSystemRoutesAttributeType, val RoutingTablegetSystemRoutesRetType) { - *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 RoutingTableGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTableGetUpdatedAtAttributeTypeOk(arg RoutingTableGetUpdatedAtAttributeType) (ret RoutingTableGetUpdatedAtRetType, 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 setRoutingTableGetUpdatedAtAttributeType(arg *RoutingTableGetUpdatedAtAttributeType, val RoutingTableGetUpdatedAtRetType) { - *arg = &val -} - -// RoutingTable An object representing a routing table. Filterable Fields: `dynamicRoutes`, `systemRoutes`. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTable struct { - // Date-time when resource was created. - CreatedAt RoutingTableGetCreatedAtAttributeType `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 RoutingTablegetDefaultAttributeType `json:"default,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description RoutingTableGetDescriptionAttributeType `json:"description,omitempty"` - // A config setting for a routing table which allows propagation of dynamic routes to this routing table. - 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. - Labels RoutingTableGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name RoutingTableGetNameAttributeType `json:"name" required:"true"` - // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes RoutingTablegetSystemRoutesAttributeType `json:"systemRoutes,omitempty"` - // Date-time when resource was last updated. - UpdatedAt RoutingTableGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRoutingTable(name RoutingTableGetNameArgType) *RoutingTable { - this := RoutingTable{} - setRoutingTableGetNameAttributeType(&this.Name, name) - 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) GetCreatedAt() (res RoutingTableGetCreatedAtRetType) { - 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 *RoutingTable) GetCreatedAtOk() (ret RoutingTableGetCreatedAtRetType, ok bool) { - return getRoutingTableGetCreatedAtAttributeTypeOk(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 *RoutingTable) 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 *RoutingTable) SetCreatedAt(v RoutingTableGetCreatedAtRetType) { - setRoutingTableGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetDefault returns the Default 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 *RoutingTable) GetDefault() (res RoutingTablegetDefaultRetType) { - res, _ = o.GetDefaultOk() - return -} - -// GetDefaultOk returns a tuple with the Default 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 *RoutingTable) GetDefaultOk() (ret RoutingTablegetDefaultRetType, ok bool) { - return getRoutingTablegetDefaultAttributeTypeOk(o.Default) -} - -// HasDefault 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 *RoutingTable) HasDefault() bool { - _, ok := o.GetDefaultOk() - return ok -} - -// SetDefault gets a reference to the given bool and assigns it to the Default field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) SetDefault(v RoutingTablegetDefaultRetType) { - setRoutingTablegetDefaultAttributeType(&o.Default, 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 *RoutingTable) GetDescription() (res RoutingTableGetDescriptionRetType) { - 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 *RoutingTable) GetDescriptionOk() (ret RoutingTableGetDescriptionRetType, ok bool) { - return getRoutingTableGetDescriptionAttributeTypeOk(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 *RoutingTable) 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 *RoutingTable) SetDescription(v RoutingTableGetDescriptionRetType) { - setRoutingTableGetDescriptionAttributeType(&o.Description, v) -} - -// GetDynamicRoutes returns the DynamicRoutes 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 *RoutingTable) GetDynamicRoutes() (res RoutingTablegetDynamicRoutesRetType) { - res, _ = o.GetDynamicRoutesOk() - return -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes 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 *RoutingTable) GetDynamicRoutesOk() (ret RoutingTablegetDynamicRoutesRetType, ok bool) { - return getRoutingTablegetDynamicRoutesAttributeTypeOk(o.DynamicRoutes) -} - -// HasDynamicRoutes 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 *RoutingTable) HasDynamicRoutes() bool { - _, ok := o.GetDynamicRoutesOk() - return ok -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) SetDynamicRoutes(v RoutingTablegetDynamicRoutesRetType) { - setRoutingTablegetDynamicRoutesAttributeType(&o.DynamicRoutes, 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 *RoutingTable) GetId() (res RoutingTableGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *RoutingTable) GetIdOk() (ret RoutingTableGetIdRetType, ok bool) { - return getRoutingTableGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *RoutingTable) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) SetId(v RoutingTableGetIdRetType) { - setRoutingTableGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) GetLabels() (res RoutingTableGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) GetLabelsOk() (ret RoutingTableGetLabelsRetType, ok bool) { - return getRoutingTableGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) SetLabels(v RoutingTableGetLabelsRetType) { - setRoutingTableGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) GetName() (ret RoutingTableGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *RoutingTable) GetNameOk() (ret RoutingTableGetNameRetType, ok bool) { - return getRoutingTableGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) SetName(v RoutingTableGetNameRetType) { - setRoutingTableGetNameAttributeType(&o.Name, v) -} - -// GetSystemRoutes returns the SystemRoutes 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 *RoutingTable) GetSystemRoutes() (res RoutingTablegetSystemRoutesRetType) { - res, _ = o.GetSystemRoutesOk() - return -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes 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 *RoutingTable) GetSystemRoutesOk() (ret RoutingTablegetSystemRoutesRetType, ok bool) { - return getRoutingTablegetSystemRoutesAttributeTypeOk(o.SystemRoutes) -} - -// HasSystemRoutes 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 *RoutingTable) HasSystemRoutes() bool { - _, ok := o.GetSystemRoutesOk() - return ok -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTable) SetSystemRoutes(v RoutingTablegetSystemRoutesRetType) { - setRoutingTablegetSystemRoutesAttributeType(&o.SystemRoutes, 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 *RoutingTable) GetUpdatedAt() (res RoutingTableGetUpdatedAtRetType) { - 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 *RoutingTable) GetUpdatedAtOk() (ret RoutingTableGetUpdatedAtRetType, ok bool) { - return getRoutingTableGetUpdatedAtAttributeTypeOk(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 *RoutingTable) 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 *RoutingTable) SetUpdatedAt(v RoutingTableGetUpdatedAtRetType) { - setRoutingTableGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RoutingTable) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRoutingTableGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getRoutingTablegetDefaultAttributeTypeOk(o.Default); ok { - toSerialize["Default"] = val - } - if val, ok := getRoutingTableGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getRoutingTablegetDynamicRoutesAttributeTypeOk(o.DynamicRoutes); ok { - toSerialize["DynamicRoutes"] = val - } - if val, ok := getRoutingTableGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getRoutingTableGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getRoutingTableGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getRoutingTablegetSystemRoutesAttributeTypeOk(o.SystemRoutes); ok { - toSerialize["SystemRoutes"] = val - } - if val, ok := getRoutingTableGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRoutingTable struct { - value *RoutingTable - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRoutingTable) Get() *RoutingTable { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRoutingTable) Set(val *RoutingTable) { - 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 NullableRoutingTable) 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 *NullableRoutingTable) 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 NewNullableRoutingTable(val *RoutingTable) *NullableRoutingTable { - return &NullableRoutingTable{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 NullableRoutingTable) 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 *NullableRoutingTable) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_routing_table_list_response.go b/services/iaas/model_routing_table_list_response.go deleted file mode 100644 index d7eaeff7ad..0000000000 --- a/services/iaas/model_routing_table_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the RoutingTableListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RoutingTableListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableListResponseGetItemsAttributeType = *[]RoutingTable - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableListResponseGetItemsArgType = []RoutingTable - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableListResponseGetItemsRetType = []RoutingTable - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRoutingTableListResponseGetItemsAttributeTypeOk(arg RoutingTableListResponseGetItemsAttributeType) (ret RoutingTableListResponseGetItemsRetType, 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 setRoutingTableListResponseGetItemsAttributeType(arg *RoutingTableListResponseGetItemsAttributeType, val RoutingTableListResponseGetItemsRetType) { - *arg = &val -} - -// RoutingTableListResponse Routing table response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RoutingTableListResponse struct { - // A list of routing tables. - // REQUIRED - Items RoutingTableListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRoutingTableListResponse(items RoutingTableListResponseGetItemsArgType) *RoutingTableListResponse { - this := RoutingTableListResponse{} - setRoutingTableListResponseGetItemsAttributeType(&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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRoutingTableListResponseWithDefaults() *RoutingTableListResponse { - this := RoutingTableListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTableListResponse) GetItems() (ret RoutingTableListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *RoutingTableListResponse) GetItemsOk() (ret RoutingTableListResponseGetItemsRetType, ok bool) { - return getRoutingTableListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RoutingTableListResponse) SetItems(v RoutingTableListResponseGetItemsRetType) { - setRoutingTableListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RoutingTableListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRoutingTableListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRoutingTableListResponse struct { - value *RoutingTableListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRoutingTableListResponse) Get() *RoutingTableListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRoutingTableListResponse) Set(val *RoutingTableListResponse) { - 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 NullableRoutingTableListResponse) 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 *NullableRoutingTableListResponse) 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 NewNullableRoutingTableListResponse(val *RoutingTableListResponse) *NullableRoutingTableListResponse { - return &NullableRoutingTableListResponse{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 NullableRoutingTableListResponse) 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 *NullableRoutingTableListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_routing_table_list_response_test.go b/services/iaas/model_routing_table_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_routing_table_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_routing_table_test.go b/services/iaas/model_routing_table_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_routing_table_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_security_group.go b/services/iaas/model_security_group.go deleted file mode 100644 index e9e9d20d6b..0000000000 --- a/services/iaas/model_security_group.go +++ /dev/null @@ -1,566 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the SecurityGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecurityGroup{} - -/* - 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 SecurityGroupGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupGetCreatedAtAttributeTypeOk(arg SecurityGroupGetCreatedAtAttributeType) (ret SecurityGroupGetCreatedAtRetType, 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 setSecurityGroupGetCreatedAtAttributeType(arg *SecurityGroupGetCreatedAtAttributeType, val SecurityGroupGetCreatedAtRetType) { - *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 SecurityGroupGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupGetDescriptionAttributeTypeOk(arg SecurityGroupGetDescriptionAttributeType) (ret SecurityGroupGetDescriptionRetType, 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 setSecurityGroupGetDescriptionAttributeType(arg *SecurityGroupGetDescriptionAttributeType, val SecurityGroupGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetDescriptionRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupGetIdAttributeTypeOk(arg SecurityGroupGetIdAttributeType) (ret SecurityGroupGetIdRetType, 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 setSecurityGroupGetIdAttributeType(arg *SecurityGroupGetIdAttributeType, val SecurityGroupGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupGetLabelsAttributeTypeOk(arg SecurityGroupGetLabelsAttributeType) (ret SecurityGroupGetLabelsRetType, 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 setSecurityGroupGetLabelsAttributeType(arg *SecurityGroupGetLabelsAttributeType, val SecurityGroupGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupGetNameAttributeTypeOk(arg SecurityGroupGetNameAttributeType) (ret SecurityGroupGetNameRetType, 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 setSecurityGroupGetNameAttributeType(arg *SecurityGroupGetNameAttributeType, val SecurityGroupGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetNameRetType = string - -/* - types and functions for rules -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetRulesAttributeType = *[]SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetRulesArgType = []SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetRulesRetType = []SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupGetRulesAttributeTypeOk(arg SecurityGroupGetRulesAttributeType) (ret SecurityGroupGetRulesRetType, 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 setSecurityGroupGetRulesAttributeType(arg *SecurityGroupGetRulesAttributeType, val SecurityGroupGetRulesRetType) { - *arg = &val -} - -/* - types and functions for stateful -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupgetStatefulAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupgetStatefulArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupgetStatefulRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupgetStatefulAttributeTypeOk(arg SecurityGroupgetStatefulAttributeType) (ret SecurityGroupgetStatefulRetType, 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 setSecurityGroupgetStatefulAttributeType(arg *SecurityGroupgetStatefulAttributeType, val SecurityGroupgetStatefulRetType) { - *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 SecurityGroupGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupGetUpdatedAtAttributeTypeOk(arg SecurityGroupGetUpdatedAtAttributeType) (ret SecurityGroupGetUpdatedAtRetType, 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 setSecurityGroupGetUpdatedAtAttributeType(arg *SecurityGroupGetUpdatedAtAttributeType, val SecurityGroupGetUpdatedAtRetType) { - *arg = &val -} - -// SecurityGroup Object that represents a security group. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroup struct { - // Date-time when resource was created. - CreatedAt SecurityGroupGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - 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. - Labels SecurityGroupGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name SecurityGroupGetNameAttributeType `json:"name" required:"true"` - // A list containing security group rule objects. - Rules SecurityGroupGetRulesAttributeType `json:"rules,omitempty"` - // Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server. - Stateful SecurityGroupgetStatefulAttributeType `json:"stateful,omitempty"` - // Date-time when resource was last updated. - UpdatedAt SecurityGroupGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _SecurityGroup SecurityGroup - -// NewSecurityGroup instantiates a new SecurityGroup 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroup(name SecurityGroupGetNameArgType) *SecurityGroup { - this := SecurityGroup{} - setSecurityGroupGetNameAttributeType(&this.Name, name) - return &this -} - -// NewSecurityGroupWithDefaults instantiates a new SecurityGroup 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupWithDefaults() *SecurityGroup { - this := SecurityGroup{} - var stateful bool = true - this.Stateful = &stateful - 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 *SecurityGroup) GetCreatedAt() (res SecurityGroupGetCreatedAtRetType) { - 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 *SecurityGroup) GetCreatedAtOk() (ret SecurityGroupGetCreatedAtRetType, ok bool) { - return getSecurityGroupGetCreatedAtAttributeTypeOk(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 *SecurityGroup) 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 *SecurityGroup) SetCreatedAt(v SecurityGroupGetCreatedAtRetType) { - setSecurityGroupGetCreatedAtAttributeType(&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 *SecurityGroup) GetDescription() (res SecurityGroupGetDescriptionRetType) { - 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 *SecurityGroup) GetDescriptionOk() (ret SecurityGroupGetDescriptionRetType, ok bool) { - return getSecurityGroupGetDescriptionAttributeTypeOk(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 *SecurityGroup) 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 *SecurityGroup) SetDescription(v SecurityGroupGetDescriptionRetType) { - setSecurityGroupGetDescriptionAttributeType(&o.Description, 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 *SecurityGroup) GetId() (res SecurityGroupGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *SecurityGroup) GetIdOk() (ret SecurityGroupGetIdRetType, ok bool) { - return getSecurityGroupGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *SecurityGroup) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) SetId(v SecurityGroupGetIdRetType) { - setSecurityGroupGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) GetLabels() (res SecurityGroupGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) GetLabelsOk() (ret SecurityGroupGetLabelsRetType, ok bool) { - return getSecurityGroupGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) SetLabels(v SecurityGroupGetLabelsRetType) { - setSecurityGroupGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) GetName() (ret SecurityGroupGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *SecurityGroup) GetNameOk() (ret SecurityGroupGetNameRetType, ok bool) { - return getSecurityGroupGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) SetName(v SecurityGroupGetNameRetType) { - setSecurityGroupGetNameAttributeType(&o.Name, v) -} - -// GetRules returns the Rules 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 *SecurityGroup) GetRules() (res SecurityGroupGetRulesRetType) { - res, _ = o.GetRulesOk() - return -} - -// GetRulesOk returns a tuple with the Rules 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 *SecurityGroup) GetRulesOk() (ret SecurityGroupGetRulesRetType, ok bool) { - return getSecurityGroupGetRulesAttributeTypeOk(o.Rules) -} - -// HasRules 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 *SecurityGroup) HasRules() bool { - _, ok := o.GetRulesOk() - return ok -} - -// SetRules gets a reference to the given []SecurityGroupRule and assigns it to the Rules field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) SetRules(v SecurityGroupGetRulesRetType) { - setSecurityGroupGetRulesAttributeType(&o.Rules, v) -} - -// GetStateful returns the Stateful 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 *SecurityGroup) GetStateful() (res SecurityGroupgetStatefulRetType) { - res, _ = o.GetStatefulOk() - return -} - -// GetStatefulOk returns a tuple with the Stateful 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 *SecurityGroup) GetStatefulOk() (ret SecurityGroupgetStatefulRetType, ok bool) { - return getSecurityGroupgetStatefulAttributeTypeOk(o.Stateful) -} - -// HasStateful 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 *SecurityGroup) HasStateful() bool { - _, ok := o.GetStatefulOk() - return ok -} - -// SetStateful gets a reference to the given bool and assigns it to the Stateful field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroup) SetStateful(v SecurityGroupgetStatefulRetType) { - setSecurityGroupgetStatefulAttributeType(&o.Stateful, 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 *SecurityGroup) GetUpdatedAt() (res SecurityGroupGetUpdatedAtRetType) { - 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 *SecurityGroup) GetUpdatedAtOk() (ret SecurityGroupGetUpdatedAtRetType, ok bool) { - return getSecurityGroupGetUpdatedAtAttributeTypeOk(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 *SecurityGroup) 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 *SecurityGroup) SetUpdatedAt(v SecurityGroupGetUpdatedAtRetType) { - setSecurityGroupGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SecurityGroup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSecurityGroupGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getSecurityGroupGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getSecurityGroupGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getSecurityGroupGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getSecurityGroupGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getSecurityGroupGetRulesAttributeTypeOk(o.Rules); ok { - toSerialize["Rules"] = val - } - if val, ok := getSecurityGroupgetStatefulAttributeTypeOk(o.Stateful); ok { - toSerialize["Stateful"] = val - } - if val, ok := getSecurityGroupGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSecurityGroup struct { - value *SecurityGroup - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSecurityGroup) Get() *SecurityGroup { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSecurityGroup) Set(val *SecurityGroup) { - 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 NullableSecurityGroup) 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 *NullableSecurityGroup) 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 NewNullableSecurityGroup(val *SecurityGroup) *NullableSecurityGroup { - return &NullableSecurityGroup{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 NullableSecurityGroup) 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 *NullableSecurityGroup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_security_group_list_response.go b/services/iaas/model_security_group_list_response.go deleted file mode 100644 index 3a08de3b43..0000000000 --- a/services/iaas/model_security_group_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the SecurityGroupListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecurityGroupListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupListResponseGetItemsAttributeType = *[]SecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupListResponseGetItemsArgType = []SecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupListResponseGetItemsRetType = []SecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupListResponseGetItemsAttributeTypeOk(arg SecurityGroupListResponseGetItemsAttributeType) (ret SecurityGroupListResponseGetItemsRetType, 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 setSecurityGroupListResponseGetItemsAttributeType(arg *SecurityGroupListResponseGetItemsAttributeType, val SecurityGroupListResponseGetItemsRetType) { - *arg = &val -} - -// SecurityGroupListResponse Security group list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupListResponse struct { - // A list containing security group objects. - // REQUIRED - Items SecurityGroupListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _SecurityGroupListResponse SecurityGroupListResponse - -// NewSecurityGroupListResponse instantiates a new SecurityGroupListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupListResponse(items SecurityGroupListResponseGetItemsArgType) *SecurityGroupListResponse { - this := SecurityGroupListResponse{} - setSecurityGroupListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewSecurityGroupListResponseWithDefaults instantiates a new SecurityGroupListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupListResponseWithDefaults() *SecurityGroupListResponse { - this := SecurityGroupListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupListResponse) GetItems() (ret SecurityGroupListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *SecurityGroupListResponse) GetItemsOk() (ret SecurityGroupListResponseGetItemsRetType, ok bool) { - return getSecurityGroupListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupListResponse) SetItems(v SecurityGroupListResponseGetItemsRetType) { - setSecurityGroupListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SecurityGroupListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSecurityGroupListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSecurityGroupListResponse struct { - value *SecurityGroupListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSecurityGroupListResponse) Get() *SecurityGroupListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSecurityGroupListResponse) Set(val *SecurityGroupListResponse) { - 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 NullableSecurityGroupListResponse) 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 *NullableSecurityGroupListResponse) 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 NewNullableSecurityGroupListResponse(val *SecurityGroupListResponse) *NullableSecurityGroupListResponse { - return &NullableSecurityGroupListResponse{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 NullableSecurityGroupListResponse) 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 *NullableSecurityGroupListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_security_group_list_response_test.go b/services/iaas/model_security_group_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_security_group_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_security_group_rule.go b/services/iaas/model_security_group_rule.go deleted file mode 100644 index 16eb244264..0000000000 --- a/services/iaas/model_security_group_rule.go +++ /dev/null @@ -1,799 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the SecurityGroupRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecurityGroupRule{} - -/* - 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 SecurityGroupRuleGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetCreatedAtAttributeTypeOk(arg SecurityGroupRuleGetCreatedAtAttributeType) (ret SecurityGroupRuleGetCreatedAtRetType, 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 setSecurityGroupRuleGetCreatedAtAttributeType(arg *SecurityGroupRuleGetCreatedAtAttributeType, val SecurityGroupRuleGetCreatedAtRetType) { - *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 SecurityGroupRuleGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetDescriptionAttributeTypeOk(arg SecurityGroupRuleGetDescriptionAttributeType) (ret SecurityGroupRuleGetDescriptionRetType, 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 setSecurityGroupRuleGetDescriptionAttributeType(arg *SecurityGroupRuleGetDescriptionAttributeType, val SecurityGroupRuleGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetDescriptionRetType = string - -/* - types and functions for direction -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetDirectionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetDirectionAttributeTypeOk(arg SecurityGroupRuleGetDirectionAttributeType) (ret SecurityGroupRuleGetDirectionRetType, 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 setSecurityGroupRuleGetDirectionAttributeType(arg *SecurityGroupRuleGetDirectionAttributeType, val SecurityGroupRuleGetDirectionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetDirectionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetDirectionRetType = string - -/* - types and functions for ethertype -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetEthertypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetEthertypeAttributeTypeOk(arg SecurityGroupRuleGetEthertypeAttributeType) (ret SecurityGroupRuleGetEthertypeRetType, 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 setSecurityGroupRuleGetEthertypeAttributeType(arg *SecurityGroupRuleGetEthertypeAttributeType, val SecurityGroupRuleGetEthertypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetEthertypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetEthertypeRetType = string - -/* - types and functions for icmpParameters -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIcmpParametersAttributeType = *ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIcmpParametersArgType = ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIcmpParametersRetType = ICMPParameters - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetIcmpParametersAttributeTypeOk(arg SecurityGroupRuleGetIcmpParametersAttributeType) (ret SecurityGroupRuleGetIcmpParametersRetType, 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 setSecurityGroupRuleGetIcmpParametersAttributeType(arg *SecurityGroupRuleGetIcmpParametersAttributeType, val SecurityGroupRuleGetIcmpParametersRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetIdAttributeTypeOk(arg SecurityGroupRuleGetIdAttributeType) (ret SecurityGroupRuleGetIdRetType, 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 setSecurityGroupRuleGetIdAttributeType(arg *SecurityGroupRuleGetIdAttributeType, val SecurityGroupRuleGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIdRetType = string - -/* - types and functions for ipRange -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIpRangeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetIpRangeAttributeTypeOk(arg SecurityGroupRuleGetIpRangeAttributeType) (ret SecurityGroupRuleGetIpRangeRetType, 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 setSecurityGroupRuleGetIpRangeAttributeType(arg *SecurityGroupRuleGetIpRangeAttributeType, val SecurityGroupRuleGetIpRangeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIpRangeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetIpRangeRetType = string - -/* - types and functions for portRange -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetPortRangeAttributeType = *PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetPortRangeArgType = PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetPortRangeRetType = PortRange - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetPortRangeAttributeTypeOk(arg SecurityGroupRuleGetPortRangeAttributeType) (ret SecurityGroupRuleGetPortRangeRetType, 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 setSecurityGroupRuleGetPortRangeAttributeType(arg *SecurityGroupRuleGetPortRangeAttributeType, val SecurityGroupRuleGetPortRangeRetType) { - *arg = &val -} - -/* - types and functions for remoteSecurityGroupId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetRemoteSecurityGroupIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(arg SecurityGroupRuleGetRemoteSecurityGroupIdAttributeType) (ret SecurityGroupRuleGetRemoteSecurityGroupIdRetType, 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 setSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType(arg *SecurityGroupRuleGetRemoteSecurityGroupIdAttributeType, val SecurityGroupRuleGetRemoteSecurityGroupIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetRemoteSecurityGroupIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetRemoteSecurityGroupIdRetType = string - -/* - types and functions for securityGroupId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetSecurityGroupIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(arg SecurityGroupRuleGetSecurityGroupIdAttributeType) (ret SecurityGroupRuleGetSecurityGroupIdRetType, 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 setSecurityGroupRuleGetSecurityGroupIdAttributeType(arg *SecurityGroupRuleGetSecurityGroupIdAttributeType, val SecurityGroupRuleGetSecurityGroupIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetSecurityGroupIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetSecurityGroupIdRetType = 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 SecurityGroupRuleGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetUpdatedAtAttributeTypeOk(arg SecurityGroupRuleGetUpdatedAtAttributeType) (ret SecurityGroupRuleGetUpdatedAtRetType, 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 setSecurityGroupRuleGetUpdatedAtAttributeType(arg *SecurityGroupRuleGetUpdatedAtAttributeType, val SecurityGroupRuleGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for protocol -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetProtocolAttributeType = *Protocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetProtocolArgType = Protocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleGetProtocolRetType = Protocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleGetProtocolAttributeTypeOk(arg SecurityGroupRuleGetProtocolAttributeType) (ret SecurityGroupRuleGetProtocolRetType, 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 setSecurityGroupRuleGetProtocolAttributeType(arg *SecurityGroupRuleGetProtocolAttributeType, val SecurityGroupRuleGetProtocolRetType) { - *arg = &val -} - -// SecurityGroupRule Object that represents a security group rule. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRule struct { - // Date-time when resource was created. - CreatedAt SecurityGroupRuleGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description SecurityGroupRuleGetDescriptionAttributeType `json:"description,omitempty"` - // The direction of the traffic which the rule should match. Possible values: `ingress`, `egress`. - // REQUIRED - Direction SecurityGroupRuleGetDirectionAttributeType `json:"direction" required:"true"` - // The ethertype which the rule should match. Possible values: `IPv4`, `IPv6`. - Ethertype SecurityGroupRuleGetEthertypeAttributeType `json:"ethertype,omitempty"` - IcmpParameters SecurityGroupRuleGetIcmpParametersAttributeType `json:"icmpParameters,omitempty"` - // Universally Unique Identifier (UUID). - Id SecurityGroupRuleGetIdAttributeType `json:"id,omitempty"` - // Classless Inter-Domain Routing (CIDR). - IpRange SecurityGroupRuleGetIpRangeAttributeType `json:"ipRange,omitempty"` - PortRange SecurityGroupRuleGetPortRangeAttributeType `json:"portRange,omitempty"` - // Universally Unique Identifier (UUID). - RemoteSecurityGroupId SecurityGroupRuleGetRemoteSecurityGroupIdAttributeType `json:"remoteSecurityGroupId,omitempty"` - // Universally Unique Identifier (UUID). - SecurityGroupId SecurityGroupRuleGetSecurityGroupIdAttributeType `json:"securityGroupId,omitempty"` - // Date-time when resource was last updated. - UpdatedAt SecurityGroupRuleGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - Protocol SecurityGroupRuleGetProtocolAttributeType `json:"protocol,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _SecurityGroupRule SecurityGroupRule - -// NewSecurityGroupRule instantiates a new SecurityGroupRule 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupRule(direction SecurityGroupRuleGetDirectionArgType) *SecurityGroupRule { - this := SecurityGroupRule{} - setSecurityGroupRuleGetDirectionAttributeType(&this.Direction, direction) - return &this -} - -// NewSecurityGroupRuleWithDefaults instantiates a new SecurityGroupRule 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupRuleWithDefaults() *SecurityGroupRule { - this := SecurityGroupRule{} - var ethertype string = "IPv4" - this.Ethertype = ðertype - 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 *SecurityGroupRule) GetCreatedAt() (res SecurityGroupRuleGetCreatedAtRetType) { - 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 *SecurityGroupRule) GetCreatedAtOk() (ret SecurityGroupRuleGetCreatedAtRetType, ok bool) { - return getSecurityGroupRuleGetCreatedAtAttributeTypeOk(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 *SecurityGroupRule) 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 *SecurityGroupRule) SetCreatedAt(v SecurityGroupRuleGetCreatedAtRetType) { - setSecurityGroupRuleGetCreatedAtAttributeType(&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 *SecurityGroupRule) GetDescription() (res SecurityGroupRuleGetDescriptionRetType) { - 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 *SecurityGroupRule) GetDescriptionOk() (ret SecurityGroupRuleGetDescriptionRetType, ok bool) { - return getSecurityGroupRuleGetDescriptionAttributeTypeOk(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 *SecurityGroupRule) 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 *SecurityGroupRule) SetDescription(v SecurityGroupRuleGetDescriptionRetType) { - setSecurityGroupRuleGetDescriptionAttributeType(&o.Description, v) -} - -// GetDirection returns the Direction field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) GetDirection() (ret SecurityGroupRuleGetDirectionRetType) { - ret, _ = o.GetDirectionOk() - return ret -} - -// GetDirectionOk returns a tuple with the Direction field value -// 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 *SecurityGroupRule) GetDirectionOk() (ret SecurityGroupRuleGetDirectionRetType, ok bool) { - return getSecurityGroupRuleGetDirectionAttributeTypeOk(o.Direction) -} - -// SetDirection sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetDirection(v SecurityGroupRuleGetDirectionRetType) { - setSecurityGroupRuleGetDirectionAttributeType(&o.Direction, v) -} - -// GetEthertype returns the Ethertype 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 *SecurityGroupRule) GetEthertype() (res SecurityGroupRuleGetEthertypeRetType) { - res, _ = o.GetEthertypeOk() - return -} - -// GetEthertypeOk returns a tuple with the Ethertype 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 *SecurityGroupRule) GetEthertypeOk() (ret SecurityGroupRuleGetEthertypeRetType, ok bool) { - return getSecurityGroupRuleGetEthertypeAttributeTypeOk(o.Ethertype) -} - -// HasEthertype 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 *SecurityGroupRule) HasEthertype() bool { - _, ok := o.GetEthertypeOk() - return ok -} - -// SetEthertype gets a reference to the given string and assigns it to the Ethertype field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetEthertype(v SecurityGroupRuleGetEthertypeRetType) { - setSecurityGroupRuleGetEthertypeAttributeType(&o.Ethertype, v) -} - -// GetIcmpParameters returns the IcmpParameters 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 *SecurityGroupRule) GetIcmpParameters() (res SecurityGroupRuleGetIcmpParametersRetType) { - res, _ = o.GetIcmpParametersOk() - return -} - -// GetIcmpParametersOk returns a tuple with the IcmpParameters 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 *SecurityGroupRule) GetIcmpParametersOk() (ret SecurityGroupRuleGetIcmpParametersRetType, ok bool) { - return getSecurityGroupRuleGetIcmpParametersAttributeTypeOk(o.IcmpParameters) -} - -// HasIcmpParameters 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 *SecurityGroupRule) HasIcmpParameters() bool { - _, ok := o.GetIcmpParametersOk() - return ok -} - -// SetIcmpParameters gets a reference to the given ICMPParameters and assigns it to the IcmpParameters field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetIcmpParameters(v SecurityGroupRuleGetIcmpParametersRetType) { - setSecurityGroupRuleGetIcmpParametersAttributeType(&o.IcmpParameters, 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 *SecurityGroupRule) GetId() (res SecurityGroupRuleGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *SecurityGroupRule) GetIdOk() (ret SecurityGroupRuleGetIdRetType, ok bool) { - return getSecurityGroupRuleGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *SecurityGroupRule) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetId(v SecurityGroupRuleGetIdRetType) { - setSecurityGroupRuleGetIdAttributeType(&o.Id, v) -} - -// GetIpRange returns the IpRange 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 *SecurityGroupRule) GetIpRange() (res SecurityGroupRuleGetIpRangeRetType) { - res, _ = o.GetIpRangeOk() - return -} - -// GetIpRangeOk returns a tuple with the IpRange 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 *SecurityGroupRule) GetIpRangeOk() (ret SecurityGroupRuleGetIpRangeRetType, ok bool) { - return getSecurityGroupRuleGetIpRangeAttributeTypeOk(o.IpRange) -} - -// HasIpRange 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 *SecurityGroupRule) HasIpRange() bool { - _, ok := o.GetIpRangeOk() - return ok -} - -// SetIpRange gets a reference to the given string and assigns it to the IpRange field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetIpRange(v SecurityGroupRuleGetIpRangeRetType) { - setSecurityGroupRuleGetIpRangeAttributeType(&o.IpRange, v) -} - -// GetPortRange returns the PortRange 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 *SecurityGroupRule) GetPortRange() (res SecurityGroupRuleGetPortRangeRetType) { - res, _ = o.GetPortRangeOk() - return -} - -// GetPortRangeOk returns a tuple with the PortRange 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 *SecurityGroupRule) GetPortRangeOk() (ret SecurityGroupRuleGetPortRangeRetType, ok bool) { - return getSecurityGroupRuleGetPortRangeAttributeTypeOk(o.PortRange) -} - -// HasPortRange 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 *SecurityGroupRule) HasPortRange() bool { - _, ok := o.GetPortRangeOk() - return ok -} - -// SetPortRange gets a reference to the given PortRange and assigns it to the PortRange field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetPortRange(v SecurityGroupRuleGetPortRangeRetType) { - setSecurityGroupRuleGetPortRangeAttributeType(&o.PortRange, v) -} - -// GetRemoteSecurityGroupId returns the RemoteSecurityGroupId 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 *SecurityGroupRule) GetRemoteSecurityGroupId() (res SecurityGroupRuleGetRemoteSecurityGroupIdRetType) { - res, _ = o.GetRemoteSecurityGroupIdOk() - return -} - -// GetRemoteSecurityGroupIdOk returns a tuple with the RemoteSecurityGroupId 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 *SecurityGroupRule) GetRemoteSecurityGroupIdOk() (ret SecurityGroupRuleGetRemoteSecurityGroupIdRetType, ok bool) { - return getSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId) -} - -// HasRemoteSecurityGroupId 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 *SecurityGroupRule) HasRemoteSecurityGroupId() bool { - _, ok := o.GetRemoteSecurityGroupIdOk() - return ok -} - -// SetRemoteSecurityGroupId gets a reference to the given string and assigns it to the RemoteSecurityGroupId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetRemoteSecurityGroupId(v SecurityGroupRuleGetRemoteSecurityGroupIdRetType) { - setSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType(&o.RemoteSecurityGroupId, v) -} - -// GetSecurityGroupId returns the SecurityGroupId 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 *SecurityGroupRule) GetSecurityGroupId() (res SecurityGroupRuleGetSecurityGroupIdRetType) { - res, _ = o.GetSecurityGroupIdOk() - return -} - -// GetSecurityGroupIdOk returns a tuple with the SecurityGroupId 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 *SecurityGroupRule) GetSecurityGroupIdOk() (ret SecurityGroupRuleGetSecurityGroupIdRetType, ok bool) { - return getSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId) -} - -// HasSecurityGroupId 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 *SecurityGroupRule) HasSecurityGroupId() bool { - _, ok := o.GetSecurityGroupIdOk() - return ok -} - -// SetSecurityGroupId gets a reference to the given string and assigns it to the SecurityGroupId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetSecurityGroupId(v SecurityGroupRuleGetSecurityGroupIdRetType) { - setSecurityGroupRuleGetSecurityGroupIdAttributeType(&o.SecurityGroupId, 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 *SecurityGroupRule) GetUpdatedAt() (res SecurityGroupRuleGetUpdatedAtRetType) { - 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 *SecurityGroupRule) GetUpdatedAtOk() (ret SecurityGroupRuleGetUpdatedAtRetType, ok bool) { - return getSecurityGroupRuleGetUpdatedAtAttributeTypeOk(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 *SecurityGroupRule) 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 *SecurityGroupRule) SetUpdatedAt(v SecurityGroupRuleGetUpdatedAtRetType) { - setSecurityGroupRuleGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetProtocol returns the Protocol 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 *SecurityGroupRule) GetProtocol() (res SecurityGroupRuleGetProtocolRetType) { - res, _ = o.GetProtocolOk() - return -} - -// GetProtocolOk returns a tuple with the Protocol 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 *SecurityGroupRule) GetProtocolOk() (ret SecurityGroupRuleGetProtocolRetType, ok bool) { - return getSecurityGroupRuleGetProtocolAttributeTypeOk(o.Protocol) -} - -// HasProtocol 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 *SecurityGroupRule) HasProtocol() bool { - _, ok := o.GetProtocolOk() - return ok -} - -// SetProtocol gets a reference to the given Protocol and assigns it to the Protocol field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRule) SetProtocol(v SecurityGroupRuleGetProtocolRetType) { - setSecurityGroupRuleGetProtocolAttributeType(&o.Protocol, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SecurityGroupRule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSecurityGroupRuleGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getSecurityGroupRuleGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getSecurityGroupRuleGetDirectionAttributeTypeOk(o.Direction); ok { - toSerialize["Direction"] = val - } - if val, ok := getSecurityGroupRuleGetEthertypeAttributeTypeOk(o.Ethertype); ok { - toSerialize["Ethertype"] = val - } - if val, ok := getSecurityGroupRuleGetIcmpParametersAttributeTypeOk(o.IcmpParameters); ok { - toSerialize["IcmpParameters"] = val - } - if val, ok := getSecurityGroupRuleGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getSecurityGroupRuleGetIpRangeAttributeTypeOk(o.IpRange); ok { - toSerialize["IpRange"] = val - } - if val, ok := getSecurityGroupRuleGetPortRangeAttributeTypeOk(o.PortRange); ok { - toSerialize["PortRange"] = val - } - if val, ok := getSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId); ok { - toSerialize["RemoteSecurityGroupId"] = val - } - if val, ok := getSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId); ok { - toSerialize["SecurityGroupId"] = val - } - if val, ok := getSecurityGroupRuleGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getSecurityGroupRuleGetProtocolAttributeTypeOk(o.Protocol); ok { - toSerialize["Protocol"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSecurityGroupRule struct { - value *SecurityGroupRule - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSecurityGroupRule) Get() *SecurityGroupRule { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSecurityGroupRule) Set(val *SecurityGroupRule) { - 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 NullableSecurityGroupRule) 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 *NullableSecurityGroupRule) 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 NewNullableSecurityGroupRule(val *SecurityGroupRule) *NullableSecurityGroupRule { - return &NullableSecurityGroupRule{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 NullableSecurityGroupRule) 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 *NullableSecurityGroupRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_security_group_rule_list_response.go b/services/iaas/model_security_group_rule_list_response.go deleted file mode 100644 index 6912e81ea6..0000000000 --- a/services/iaas/model_security_group_rule_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the SecurityGroupRuleListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecurityGroupRuleListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleListResponseGetItemsAttributeType = *[]SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleListResponseGetItemsArgType = []SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleListResponseGetItemsRetType = []SecurityGroupRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleListResponseGetItemsAttributeTypeOk(arg SecurityGroupRuleListResponseGetItemsAttributeType) (ret SecurityGroupRuleListResponseGetItemsRetType, 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 setSecurityGroupRuleListResponseGetItemsAttributeType(arg *SecurityGroupRuleListResponseGetItemsAttributeType, val SecurityGroupRuleListResponseGetItemsRetType) { - *arg = &val -} - -// SecurityGroupRuleListResponse Security group rule list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleListResponse struct { - // A list containing security group rule objects. - // REQUIRED - Items SecurityGroupRuleListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _SecurityGroupRuleListResponse SecurityGroupRuleListResponse - -// NewSecurityGroupRuleListResponse instantiates a new SecurityGroupRuleListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupRuleListResponse(items SecurityGroupRuleListResponseGetItemsArgType) *SecurityGroupRuleListResponse { - this := SecurityGroupRuleListResponse{} - setSecurityGroupRuleListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewSecurityGroupRuleListResponseWithDefaults instantiates a new SecurityGroupRuleListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupRuleListResponseWithDefaults() *SecurityGroupRuleListResponse { - this := SecurityGroupRuleListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRuleListResponse) GetItems() (ret SecurityGroupRuleListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *SecurityGroupRuleListResponse) GetItemsOk() (ret SecurityGroupRuleListResponseGetItemsRetType, ok bool) { - return getSecurityGroupRuleListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRuleListResponse) SetItems(v SecurityGroupRuleListResponseGetItemsRetType) { - setSecurityGroupRuleListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SecurityGroupRuleListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSecurityGroupRuleListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSecurityGroupRuleListResponse struct { - value *SecurityGroupRuleListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSecurityGroupRuleListResponse) Get() *SecurityGroupRuleListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSecurityGroupRuleListResponse) Set(val *SecurityGroupRuleListResponse) { - 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 NullableSecurityGroupRuleListResponse) 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 *NullableSecurityGroupRuleListResponse) 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 NewNullableSecurityGroupRuleListResponse(val *SecurityGroupRuleListResponse) *NullableSecurityGroupRuleListResponse { - return &NullableSecurityGroupRuleListResponse{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 NullableSecurityGroupRuleListResponse) 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 *NullableSecurityGroupRuleListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_security_group_rule_list_response_test.go b/services/iaas/model_security_group_rule_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_security_group_rule_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_security_group_rule_protocol.go b/services/iaas/model_security_group_rule_protocol.go deleted file mode 100644 index db34923088..0000000000 --- a/services/iaas/model_security_group_rule_protocol.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the SecurityGroupRuleProtocol type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecurityGroupRuleProtocol{} - -/* - types and functions for protocol -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleProtocolGetProtocolAttributeType = *Protocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleProtocolGetProtocolArgType = Protocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleProtocolGetProtocolRetType = Protocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(arg SecurityGroupRuleProtocolGetProtocolAttributeType) (ret SecurityGroupRuleProtocolGetProtocolRetType, 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 setSecurityGroupRuleProtocolGetProtocolAttributeType(arg *SecurityGroupRuleProtocolGetProtocolAttributeType, val SecurityGroupRuleProtocolGetProtocolRetType) { - *arg = &val -} - -// SecurityGroupRuleProtocol The internet protocol which the rule matches. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroupRuleProtocol struct { - Protocol SecurityGroupRuleProtocolGetProtocolAttributeType `json:"protocol,omitempty"` -} - -// NewSecurityGroupRuleProtocol instantiates a new SecurityGroupRuleProtocol 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupRuleProtocol() *SecurityGroupRuleProtocol { - this := SecurityGroupRuleProtocol{} - return &this -} - -// NewSecurityGroupRuleProtocolWithDefaults instantiates a new SecurityGroupRuleProtocol 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSecurityGroupRuleProtocolWithDefaults() *SecurityGroupRuleProtocol { - this := SecurityGroupRuleProtocol{} - return &this -} - -// GetProtocol returns the Protocol 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 *SecurityGroupRuleProtocol) GetProtocol() (res SecurityGroupRuleProtocolGetProtocolRetType) { - res, _ = o.GetProtocolOk() - return -} - -// GetProtocolOk returns a tuple with the Protocol 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 *SecurityGroupRuleProtocol) GetProtocolOk() (ret SecurityGroupRuleProtocolGetProtocolRetType, ok bool) { - return getSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(o.Protocol) -} - -// HasProtocol 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 *SecurityGroupRuleProtocol) HasProtocol() bool { - _, ok := o.GetProtocolOk() - return ok -} - -// SetProtocol gets a reference to the given Protocol and assigns it to the Protocol field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SecurityGroupRuleProtocol) SetProtocol(v SecurityGroupRuleProtocolGetProtocolRetType) { - setSecurityGroupRuleProtocolGetProtocolAttributeType(&o.Protocol, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SecurityGroupRuleProtocol) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(o.Protocol); ok { - toSerialize["Protocol"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSecurityGroupRuleProtocol struct { - value *SecurityGroupRuleProtocol - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSecurityGroupRuleProtocol) Get() *SecurityGroupRuleProtocol { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSecurityGroupRuleProtocol) Set(val *SecurityGroupRuleProtocol) { - 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 NullableSecurityGroupRuleProtocol) 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 *NullableSecurityGroupRuleProtocol) 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 NewNullableSecurityGroupRuleProtocol(val *SecurityGroupRuleProtocol) *NullableSecurityGroupRuleProtocol { - return &NullableSecurityGroupRuleProtocol{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 NullableSecurityGroupRuleProtocol) 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 *NullableSecurityGroupRuleProtocol) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_security_group_rule_protocol_test.go b/services/iaas/model_security_group_rule_protocol_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_security_group_rule_protocol_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_security_group_rule_test.go b/services/iaas/model_security_group_rule_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_security_group_rule_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_security_group_test.go b/services/iaas/model_security_group_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_security_group_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_server.go b/services/iaas/model_server.go deleted file mode 100644 index e09fd92cfc..0000000000 --- a/services/iaas/model_server.go +++ /dev/null @@ -1,1560 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Server type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Server{} - -/* - types and functions for affinityGroup -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAffinityGroupAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetAffinityGroupAttributeTypeOk(arg ServerGetAffinityGroupAttributeType) (ret ServerGetAffinityGroupRetType, 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 setServerGetAffinityGroupAttributeType(arg *ServerGetAffinityGroupAttributeType, val ServerGetAffinityGroupRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAffinityGroupArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAffinityGroupRetType = string - -/* - types and functions for agent -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAgentAttributeType = *ServerAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAgentArgType = ServerAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAgentRetType = ServerAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetAgentAttributeTypeOk(arg ServerGetAgentAttributeType) (ret ServerGetAgentRetType, 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 setServerGetAgentAttributeType(arg *ServerGetAgentAttributeType, val ServerGetAgentRetType) { - *arg = &val -} - -/* - types and functions for availabilityZone -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAvailabilityZoneAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetAvailabilityZoneAttributeTypeOk(arg ServerGetAvailabilityZoneAttributeType) (ret ServerGetAvailabilityZoneRetType, 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 setServerGetAvailabilityZoneAttributeType(arg *ServerGetAvailabilityZoneAttributeType, val ServerGetAvailabilityZoneRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAvailabilityZoneArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetAvailabilityZoneRetType = string - -/* - types and functions for bootVolume -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetBootVolumeAttributeType = *ServerBootVolume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetBootVolumeArgType = ServerBootVolume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetBootVolumeRetType = ServerBootVolume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetBootVolumeAttributeTypeOk(arg ServerGetBootVolumeAttributeType) (ret ServerGetBootVolumeRetType, 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 setServerGetBootVolumeAttributeType(arg *ServerGetBootVolumeAttributeType, val ServerGetBootVolumeRetType) { - *arg = &val -} - -/* - types and functions for configDrive -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServergetConfigDriveAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServergetConfigDriveArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServergetConfigDriveRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServergetConfigDriveAttributeTypeOk(arg ServergetConfigDriveAttributeType) (ret ServergetConfigDriveRetType, 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 setServergetConfigDriveAttributeType(arg *ServergetConfigDriveAttributeType, val ServergetConfigDriveRetType) { - *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 ServerGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetCreatedAtAttributeTypeOk(arg ServerGetCreatedAtAttributeType) (ret ServerGetCreatedAtRetType, 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 setServerGetCreatedAtAttributeType(arg *ServerGetCreatedAtAttributeType, val ServerGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for errorMessage -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetErrorMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetErrorMessageAttributeTypeOk(arg ServerGetErrorMessageAttributeType) (ret ServerGetErrorMessageRetType, 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 setServerGetErrorMessageAttributeType(arg *ServerGetErrorMessageAttributeType, val ServerGetErrorMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetErrorMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetErrorMessageRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetIdAttributeTypeOk(arg ServerGetIdAttributeType) (ret ServerGetIdRetType, 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 setServerGetIdAttributeType(arg *ServerGetIdAttributeType, val ServerGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetIdRetType = string - -/* - types and functions for imageId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetImageIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetImageIdAttributeTypeOk(arg ServerGetImageIdAttributeType) (ret ServerGetImageIdRetType, 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 setServerGetImageIdAttributeType(arg *ServerGetImageIdAttributeType, val ServerGetImageIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetImageIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetImageIdRetType = string - -/* - types and functions for keypairName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetKeypairNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetKeypairNameAttributeTypeOk(arg ServerGetKeypairNameAttributeType) (ret ServerGetKeypairNameRetType, 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 setServerGetKeypairNameAttributeType(arg *ServerGetKeypairNameAttributeType, val ServerGetKeypairNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetKeypairNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetKeypairNameRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetLabelsAttributeTypeOk(arg ServerGetLabelsAttributeType) (ret ServerGetLabelsRetType, 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 setServerGetLabelsAttributeType(arg *ServerGetLabelsAttributeType, val ServerGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for launchedAt -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetLaunchedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetLaunchedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetLaunchedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetLaunchedAtAttributeTypeOk(arg ServerGetLaunchedAtAttributeType) (ret ServerGetLaunchedAtRetType, 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 setServerGetLaunchedAtAttributeType(arg *ServerGetLaunchedAtAttributeType, val ServerGetLaunchedAtRetType) { - *arg = &val -} - -/* - types and functions for machineType -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMachineTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetMachineTypeAttributeTypeOk(arg ServerGetMachineTypeAttributeType) (ret ServerGetMachineTypeRetType, 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 setServerGetMachineTypeAttributeType(arg *ServerGetMachineTypeAttributeType, val ServerGetMachineTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMachineTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMachineTypeRetType = string - -/* - types and functions for maintenanceWindow -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMaintenanceWindowAttributeType = *ServerMaintenance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMaintenanceWindowArgType = ServerMaintenance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMaintenanceWindowRetType = ServerMaintenance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetMaintenanceWindowAttributeTypeOk(arg ServerGetMaintenanceWindowAttributeType) (ret ServerGetMaintenanceWindowRetType, 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 setServerGetMaintenanceWindowAttributeType(arg *ServerGetMaintenanceWindowAttributeType, val ServerGetMaintenanceWindowRetType) { - *arg = &val -} - -/* - types and functions for metadata -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMetadataAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMetadataArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetMetadataRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetMetadataAttributeTypeOk(arg ServerGetMetadataAttributeType) (ret ServerGetMetadataRetType, 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 setServerGetMetadataAttributeType(arg *ServerGetMetadataAttributeType, val ServerGetMetadataRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetNameAttributeTypeOk(arg ServerGetNameAttributeType) (ret ServerGetNameRetType, 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 setServerGetNameAttributeType(arg *ServerGetNameAttributeType, val ServerGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNameRetType = string - -/* - types and functions for networking -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNetworkingAttributeType = *ServerNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNetworkingArgType = ServerNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNetworkingRetType = ServerNetworking - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetNetworkingAttributeTypeOk(arg ServerGetNetworkingAttributeType) (ret ServerGetNetworkingRetType, 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 setServerGetNetworkingAttributeType(arg *ServerGetNetworkingAttributeType, val ServerGetNetworkingRetType) { - *arg = &val -} - -/* - types and functions for nics -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNicsAttributeType = *[]ServerNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNicsArgType = []ServerNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetNicsRetType = []ServerNetwork - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetNicsAttributeTypeOk(arg ServerGetNicsAttributeType) (ret ServerGetNicsRetType, 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 setServerGetNicsAttributeType(arg *ServerGetNicsAttributeType, val ServerGetNicsRetType) { - *arg = &val -} - -/* - types and functions for powerStatus -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetPowerStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetPowerStatusAttributeTypeOk(arg ServerGetPowerStatusAttributeType) (ret ServerGetPowerStatusRetType, 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 setServerGetPowerStatusAttributeType(arg *ServerGetPowerStatusAttributeType, val ServerGetPowerStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetPowerStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetPowerStatusRetType = string - -/* - types and functions for securityGroups -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetSecurityGroupsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetSecurityGroupsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetSecurityGroupsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetSecurityGroupsAttributeTypeOk(arg ServerGetSecurityGroupsAttributeType) (ret ServerGetSecurityGroupsRetType, 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 setServerGetSecurityGroupsAttributeType(arg *ServerGetSecurityGroupsAttributeType, val ServerGetSecurityGroupsRetType) { - *arg = &val -} - -/* - types and functions for serviceAccountMails -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetServiceAccountMailsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetServiceAccountMailsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetServiceAccountMailsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetServiceAccountMailsAttributeTypeOk(arg ServerGetServiceAccountMailsAttributeType) (ret ServerGetServiceAccountMailsRetType, 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 setServerGetServiceAccountMailsAttributeType(arg *ServerGetServiceAccountMailsAttributeType, val ServerGetServiceAccountMailsRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetStatusAttributeTypeOk(arg ServerGetStatusAttributeType) (ret ServerGetStatusRetType, 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 setServerGetStatusAttributeType(arg *ServerGetStatusAttributeType, val ServerGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetStatusRetType = 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 ServerGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetUpdatedAtAttributeTypeOk(arg ServerGetUpdatedAtAttributeType) (ret ServerGetUpdatedAtRetType, 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 setServerGetUpdatedAtAttributeType(arg *ServerGetUpdatedAtAttributeType, val ServerGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for userData -*/ - -// isByteArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetUserDataAttributeType = *[]byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetUserDataArgType = []byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetUserDataRetType = []byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetUserDataAttributeTypeOk(arg ServerGetUserDataAttributeType) (ret ServerGetUserDataRetType, 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 setServerGetUserDataAttributeType(arg *ServerGetUserDataAttributeType, val ServerGetUserDataRetType) { - *arg = &val -} - -/* - types and functions for volumes -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetVolumesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetVolumesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetVolumesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetVolumesAttributeTypeOk(arg ServerGetVolumesAttributeType) (ret ServerGetVolumesRetType, 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 setServerGetVolumesAttributeType(arg *ServerGetVolumesAttributeType, val ServerGetVolumesRetType) { - *arg = &val -} - -// Server Representation of a single server object. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Server struct { - // Universally Unique Identifier (UUID). - AffinityGroup ServerGetAffinityGroupAttributeType `json:"affinityGroup,omitempty"` - Agent ServerGetAgentAttributeType `json:"agent,omitempty"` - // Object that represents an availability zone. - AvailabilityZone ServerGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` - BootVolume ServerGetBootVolumeAttributeType `json:"bootVolume,omitempty"` - // When true the server is created with a config drive. - ConfigDrive ServergetConfigDriveAttributeType `json:"configDrive,omitempty"` - // Date-time when resource was created. - CreatedAt ServerGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // An error message. - ErrorMessage ServerGetErrorMessageAttributeType `json:"errorMessage,omitempty"` - // Universally Unique Identifier (UUID). - Id ServerGetIdAttributeType `json:"id,omitempty"` - // Universally Unique Identifier (UUID). - 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. - Labels ServerGetLabelsAttributeType `json:"labels,omitempty"` - // Date-time when resource was launched. - LaunchedAt ServerGetLaunchedAtAttributeType `json:"launchedAt,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - MachineType ServerGetMachineTypeAttributeType `json:"machineType" required:"true"` - MaintenanceWindow ServerGetMaintenanceWindowAttributeType `json:"maintenanceWindow,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 ServerGetMetadataAttributeType `json:"metadata,omitempty"` - // The name for a Server. - // REQUIRED - Name ServerGetNameAttributeType `json:"name" required:"true"` - Networking ServerGetNetworkingAttributeType `json:"networking,omitempty"` - // A list of networks attached to a server. - Nics ServerGetNicsAttributeType `json:"nics,omitempty"` - // The power status of a server. Possible values: `CRASHED`, `ERROR`, `RUNNING`, `STOPPED`. - PowerStatus ServerGetPowerStatusAttributeType `json:"powerStatus,omitempty"` - // A list of General Objects. - SecurityGroups ServerGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"` - // A list of service account mails. - ServiceAccountMails ServerGetServiceAccountMailsAttributeType `json:"serviceAccountMails,omitempty"` - // The status of a server object. Possible values: `ACTIVE`, `BACKING-UP`, `CREATING`, `DEALLOCATED`, `DEALLOCATING`, `DELETED`, `DELETING`, `ERROR`, `INACTIVE`, `MIGRATING`, `PAUSED`, `REBOOT`, `REBOOTING`, `REBUILD`, `REBUILDING`, `RESCUE`, `RESCUING`, `RESIZING`, `RESTORING`, `SNAPSHOTTING`, `STARTING`, `STOPPING`, `UNRESCUING`, `UPDATING`. - Status ServerGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt ServerGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - // User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server. - UserData ServerGetUserDataAttributeType `json:"userData,omitempty"` - // A list of UUIDs. - Volumes ServerGetVolumesAttributeType `json:"volumes,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Server Server - -// NewServer instantiates a new Server 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServer(machineType ServerGetMachineTypeArgType, name ServerGetNameArgType) *Server { - this := Server{} - setServerGetMachineTypeAttributeType(&this.MachineType, machineType) - setServerGetNameAttributeType(&this.Name, name) - return &this -} - -// NewServerWithDefaults instantiates a new Server 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerWithDefaults() *Server { - this := Server{} - var configDrive bool = false - this.ConfigDrive = &configDrive - return &this -} - -// GetAffinityGroup returns the AffinityGroup 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 *Server) GetAffinityGroup() (res ServerGetAffinityGroupRetType) { - res, _ = o.GetAffinityGroupOk() - return -} - -// GetAffinityGroupOk returns a tuple with the AffinityGroup 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 *Server) GetAffinityGroupOk() (ret ServerGetAffinityGroupRetType, ok bool) { - return getServerGetAffinityGroupAttributeTypeOk(o.AffinityGroup) -} - -// HasAffinityGroup 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 *Server) HasAffinityGroup() bool { - _, ok := o.GetAffinityGroupOk() - return ok -} - -// SetAffinityGroup gets a reference to the given string and assigns it to the AffinityGroup field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetAffinityGroup(v ServerGetAffinityGroupRetType) { - setServerGetAffinityGroupAttributeType(&o.AffinityGroup, v) -} - -// GetAgent returns the Agent 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 *Server) GetAgent() (res ServerGetAgentRetType) { - res, _ = o.GetAgentOk() - return -} - -// GetAgentOk returns a tuple with the Agent 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 *Server) GetAgentOk() (ret ServerGetAgentRetType, ok bool) { - return getServerGetAgentAttributeTypeOk(o.Agent) -} - -// HasAgent 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 *Server) HasAgent() bool { - _, ok := o.GetAgentOk() - return ok -} - -// SetAgent gets a reference to the given ServerAgent and assigns it to the Agent field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetAgent(v ServerGetAgentRetType) { - setServerGetAgentAttributeType(&o.Agent, v) -} - -// GetAvailabilityZone returns the AvailabilityZone 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 *Server) GetAvailabilityZone() (res ServerGetAvailabilityZoneRetType) { - res, _ = o.GetAvailabilityZoneOk() - return -} - -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone 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 *Server) GetAvailabilityZoneOk() (ret ServerGetAvailabilityZoneRetType, ok bool) { - return getServerGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) -} - -// HasAvailabilityZone 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 *Server) HasAvailabilityZone() bool { - _, ok := o.GetAvailabilityZoneOk() - return ok -} - -// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetAvailabilityZone(v ServerGetAvailabilityZoneRetType) { - setServerGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) -} - -// GetBootVolume returns the BootVolume 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 *Server) GetBootVolume() (res ServerGetBootVolumeRetType) { - res, _ = o.GetBootVolumeOk() - return -} - -// GetBootVolumeOk returns a tuple with the BootVolume 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 *Server) GetBootVolumeOk() (ret ServerGetBootVolumeRetType, ok bool) { - return getServerGetBootVolumeAttributeTypeOk(o.BootVolume) -} - -// HasBootVolume 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 *Server) HasBootVolume() bool { - _, ok := o.GetBootVolumeOk() - return ok -} - -// SetBootVolume gets a reference to the given ServerBootVolume and assigns it to the BootVolume field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetBootVolume(v ServerGetBootVolumeRetType) { - setServerGetBootVolumeAttributeType(&o.BootVolume, v) -} - -// GetConfigDrive returns the ConfigDrive 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 *Server) GetConfigDrive() (res ServergetConfigDriveRetType) { - res, _ = o.GetConfigDriveOk() - return -} - -// GetConfigDriveOk returns a tuple with the ConfigDrive 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 *Server) GetConfigDriveOk() (ret ServergetConfigDriveRetType, ok bool) { - return getServergetConfigDriveAttributeTypeOk(o.ConfigDrive) -} - -// HasConfigDrive 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 *Server) HasConfigDrive() bool { - _, ok := o.GetConfigDriveOk() - return ok -} - -// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetConfigDrive(v ServergetConfigDriveRetType) { - setServergetConfigDriveAttributeType(&o.ConfigDrive, 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 *Server) GetCreatedAt() (res ServerGetCreatedAtRetType) { - 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 *Server) GetCreatedAtOk() (ret ServerGetCreatedAtRetType, ok bool) { - return getServerGetCreatedAtAttributeTypeOk(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 *Server) 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 *Server) SetCreatedAt(v ServerGetCreatedAtRetType) { - setServerGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetErrorMessage returns the ErrorMessage 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 *Server) GetErrorMessage() (res ServerGetErrorMessageRetType) { - res, _ = o.GetErrorMessageOk() - return -} - -// GetErrorMessageOk returns a tuple with the ErrorMessage 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 *Server) GetErrorMessageOk() (ret ServerGetErrorMessageRetType, ok bool) { - return getServerGetErrorMessageAttributeTypeOk(o.ErrorMessage) -} - -// HasErrorMessage 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 *Server) HasErrorMessage() bool { - _, ok := o.GetErrorMessageOk() - return ok -} - -// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetErrorMessage(v ServerGetErrorMessageRetType) { - setServerGetErrorMessageAttributeType(&o.ErrorMessage, 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 *Server) GetId() (res ServerGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *Server) GetIdOk() (ret ServerGetIdRetType, ok bool) { - return getServerGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Server) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetId(v ServerGetIdRetType) { - setServerGetIdAttributeType(&o.Id, v) -} - -// GetImageId returns the ImageId 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 *Server) GetImageId() (res ServerGetImageIdRetType) { - res, _ = o.GetImageIdOk() - return -} - -// GetImageIdOk returns a tuple with the ImageId 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 *Server) GetImageIdOk() (ret ServerGetImageIdRetType, ok bool) { - return getServerGetImageIdAttributeTypeOk(o.ImageId) -} - -// HasImageId 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 *Server) HasImageId() bool { - _, ok := o.GetImageIdOk() - return ok -} - -// SetImageId gets a reference to the given string and assigns it to the ImageId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetImageId(v ServerGetImageIdRetType) { - setServerGetImageIdAttributeType(&o.ImageId, v) -} - -// GetKeypairName returns the KeypairName 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 *Server) GetKeypairName() (res ServerGetKeypairNameRetType) { - res, _ = o.GetKeypairNameOk() - return -} - -// GetKeypairNameOk returns a tuple with the KeypairName 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 *Server) GetKeypairNameOk() (ret ServerGetKeypairNameRetType, ok bool) { - return getServerGetKeypairNameAttributeTypeOk(o.KeypairName) -} - -// HasKeypairName 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 *Server) HasKeypairName() bool { - _, ok := o.GetKeypairNameOk() - return ok -} - -// SetKeypairName gets a reference to the given string and assigns it to the KeypairName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetKeypairName(v ServerGetKeypairNameRetType) { - setServerGetKeypairNameAttributeType(&o.KeypairName, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) GetLabels() (res ServerGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) GetLabelsOk() (ret ServerGetLabelsRetType, ok bool) { - return getServerGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetLabels(v ServerGetLabelsRetType) { - setServerGetLabelsAttributeType(&o.Labels, v) -} - -// GetLaunchedAt returns the LaunchedAt 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 *Server) GetLaunchedAt() (res ServerGetLaunchedAtRetType) { - res, _ = o.GetLaunchedAtOk() - return -} - -// GetLaunchedAtOk returns a tuple with the LaunchedAt 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 *Server) GetLaunchedAtOk() (ret ServerGetLaunchedAtRetType, ok bool) { - return getServerGetLaunchedAtAttributeTypeOk(o.LaunchedAt) -} - -// HasLaunchedAt 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 *Server) HasLaunchedAt() bool { - _, ok := o.GetLaunchedAtOk() - return ok -} - -// SetLaunchedAt gets a reference to the given time.Time and assigns it to the LaunchedAt field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetLaunchedAt(v ServerGetLaunchedAtRetType) { - setServerGetLaunchedAtAttributeType(&o.LaunchedAt, v) -} - -// GetMachineType returns the MachineType field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) GetMachineType() (ret ServerGetMachineTypeRetType) { - ret, _ = o.GetMachineTypeOk() - return ret -} - -// GetMachineTypeOk returns a tuple with the MachineType field value -// 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 *Server) GetMachineTypeOk() (ret ServerGetMachineTypeRetType, ok bool) { - return getServerGetMachineTypeAttributeTypeOk(o.MachineType) -} - -// SetMachineType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetMachineType(v ServerGetMachineTypeRetType) { - setServerGetMachineTypeAttributeType(&o.MachineType, v) -} - -// GetMaintenanceWindow returns the MaintenanceWindow 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 *Server) GetMaintenanceWindow() (res ServerGetMaintenanceWindowRetType) { - res, _ = o.GetMaintenanceWindowOk() - return -} - -// GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow 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 *Server) GetMaintenanceWindowOk() (ret ServerGetMaintenanceWindowRetType, ok bool) { - return getServerGetMaintenanceWindowAttributeTypeOk(o.MaintenanceWindow) -} - -// HasMaintenanceWindow 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 *Server) HasMaintenanceWindow() bool { - _, ok := o.GetMaintenanceWindowOk() - return ok -} - -// SetMaintenanceWindow gets a reference to the given ServerMaintenance and assigns it to the MaintenanceWindow field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetMaintenanceWindow(v ServerGetMaintenanceWindowRetType) { - setServerGetMaintenanceWindowAttributeType(&o.MaintenanceWindow, v) -} - -// GetMetadata returns the Metadata 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 *Server) GetMetadata() (res ServerGetMetadataRetType) { - res, _ = o.GetMetadataOk() - return -} - -// GetMetadataOk returns a tuple with the Metadata 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 *Server) GetMetadataOk() (ret ServerGetMetadataRetType, ok bool) { - return getServerGetMetadataAttributeTypeOk(o.Metadata) -} - -// HasMetadata 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 *Server) HasMetadata() bool { - _, ok := o.GetMetadataOk() - return ok -} - -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetMetadata(v ServerGetMetadataRetType) { - setServerGetMetadataAttributeType(&o.Metadata, 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 *Server) GetName() (ret ServerGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *Server) GetNameOk() (ret ServerGetNameRetType, ok bool) { - return getServerGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetName(v ServerGetNameRetType) { - setServerGetNameAttributeType(&o.Name, v) -} - -// GetNetworking returns the Networking 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 *Server) GetNetworking() (res ServerGetNetworkingRetType) { - res, _ = o.GetNetworkingOk() - return -} - -// GetNetworkingOk returns a tuple with the Networking 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 *Server) GetNetworkingOk() (ret ServerGetNetworkingRetType, ok bool) { - return getServerGetNetworkingAttributeTypeOk(o.Networking) -} - -// HasNetworking 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 *Server) HasNetworking() bool { - _, ok := o.GetNetworkingOk() - return ok -} - -// SetNetworking gets a reference to the given ServerNetworking and assigns it to the Networking field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetNetworking(v ServerGetNetworkingRetType) { - setServerGetNetworkingAttributeType(&o.Networking, v) -} - -// GetNics returns the Nics 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 *Server) GetNics() (res ServerGetNicsRetType) { - res, _ = o.GetNicsOk() - return -} - -// GetNicsOk returns a tuple with the Nics 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 *Server) GetNicsOk() (ret ServerGetNicsRetType, ok bool) { - return getServerGetNicsAttributeTypeOk(o.Nics) -} - -// HasNics 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 *Server) HasNics() bool { - _, ok := o.GetNicsOk() - return ok -} - -// SetNics gets a reference to the given []ServerNetwork and assigns it to the Nics field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetNics(v ServerGetNicsRetType) { - setServerGetNicsAttributeType(&o.Nics, v) -} - -// GetPowerStatus returns the PowerStatus 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 *Server) GetPowerStatus() (res ServerGetPowerStatusRetType) { - res, _ = o.GetPowerStatusOk() - return -} - -// GetPowerStatusOk returns a tuple with the PowerStatus 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 *Server) GetPowerStatusOk() (ret ServerGetPowerStatusRetType, ok bool) { - return getServerGetPowerStatusAttributeTypeOk(o.PowerStatus) -} - -// HasPowerStatus 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 *Server) HasPowerStatus() bool { - _, ok := o.GetPowerStatusOk() - return ok -} - -// SetPowerStatus gets a reference to the given string and assigns it to the PowerStatus field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetPowerStatus(v ServerGetPowerStatusRetType) { - setServerGetPowerStatusAttributeType(&o.PowerStatus, v) -} - -// GetSecurityGroups returns the SecurityGroups 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 *Server) GetSecurityGroups() (res ServerGetSecurityGroupsRetType) { - res, _ = o.GetSecurityGroupsOk() - return -} - -// GetSecurityGroupsOk returns a tuple with the SecurityGroups 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 *Server) GetSecurityGroupsOk() (ret ServerGetSecurityGroupsRetType, ok bool) { - return getServerGetSecurityGroupsAttributeTypeOk(o.SecurityGroups) -} - -// HasSecurityGroups 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 *Server) HasSecurityGroups() bool { - _, ok := o.GetSecurityGroupsOk() - return ok -} - -// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetSecurityGroups(v ServerGetSecurityGroupsRetType) { - setServerGetSecurityGroupsAttributeType(&o.SecurityGroups, v) -} - -// GetServiceAccountMails returns the ServiceAccountMails 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 *Server) GetServiceAccountMails() (res ServerGetServiceAccountMailsRetType) { - res, _ = o.GetServiceAccountMailsOk() - return -} - -// GetServiceAccountMailsOk returns a tuple with the ServiceAccountMails 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 *Server) GetServiceAccountMailsOk() (ret ServerGetServiceAccountMailsRetType, ok bool) { - return getServerGetServiceAccountMailsAttributeTypeOk(o.ServiceAccountMails) -} - -// HasServiceAccountMails 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 *Server) HasServiceAccountMails() bool { - _, ok := o.GetServiceAccountMailsOk() - return ok -} - -// SetServiceAccountMails gets a reference to the given []string and assigns it to the ServiceAccountMails field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetServiceAccountMails(v ServerGetServiceAccountMailsRetType) { - setServerGetServiceAccountMailsAttributeType(&o.ServiceAccountMails, v) -} - -// GetStatus returns the Status 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 *Server) GetStatus() (res ServerGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *Server) GetStatusOk() (ret ServerGetStatusRetType, ok bool) { - return getServerGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *Server) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetStatus(v ServerGetStatusRetType) { - setServerGetStatusAttributeType(&o.Status, 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 *Server) GetUpdatedAt() (res ServerGetUpdatedAtRetType) { - 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 *Server) GetUpdatedAtOk() (ret ServerGetUpdatedAtRetType, ok bool) { - return getServerGetUpdatedAtAttributeTypeOk(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 *Server) 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 *Server) SetUpdatedAt(v ServerGetUpdatedAtRetType) { - setServerGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetUserData returns the UserData 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 *Server) GetUserData() (res ServerGetUserDataRetType) { - res, _ = o.GetUserDataOk() - return -} - -// GetUserDataOk returns a tuple with the UserData 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 *Server) GetUserDataOk() (ret ServerGetUserDataRetType, ok bool) { - return getServerGetUserDataAttributeTypeOk(o.UserData) -} - -// HasUserData 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 *Server) HasUserData() bool { - _, ok := o.GetUserDataOk() - return ok -} - -// SetUserData gets a reference to the given string and assigns it to the UserData field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetUserData(v ServerGetUserDataRetType) { - setServerGetUserDataAttributeType(&o.UserData, v) -} - -// GetVolumes returns the Volumes 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 *Server) GetVolumes() (res ServerGetVolumesRetType) { - res, _ = o.GetVolumesOk() - return -} - -// GetVolumesOk returns a tuple with the Volumes 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 *Server) GetVolumesOk() (ret ServerGetVolumesRetType, ok bool) { - return getServerGetVolumesAttributeTypeOk(o.Volumes) -} - -// HasVolumes 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 *Server) HasVolumes() bool { - _, ok := o.GetVolumesOk() - return ok -} - -// SetVolumes gets a reference to the given []string and assigns it to the Volumes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetVolumes(v ServerGetVolumesRetType) { - setServerGetVolumesAttributeType(&o.Volumes, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Server) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServerGetAffinityGroupAttributeTypeOk(o.AffinityGroup); ok { - toSerialize["AffinityGroup"] = val - } - if val, ok := getServerGetAgentAttributeTypeOk(o.Agent); ok { - toSerialize["Agent"] = val - } - if val, ok := getServerGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { - toSerialize["AvailabilityZone"] = val - } - if val, ok := getServerGetBootVolumeAttributeTypeOk(o.BootVolume); ok { - toSerialize["BootVolume"] = val - } - if val, ok := getServergetConfigDriveAttributeTypeOk(o.ConfigDrive); ok { - toSerialize["ConfigDrive"] = val - } - if val, ok := getServerGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getServerGetErrorMessageAttributeTypeOk(o.ErrorMessage); ok { - toSerialize["ErrorMessage"] = val - } - if val, ok := getServerGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getServerGetImageIdAttributeTypeOk(o.ImageId); ok { - toSerialize["ImageId"] = val - } - if val, ok := getServerGetKeypairNameAttributeTypeOk(o.KeypairName); ok { - toSerialize["KeypairName"] = val - } - if val, ok := getServerGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getServerGetLaunchedAtAttributeTypeOk(o.LaunchedAt); ok { - toSerialize["LaunchedAt"] = val - } - if val, ok := getServerGetMachineTypeAttributeTypeOk(o.MachineType); ok { - toSerialize["MachineType"] = val - } - if val, ok := getServerGetMaintenanceWindowAttributeTypeOk(o.MaintenanceWindow); ok { - toSerialize["MaintenanceWindow"] = val - } - if val, ok := getServerGetMetadataAttributeTypeOk(o.Metadata); ok { - toSerialize["Metadata"] = val - } - if val, ok := getServerGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getServerGetNetworkingAttributeTypeOk(o.Networking); ok { - toSerialize["Networking"] = val - } - if val, ok := getServerGetNicsAttributeTypeOk(o.Nics); ok { - toSerialize["Nics"] = val - } - if val, ok := getServerGetPowerStatusAttributeTypeOk(o.PowerStatus); ok { - toSerialize["PowerStatus"] = val - } - if val, ok := getServerGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok { - toSerialize["SecurityGroups"] = val - } - if val, ok := getServerGetServiceAccountMailsAttributeTypeOk(o.ServiceAccountMails); ok { - toSerialize["ServiceAccountMails"] = val - } - if val, ok := getServerGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getServerGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getServerGetUserDataAttributeTypeOk(o.UserData); ok { - toSerialize["UserData"] = val - } - if val, ok := getServerGetVolumesAttributeTypeOk(o.Volumes); ok { - toSerialize["Volumes"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServer struct { - value *Server - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServer) Get() *Server { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServer) Set(val *Server) { - 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 NullableServer) 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 *NullableServer) 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 NewNullableServer(val *Server) *NullableServer { - return &NullableServer{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 NullableServer) 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 *NullableServer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_agent.go b/services/iaas/model_server_agent.go deleted file mode 100644 index dcab50b9cd..0000000000 --- a/services/iaas/model_server_agent.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ServerAgent type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerAgent{} - -/* - types and functions for provisioned -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerAgentgetProvisionedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerAgentgetProvisionedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerAgentgetProvisionedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerAgentgetProvisionedAttributeTypeOk(arg ServerAgentgetProvisionedAttributeType) (ret ServerAgentgetProvisionedRetType, 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 setServerAgentgetProvisionedAttributeType(arg *ServerAgentgetProvisionedAttributeType, val ServerAgentgetProvisionedRetType) { - *arg = &val -} - -// ServerAgent STACKIT server agent options for a server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerAgent struct { - // Configure the STACKIT server agent provisioning during the first boot of the server. Only works when booting from an images that supports the STACKIT server agent. When `false` the agent IS NOT installed. When `true` the agent IS installed. When its not set the result depend on the used image and its default provisioning setting. - Provisioned ServerAgentgetProvisionedAttributeType `json:"provisioned,omitempty"` -} - -// NewServerAgent instantiates a new ServerAgent 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerAgent() *ServerAgent { - this := ServerAgent{} - return &this -} - -// NewServerAgentWithDefaults instantiates a new ServerAgent 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerAgentWithDefaults() *ServerAgent { - this := ServerAgent{} - return &this -} - -// GetProvisioned returns the Provisioned 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 *ServerAgent) GetProvisioned() (res ServerAgentgetProvisionedRetType) { - res, _ = o.GetProvisionedOk() - return -} - -// GetProvisionedOk returns a tuple with the Provisioned 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 *ServerAgent) GetProvisionedOk() (ret ServerAgentgetProvisionedRetType, ok bool) { - return getServerAgentgetProvisionedAttributeTypeOk(o.Provisioned) -} - -// HasProvisioned 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 *ServerAgent) HasProvisioned() bool { - _, ok := o.GetProvisionedOk() - return ok -} - -// SetProvisioned gets a reference to the given bool and assigns it to the Provisioned field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerAgent) SetProvisioned(v ServerAgentgetProvisionedRetType) { - setServerAgentgetProvisionedAttributeType(&o.Provisioned, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServerAgent) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServerAgentgetProvisionedAttributeTypeOk(o.Provisioned); ok { - toSerialize["Provisioned"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServerAgent struct { - value *ServerAgent - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerAgent) Get() *ServerAgent { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerAgent) Set(val *ServerAgent) { - 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 NullableServerAgent) 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 *NullableServerAgent) 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 NewNullableServerAgent(val *ServerAgent) *NullableServerAgent { - return &NullableServerAgent{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 NullableServerAgent) 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 *NullableServerAgent) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_agent_test.go b/services/iaas/model_server_agent_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_server_agent_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_server_boot_volume.go b/services/iaas/model_server_boot_volume.go deleted file mode 100644 index da9dd34278..0000000000 --- a/services/iaas/model_server_boot_volume.go +++ /dev/null @@ -1,387 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ServerBootVolume type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerBootVolume{} - -/* - types and functions for deleteOnTermination -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumegetDeleteOnTerminationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumegetDeleteOnTerminationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumegetDeleteOnTerminationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerBootVolumegetDeleteOnTerminationAttributeTypeOk(arg ServerBootVolumegetDeleteOnTerminationAttributeType) (ret ServerBootVolumegetDeleteOnTerminationRetType, 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 setServerBootVolumegetDeleteOnTerminationAttributeType(arg *ServerBootVolumegetDeleteOnTerminationAttributeType, val ServerBootVolumegetDeleteOnTerminationRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerBootVolumeGetIdAttributeTypeOk(arg ServerBootVolumeGetIdAttributeType) (ret ServerBootVolumeGetIdRetType, 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 setServerBootVolumeGetIdAttributeType(arg *ServerBootVolumeGetIdAttributeType, val ServerBootVolumeGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetIdRetType = string - -/* - types and functions for performanceClass -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetPerformanceClassAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerBootVolumeGetPerformanceClassAttributeTypeOk(arg ServerBootVolumeGetPerformanceClassAttributeType) (ret ServerBootVolumeGetPerformanceClassRetType, 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 setServerBootVolumeGetPerformanceClassAttributeType(arg *ServerBootVolumeGetPerformanceClassAttributeType, val ServerBootVolumeGetPerformanceClassRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetPerformanceClassArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetPerformanceClassRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerBootVolumeGetSizeAttributeTypeOk(arg ServerBootVolumeGetSizeAttributeType) (ret ServerBootVolumeGetSizeRetType, 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 setServerBootVolumeGetSizeAttributeType(arg *ServerBootVolumeGetSizeAttributeType, val ServerBootVolumeGetSizeRetType) { - *arg = &val -} - -/* - types and functions for source -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetSourceAttributeType = *BootVolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetSourceArgType = BootVolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolumeGetSourceRetType = BootVolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerBootVolumeGetSourceAttributeTypeOk(arg ServerBootVolumeGetSourceAttributeType) (ret ServerBootVolumeGetSourceRetType, 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 setServerBootVolumeGetSourceAttributeType(arg *ServerBootVolumeGetSourceAttributeType, val ServerBootVolumeGetSourceRetType) { - *arg = &val -} - -// ServerBootVolume struct for ServerBootVolume -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerBootVolume struct { - // Delete the volume during the termination of the server. Defaults to false. - DeleteOnTermination ServerBootVolumegetDeleteOnTerminationAttributeType `json:"deleteOnTermination,omitempty"` - // Universally Unique Identifier (UUID). - Id ServerBootVolumeGetIdAttributeType `json:"id,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass ServerBootVolumeGetPerformanceClassAttributeType `json:"performanceClass,omitempty"` - // Size in Gigabyte. - Size ServerBootVolumeGetSizeAttributeType `json:"size,omitempty"` - Source ServerBootVolumeGetSourceAttributeType `json:"source,omitempty"` -} - -// NewServerBootVolume instantiates a new ServerBootVolume 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerBootVolume() *ServerBootVolume { - this := ServerBootVolume{} - return &this -} - -// NewServerBootVolumeWithDefaults instantiates a new ServerBootVolume 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerBootVolumeWithDefaults() *ServerBootVolume { - this := ServerBootVolume{} - return &this -} - -// GetDeleteOnTermination returns the DeleteOnTermination 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 *ServerBootVolume) GetDeleteOnTermination() (res ServerBootVolumegetDeleteOnTerminationRetType) { - res, _ = o.GetDeleteOnTerminationOk() - return -} - -// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination 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 *ServerBootVolume) GetDeleteOnTerminationOk() (ret ServerBootVolumegetDeleteOnTerminationRetType, ok bool) { - return getServerBootVolumegetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination) -} - -// HasDeleteOnTermination 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 *ServerBootVolume) HasDeleteOnTermination() bool { - _, ok := o.GetDeleteOnTerminationOk() - return ok -} - -// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerBootVolume) SetDeleteOnTermination(v ServerBootVolumegetDeleteOnTerminationRetType) { - setServerBootVolumegetDeleteOnTerminationAttributeType(&o.DeleteOnTermination, 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 *ServerBootVolume) GetId() (res ServerBootVolumeGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *ServerBootVolume) GetIdOk() (ret ServerBootVolumeGetIdRetType, ok bool) { - return getServerBootVolumeGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *ServerBootVolume) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerBootVolume) SetId(v ServerBootVolumeGetIdRetType) { - setServerBootVolumeGetIdAttributeType(&o.Id, v) -} - -// GetPerformanceClass returns the PerformanceClass 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 *ServerBootVolume) GetPerformanceClass() (res ServerBootVolumeGetPerformanceClassRetType) { - res, _ = o.GetPerformanceClassOk() - return -} - -// GetPerformanceClassOk returns a tuple with the PerformanceClass 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 *ServerBootVolume) GetPerformanceClassOk() (ret ServerBootVolumeGetPerformanceClassRetType, ok bool) { - return getServerBootVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass) -} - -// HasPerformanceClass 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 *ServerBootVolume) HasPerformanceClass() bool { - _, ok := o.GetPerformanceClassOk() - return ok -} - -// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerBootVolume) SetPerformanceClass(v ServerBootVolumeGetPerformanceClassRetType) { - setServerBootVolumeGetPerformanceClassAttributeType(&o.PerformanceClass, v) -} - -// GetSize returns the Size 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 *ServerBootVolume) GetSize() (res ServerBootVolumeGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *ServerBootVolume) GetSizeOk() (ret ServerBootVolumeGetSizeRetType, ok bool) { - return getServerBootVolumeGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *ServerBootVolume) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerBootVolume) SetSize(v ServerBootVolumeGetSizeRetType) { - setServerBootVolumeGetSizeAttributeType(&o.Size, v) -} - -// GetSource returns the Source 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 *ServerBootVolume) GetSource() (res ServerBootVolumeGetSourceRetType) { - res, _ = o.GetSourceOk() - return -} - -// GetSourceOk returns a tuple with the Source 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 *ServerBootVolume) GetSourceOk() (ret ServerBootVolumeGetSourceRetType, ok bool) { - return getServerBootVolumeGetSourceAttributeTypeOk(o.Source) -} - -// HasSource 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 *ServerBootVolume) HasSource() bool { - _, ok := o.GetSourceOk() - return ok -} - -// SetSource gets a reference to the given BootVolumeSource and assigns it to the Source field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerBootVolume) SetSource(v ServerBootVolumeGetSourceRetType) { - setServerBootVolumeGetSourceAttributeType(&o.Source, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServerBootVolume) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServerBootVolumegetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination); ok { - toSerialize["DeleteOnTermination"] = val - } - if val, ok := getServerBootVolumeGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getServerBootVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok { - toSerialize["PerformanceClass"] = val - } - if val, ok := getServerBootVolumeGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getServerBootVolumeGetSourceAttributeTypeOk(o.Source); ok { - toSerialize["Source"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServerBootVolume struct { - value *ServerBootVolume - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerBootVolume) Get() *ServerBootVolume { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerBootVolume) Set(val *ServerBootVolume) { - 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 NullableServerBootVolume) 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 *NullableServerBootVolume) 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 NewNullableServerBootVolume(val *ServerBootVolume) *NullableServerBootVolume { - return &NullableServerBootVolume{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 NullableServerBootVolume) 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 *NullableServerBootVolume) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_boot_volume_test.go b/services/iaas/model_server_boot_volume_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_server_boot_volume_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_server_console_url.go b/services/iaas/model_server_console_url.go deleted file mode 100644 index 29fca59688..0000000000 --- a/services/iaas/model_server_console_url.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ServerConsoleUrl type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerConsoleUrl{} - -/* - types and functions for url -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerConsoleUrlGetUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerConsoleUrlGetUrlAttributeTypeOk(arg ServerConsoleUrlGetUrlAttributeType) (ret ServerConsoleUrlGetUrlRetType, 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 setServerConsoleUrlGetUrlAttributeType(arg *ServerConsoleUrlGetUrlAttributeType, val ServerConsoleUrlGetUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerConsoleUrlGetUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerConsoleUrlGetUrlRetType = string - -// ServerConsoleUrl Object that represents a server console URL. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerConsoleUrl struct { - // REQUIRED - Url ServerConsoleUrlGetUrlAttributeType `json:"url" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ServerConsoleUrl ServerConsoleUrl - -// NewServerConsoleUrl instantiates a new ServerConsoleUrl 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerConsoleUrl(url ServerConsoleUrlGetUrlArgType) *ServerConsoleUrl { - this := ServerConsoleUrl{} - setServerConsoleUrlGetUrlAttributeType(&this.Url, url) - return &this -} - -// NewServerConsoleUrlWithDefaults instantiates a new ServerConsoleUrl 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerConsoleUrlWithDefaults() *ServerConsoleUrl { - this := ServerConsoleUrl{} - return &this -} - -// GetUrl returns the Url field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerConsoleUrl) GetUrl() (ret ServerConsoleUrlGetUrlRetType) { - ret, _ = o.GetUrlOk() - return ret -} - -// GetUrlOk returns a tuple with the Url field value -// 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 *ServerConsoleUrl) GetUrlOk() (ret ServerConsoleUrlGetUrlRetType, ok bool) { - return getServerConsoleUrlGetUrlAttributeTypeOk(o.Url) -} - -// SetUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerConsoleUrl) SetUrl(v ServerConsoleUrlGetUrlRetType) { - setServerConsoleUrlGetUrlAttributeType(&o.Url, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServerConsoleUrl) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServerConsoleUrlGetUrlAttributeTypeOk(o.Url); ok { - toSerialize["Url"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServerConsoleUrl struct { - value *ServerConsoleUrl - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerConsoleUrl) Get() *ServerConsoleUrl { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerConsoleUrl) Set(val *ServerConsoleUrl) { - 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 NullableServerConsoleUrl) 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 *NullableServerConsoleUrl) 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 NewNullableServerConsoleUrl(val *ServerConsoleUrl) *NullableServerConsoleUrl { - return &NullableServerConsoleUrl{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 NullableServerConsoleUrl) 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 *NullableServerConsoleUrl) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_console_url_test.go b/services/iaas/model_server_console_url_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_server_console_url_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_server_list_response.go b/services/iaas/model_server_list_response.go deleted file mode 100644 index 587dcd98c6..0000000000 --- a/services/iaas/model_server_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ServerListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerListResponseGetItemsAttributeType = *[]Server - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerListResponseGetItemsArgType = []Server - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerListResponseGetItemsRetType = []Server - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerListResponseGetItemsAttributeTypeOk(arg ServerListResponseGetItemsAttributeType) (ret ServerListResponseGetItemsRetType, 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 setServerListResponseGetItemsAttributeType(arg *ServerListResponseGetItemsAttributeType, val ServerListResponseGetItemsRetType) { - *arg = &val -} - -// ServerListResponse Response object for server list request. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerListResponse struct { - // A list of servers. - // REQUIRED - Items ServerListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ServerListResponse ServerListResponse - -// NewServerListResponse instantiates a new ServerListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerListResponse(items ServerListResponseGetItemsArgType) *ServerListResponse { - this := ServerListResponse{} - setServerListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewServerListResponseWithDefaults instantiates a new ServerListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerListResponseWithDefaults() *ServerListResponse { - this := ServerListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerListResponse) GetItems() (ret ServerListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *ServerListResponse) GetItemsOk() (ret ServerListResponseGetItemsRetType, ok bool) { - return getServerListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerListResponse) SetItems(v ServerListResponseGetItemsRetType) { - setServerListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServerListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServerListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServerListResponse struct { - value *ServerListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerListResponse) Get() *ServerListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerListResponse) Set(val *ServerListResponse) { - 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 NullableServerListResponse) 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 *NullableServerListResponse) 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 NewNullableServerListResponse(val *ServerListResponse) *NullableServerListResponse { - return &NullableServerListResponse{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 NullableServerListResponse) 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 *NullableServerListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_list_response_test.go b/services/iaas/model_server_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_server_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_server_maintenance.go b/services/iaas/model_server_maintenance.go deleted file mode 100644 index aa329ff60e..0000000000 --- a/services/iaas/model_server_maintenance.go +++ /dev/null @@ -1,317 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the ServerMaintenance type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerMaintenance{} - -/* - types and functions for details -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetDetailsAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerMaintenanceGetDetailsAttributeTypeOk(arg ServerMaintenanceGetDetailsAttributeType) (ret ServerMaintenanceGetDetailsRetType, 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 setServerMaintenanceGetDetailsAttributeType(arg *ServerMaintenanceGetDetailsAttributeType, val ServerMaintenanceGetDetailsRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetDetailsArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetDetailsRetType = string - -/* - types and functions for endsAt -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetEndsAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetEndsAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetEndsAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerMaintenanceGetEndsAtAttributeTypeOk(arg ServerMaintenanceGetEndsAtAttributeType) (ret ServerMaintenanceGetEndsAtRetType, 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 setServerMaintenanceGetEndsAtAttributeType(arg *ServerMaintenanceGetEndsAtAttributeType, val ServerMaintenanceGetEndsAtRetType) { - *arg = &val -} - -/* - types and functions for startsAt -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetStartsAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetStartsAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetStartsAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerMaintenanceGetStartsAtAttributeTypeOk(arg ServerMaintenanceGetStartsAtAttributeType) (ret ServerMaintenanceGetStartsAtRetType, 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 setServerMaintenanceGetStartsAtAttributeType(arg *ServerMaintenanceGetStartsAtAttributeType, val ServerMaintenanceGetStartsAtRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerMaintenanceGetStatusAttributeTypeOk(arg ServerMaintenanceGetStatusAttributeType) (ret ServerMaintenanceGetStatusRetType, 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 setServerMaintenanceGetStatusAttributeType(arg *ServerMaintenanceGetStatusAttributeType, val ServerMaintenanceGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenanceGetStatusRetType = string - -// ServerMaintenance Object that represents the information about the next planned server maintenance window. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerMaintenance struct { - Details ServerMaintenanceGetDetailsAttributeType `json:"details,omitempty"` - // End of the maintenance window. - // REQUIRED - EndsAt ServerMaintenanceGetEndsAtAttributeType `json:"endsAt" required:"true"` - // Start of the maintenance window. - // REQUIRED - StartsAt ServerMaintenanceGetStartsAtAttributeType `json:"startsAt" required:"true"` - // Possible values: `PLANNED`, `ONGOING`. - // REQUIRED - Status ServerMaintenanceGetStatusAttributeType `json:"status" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ServerMaintenance ServerMaintenance - -// NewServerMaintenance instantiates a new ServerMaintenance 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerMaintenance(endsAt ServerMaintenanceGetEndsAtArgType, startsAt ServerMaintenanceGetStartsAtArgType, status ServerMaintenanceGetStatusArgType) *ServerMaintenance { - this := ServerMaintenance{} - setServerMaintenanceGetEndsAtAttributeType(&this.EndsAt, endsAt) - setServerMaintenanceGetStartsAtAttributeType(&this.StartsAt, startsAt) - setServerMaintenanceGetStatusAttributeType(&this.Status, status) - return &this -} - -// NewServerMaintenanceWithDefaults instantiates a new ServerMaintenance 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerMaintenanceWithDefaults() *ServerMaintenance { - this := ServerMaintenance{} - return &this -} - -// GetDetails returns the Details 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 *ServerMaintenance) GetDetails() (res ServerMaintenanceGetDetailsRetType) { - res, _ = o.GetDetailsOk() - return -} - -// GetDetailsOk returns a tuple with the Details 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 *ServerMaintenance) GetDetailsOk() (ret ServerMaintenanceGetDetailsRetType, ok bool) { - return getServerMaintenanceGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails 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 *ServerMaintenance) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given string and assigns it to the Details field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerMaintenance) SetDetails(v ServerMaintenanceGetDetailsRetType) { - setServerMaintenanceGetDetailsAttributeType(&o.Details, v) -} - -// GetEndsAt returns the EndsAt field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerMaintenance) GetEndsAt() (ret ServerMaintenanceGetEndsAtRetType) { - ret, _ = o.GetEndsAtOk() - return ret -} - -// GetEndsAtOk returns a tuple with the EndsAt field value -// 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 *ServerMaintenance) GetEndsAtOk() (ret ServerMaintenanceGetEndsAtRetType, ok bool) { - return getServerMaintenanceGetEndsAtAttributeTypeOk(o.EndsAt) -} - -// SetEndsAt sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerMaintenance) SetEndsAt(v ServerMaintenanceGetEndsAtRetType) { - setServerMaintenanceGetEndsAtAttributeType(&o.EndsAt, v) -} - -// GetStartsAt returns the StartsAt field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerMaintenance) GetStartsAt() (ret ServerMaintenanceGetStartsAtRetType) { - ret, _ = o.GetStartsAtOk() - return ret -} - -// GetStartsAtOk returns a tuple with the StartsAt field value -// 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 *ServerMaintenance) GetStartsAtOk() (ret ServerMaintenanceGetStartsAtRetType, ok bool) { - return getServerMaintenanceGetStartsAtAttributeTypeOk(o.StartsAt) -} - -// SetStartsAt sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerMaintenance) SetStartsAt(v ServerMaintenanceGetStartsAtRetType) { - setServerMaintenanceGetStartsAtAttributeType(&o.StartsAt, 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 *ServerMaintenance) GetStatus() (ret ServerMaintenanceGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// 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 *ServerMaintenance) GetStatusOk() (ret ServerMaintenanceGetStatusRetType, ok bool) { - return getServerMaintenanceGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerMaintenance) SetStatus(v ServerMaintenanceGetStatusRetType) { - setServerMaintenanceGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServerMaintenance) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServerMaintenanceGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getServerMaintenanceGetEndsAtAttributeTypeOk(o.EndsAt); ok { - toSerialize["EndsAt"] = val - } - if val, ok := getServerMaintenanceGetStartsAtAttributeTypeOk(o.StartsAt); ok { - toSerialize["StartsAt"] = val - } - if val, ok := getServerMaintenanceGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServerMaintenance struct { - value *ServerMaintenance - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerMaintenance) Get() *ServerMaintenance { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerMaintenance) Set(val *ServerMaintenance) { - 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 NullableServerMaintenance) 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 *NullableServerMaintenance) 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 NewNullableServerMaintenance(val *ServerMaintenance) *NullableServerMaintenance { - return &NullableServerMaintenance{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 NullableServerMaintenance) 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 *NullableServerMaintenance) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_maintenance_test.go b/services/iaas/model_server_maintenance_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_server_maintenance_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_server_network.go b/services/iaas/model_server_network.go deleted file mode 100644 index 9c8b37a5a5..0000000000 --- a/services/iaas/model_server_network.go +++ /dev/null @@ -1,661 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ServerNetwork type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerNetwork{} - -/* - types and functions for allowedAddresses -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetAllowedAddressesAttributeType = *[]AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetAllowedAddressesArgType = []AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetAllowedAddressesRetType = []AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetAllowedAddressesAttributeTypeOk(arg ServerNetworkGetAllowedAddressesAttributeType) (ret ServerNetworkGetAllowedAddressesRetType, 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 setServerNetworkGetAllowedAddressesAttributeType(arg *ServerNetworkGetAllowedAddressesAttributeType, val ServerNetworkGetAllowedAddressesRetType) { - *arg = &val -} - -/* - types and functions for ipv4 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetIpv4AttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetIpv4AttributeTypeOk(arg ServerNetworkGetIpv4AttributeType) (ret ServerNetworkGetIpv4RetType, 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 setServerNetworkGetIpv4AttributeType(arg *ServerNetworkGetIpv4AttributeType, val ServerNetworkGetIpv4RetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetIpv4ArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetIpv4RetType = string - -/* - types and functions for ipv6 -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetIpv6AttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetIpv6AttributeTypeOk(arg ServerNetworkGetIpv6AttributeType) (ret ServerNetworkGetIpv6RetType, 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 setServerNetworkGetIpv6AttributeType(arg *ServerNetworkGetIpv6AttributeType, val ServerNetworkGetIpv6RetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetIpv6ArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetIpv6RetType = string - -/* - types and functions for mac -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetMacAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetMacAttributeTypeOk(arg ServerNetworkGetMacAttributeType) (ret ServerNetworkGetMacRetType, 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 setServerNetworkGetMacAttributeType(arg *ServerNetworkGetMacAttributeType, val ServerNetworkGetMacRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetMacArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetMacRetType = string - -/* - types and functions for networkId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNetworkIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetNetworkIdAttributeTypeOk(arg ServerNetworkGetNetworkIdAttributeType) (ret ServerNetworkGetNetworkIdRetType, 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 setServerNetworkGetNetworkIdAttributeType(arg *ServerNetworkGetNetworkIdAttributeType, val ServerNetworkGetNetworkIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNetworkIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNetworkIdRetType = string - -/* - types and functions for networkName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNetworkNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetNetworkNameAttributeTypeOk(arg ServerNetworkGetNetworkNameAttributeType) (ret ServerNetworkGetNetworkNameRetType, 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 setServerNetworkGetNetworkNameAttributeType(arg *ServerNetworkGetNetworkNameAttributeType, val ServerNetworkGetNetworkNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNetworkNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNetworkNameRetType = string - -/* - types and functions for nicId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNicIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetNicIdAttributeTypeOk(arg ServerNetworkGetNicIdAttributeType) (ret ServerNetworkGetNicIdRetType, 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 setServerNetworkGetNicIdAttributeType(arg *ServerNetworkGetNicIdAttributeType, val ServerNetworkGetNicIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNicIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetNicIdRetType = string - -/* - types and functions for nicSecurity -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkgetNicSecurityAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkgetNicSecurityArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkgetNicSecurityRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkgetNicSecurityAttributeTypeOk(arg ServerNetworkgetNicSecurityAttributeType) (ret ServerNetworkgetNicSecurityRetType, 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 setServerNetworkgetNicSecurityAttributeType(arg *ServerNetworkgetNicSecurityAttributeType, val ServerNetworkgetNicSecurityRetType) { - *arg = &val -} - -/* - types and functions for publicIp -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetPublicIpAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetPublicIpAttributeTypeOk(arg ServerNetworkGetPublicIpAttributeType) (ret ServerNetworkGetPublicIpRetType, 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 setServerNetworkGetPublicIpAttributeType(arg *ServerNetworkGetPublicIpAttributeType, val ServerNetworkGetPublicIpRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetPublicIpArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetPublicIpRetType = string - -/* - types and functions for securityGroups -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetSecurityGroupsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetSecurityGroupsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworkGetSecurityGroupsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNetworkGetSecurityGroupsAttributeTypeOk(arg ServerNetworkGetSecurityGroupsAttributeType) (ret ServerNetworkGetSecurityGroupsRetType, 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 setServerNetworkGetSecurityGroupsAttributeType(arg *ServerNetworkGetSecurityGroupsAttributeType, val ServerNetworkGetSecurityGroupsRetType) { - *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"` - // Object that represents an IP address. - Ipv4 ServerNetworkGetIpv4AttributeType `json:"ipv4,omitempty"` - // String that represents an IPv6 address. - Ipv6 ServerNetworkGetIpv6AttributeType `json:"ipv6,omitempty"` - // Object that represents an MAC address. - // REQUIRED - Mac ServerNetworkGetMacAttributeType `json:"mac" required:"true"` - // Universally Unique Identifier (UUID). - // REQUIRED - NetworkId ServerNetworkGetNetworkIdAttributeType `json:"networkId" required:"true"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - NetworkName ServerNetworkGetNetworkNameAttributeType `json:"networkName" required:"true"` - // Universally Unique Identifier (UUID). - // REQUIRED - NicId ServerNetworkGetNicIdAttributeType `json:"nicId" required:"true"` - // If this is set to false, then no security groups will apply to this server network interface. - // REQUIRED - NicSecurity ServerNetworkgetNicSecurityAttributeType `json:"nicSecurity" required:"true"` - // Object that represents an IP address. - PublicIp ServerNetworkGetPublicIpAttributeType `json:"publicIp,omitempty"` - // A list of UUIDs. - SecurityGroups ServerNetworkGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ServerNetwork ServerNetwork - -// NewServerNetwork instantiates a new ServerNetwork 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerNetwork(mac ServerNetworkGetMacArgType, networkId ServerNetworkGetNetworkIdArgType, networkName ServerNetworkGetNetworkNameArgType, nicId ServerNetworkGetNicIdArgType, nicSecurity ServerNetworkgetNicSecurityArgType) *ServerNetwork { - this := ServerNetwork{} - setServerNetworkGetMacAttributeType(&this.Mac, mac) - setServerNetworkGetNetworkIdAttributeType(&this.NetworkId, networkId) - setServerNetworkGetNetworkNameAttributeType(&this.NetworkName, networkName) - setServerNetworkGetNicIdAttributeType(&this.NicId, nicId) - setServerNetworkgetNicSecurityAttributeType(&this.NicSecurity, nicSecurity) - return &this -} - -// NewServerNetworkWithDefaults instantiates a new ServerNetwork 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServerNetworkWithDefaults() *ServerNetwork { - this := ServerNetwork{} - return &this -} - -// GetAllowedAddresses returns the AllowedAddresses 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) GetAllowedAddresses() (res ServerNetworkGetAllowedAddressesRetType) { - res, _ = o.GetAllowedAddressesOk() - return -} - -// GetAllowedAddressesOk returns a tuple with the AllowedAddresses 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) GetAllowedAddressesOk() (ret ServerNetworkGetAllowedAddressesRetType, ok bool) { - return getServerNetworkGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses) -} - -// HasAllowedAddresses 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) HasAllowedAddresses() bool { - _, ok := o.GetAllowedAddressesOk() - return ok -} - -// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetAllowedAddresses(v ServerNetworkGetAllowedAddressesRetType) { - setServerNetworkGetAllowedAddressesAttributeType(&o.AllowedAddresses, 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) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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) GetIpv4Ok() (ret ServerNetworkGetIpv4RetType, ok bool) { - return getServerNetworkGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given string and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetIpv4(v ServerNetworkGetIpv4RetType) { - setServerNetworkGetIpv4AttributeType(&o.Ipv4, v) -} - -// GetIpv6 returns the Ipv6 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) GetIpv6() (res ServerNetworkGetIpv6RetType) { - res, _ = o.GetIpv6Ok() - return -} - -// GetIpv6Ok returns a tuple with the Ipv6 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) GetIpv6Ok() (ret ServerNetworkGetIpv6RetType, ok bool) { - return getServerNetworkGetIpv6AttributeTypeOk(o.Ipv6) -} - -// HasIpv6 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) HasIpv6() bool { - _, ok := o.GetIpv6Ok() - return ok -} - -// SetIpv6 gets a reference to the given string and assigns it to the Ipv6 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetIpv6(v ServerNetworkGetIpv6RetType) { - setServerNetworkGetIpv6AttributeType(&o.Ipv6, v) -} - -// GetMac returns the Mac field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) GetMac() (ret ServerNetworkGetMacRetType) { - ret, _ = o.GetMacOk() - return ret -} - -// GetMacOk returns a tuple with the Mac field value -// 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) GetMacOk() (ret ServerNetworkGetMacRetType, ok bool) { - return getServerNetworkGetMacAttributeTypeOk(o.Mac) -} - -// SetMac sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetMac(v ServerNetworkGetMacRetType) { - setServerNetworkGetMacAttributeType(&o.Mac, v) -} - -// GetNetworkId returns the NetworkId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) GetNetworkId() (ret ServerNetworkGetNetworkIdRetType) { - ret, _ = o.GetNetworkIdOk() - return ret -} - -// GetNetworkIdOk returns a tuple with the NetworkId field value -// 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) GetNetworkIdOk() (ret ServerNetworkGetNetworkIdRetType, ok bool) { - return getServerNetworkGetNetworkIdAttributeTypeOk(o.NetworkId) -} - -// SetNetworkId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetNetworkId(v ServerNetworkGetNetworkIdRetType) { - setServerNetworkGetNetworkIdAttributeType(&o.NetworkId, v) -} - -// GetNetworkName returns the NetworkName field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) GetNetworkName() (ret ServerNetworkGetNetworkNameRetType) { - ret, _ = o.GetNetworkNameOk() - return ret -} - -// GetNetworkNameOk returns a tuple with the NetworkName field value -// 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) GetNetworkNameOk() (ret ServerNetworkGetNetworkNameRetType, ok bool) { - return getServerNetworkGetNetworkNameAttributeTypeOk(o.NetworkName) -} - -// SetNetworkName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetNetworkName(v ServerNetworkGetNetworkNameRetType) { - setServerNetworkGetNetworkNameAttributeType(&o.NetworkName, v) -} - -// GetNicId returns the NicId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) GetNicId() (ret ServerNetworkGetNicIdRetType) { - ret, _ = o.GetNicIdOk() - return ret -} - -// GetNicIdOk returns a tuple with the NicId field value -// 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) GetNicIdOk() (ret ServerNetworkGetNicIdRetType, ok bool) { - return getServerNetworkGetNicIdAttributeTypeOk(o.NicId) -} - -// SetNicId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetNicId(v ServerNetworkGetNicIdRetType) { - setServerNetworkGetNicIdAttributeType(&o.NicId, v) -} - -// GetNicSecurity returns the NicSecurity field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) GetNicSecurity() (ret ServerNetworkgetNicSecurityRetType) { - ret, _ = o.GetNicSecurityOk() - return ret -} - -// GetNicSecurityOk returns a tuple with the NicSecurity field value -// 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) GetNicSecurityOk() (ret ServerNetworkgetNicSecurityRetType, ok bool) { - return getServerNetworkgetNicSecurityAttributeTypeOk(o.NicSecurity) -} - -// SetNicSecurity sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetNicSecurity(v ServerNetworkgetNicSecurityRetType) { - setServerNetworkgetNicSecurityAttributeType(&o.NicSecurity, v) -} - -// GetPublicIp returns the PublicIp 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) GetPublicIp() (res ServerNetworkGetPublicIpRetType) { - res, _ = o.GetPublicIpOk() - return -} - -// GetPublicIpOk returns a tuple with the PublicIp 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) GetPublicIpOk() (ret ServerNetworkGetPublicIpRetType, ok bool) { - return getServerNetworkGetPublicIpAttributeTypeOk(o.PublicIp) -} - -// HasPublicIp 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) HasPublicIp() bool { - _, ok := o.GetPublicIpOk() - return ok -} - -// SetPublicIp gets a reference to the given string and assigns it to the PublicIp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetPublicIp(v ServerNetworkGetPublicIpRetType) { - setServerNetworkGetPublicIpAttributeType(&o.PublicIp, v) -} - -// GetSecurityGroups returns the SecurityGroups 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) GetSecurityGroups() (res ServerNetworkGetSecurityGroupsRetType) { - res, _ = o.GetSecurityGroupsOk() - return -} - -// GetSecurityGroupsOk returns a tuple with the SecurityGroups 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) GetSecurityGroupsOk() (ret ServerNetworkGetSecurityGroupsRetType, ok bool) { - return getServerNetworkGetSecurityGroupsAttributeTypeOk(o.SecurityGroups) -} - -// HasSecurityGroups 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) HasSecurityGroups() bool { - _, ok := o.GetSecurityGroupsOk() - return ok -} - -// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerNetwork) SetSecurityGroups(v ServerNetworkGetSecurityGroupsRetType) { - setServerNetworkGetSecurityGroupsAttributeType(&o.SecurityGroups, 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 := getServerNetworkGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - if val, ok := getServerNetworkGetIpv6AttributeTypeOk(o.Ipv6); ok { - toSerialize["Ipv6"] = val - } - if val, ok := getServerNetworkGetMacAttributeTypeOk(o.Mac); ok { - toSerialize["Mac"] = val - } - if val, ok := getServerNetworkGetNetworkIdAttributeTypeOk(o.NetworkId); ok { - toSerialize["NetworkId"] = val - } - if val, ok := getServerNetworkGetNetworkNameAttributeTypeOk(o.NetworkName); ok { - toSerialize["NetworkName"] = val - } - if val, ok := getServerNetworkGetNicIdAttributeTypeOk(o.NicId); ok { - toSerialize["NicId"] = val - } - if val, ok := getServerNetworkgetNicSecurityAttributeTypeOk(o.NicSecurity); ok { - toSerialize["NicSecurity"] = val - } - if val, ok := getServerNetworkGetPublicIpAttributeTypeOk(o.PublicIp); ok { - toSerialize["PublicIp"] = val - } - if val, ok := getServerNetworkGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok { - toSerialize["SecurityGroups"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServerNetwork struct { - value *ServerNetwork - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerNetwork) Get() *ServerNetwork { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerNetwork) Set(val *ServerNetwork) { - 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 NullableServerNetwork) 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 *NullableServerNetwork) 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 NewNullableServerNetwork(val *ServerNetwork) *NullableServerNetwork { - return &NullableServerNetwork{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 NullableServerNetwork) 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 *NullableServerNetwork) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_network_test.go b/services/iaas/model_server_network_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_server_network_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_server_networking.go b/services/iaas/model_server_networking.go deleted file mode 100644 index 45fb148d1f..0000000000 --- a/services/iaas/model_server_networking.go +++ /dev/null @@ -1,159 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" -) - -// ServerNetworking - The initial networking setup for the server creation. A network, a nic or nothing can be given. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNetworking struct { - CreateServerNetworking *CreateServerNetworking - CreateServerNetworkingWithNics *CreateServerNetworkingWithNics -} - -// CreateServerNetworkingAsServerNetworking is a convenience function that returns CreateServerNetworking wrapped in ServerNetworking -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateServerNetworkingAsServerNetworking(v *CreateServerNetworking) ServerNetworking { - return ServerNetworking{ - CreateServerNetworking: v, - } -} - -// CreateServerNetworkingWithNicsAsServerNetworking is a convenience function that returns CreateServerNetworkingWithNics wrapped in ServerNetworking -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateServerNetworkingWithNicsAsServerNetworking(v *CreateServerNetworkingWithNics) ServerNetworking { - return ServerNetworking{ - CreateServerNetworkingWithNics: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *ServerNetworking) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // Workaround until upstream issue is fixed: - // https://github.com/OpenAPITools/openapi-generator/issues/21751 - // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226 - // try to unmarshal data into CreateServerNetworking - dstServerNetworking1 := &ServerNetworking{} - err = json.Unmarshal(data, &dstServerNetworking1.CreateServerNetworking) - if err == nil { - jsonCreateServerNetworking, _ := json.Marshal(&dstServerNetworking1.CreateServerNetworking) - if string(jsonCreateServerNetworking) != "{}" { // empty struct - dst.CreateServerNetworking = dstServerNetworking1.CreateServerNetworking - match++ - } - } - - // try to unmarshal data into CreateServerNetworkingWithNics - dstServerNetworking2 := &ServerNetworking{} - err = json.Unmarshal(data, &dstServerNetworking2.CreateServerNetworkingWithNics) - if err == nil { - jsonCreateServerNetworkingWithNics, _ := json.Marshal(&dstServerNetworking2.CreateServerNetworkingWithNics) - if string(jsonCreateServerNetworkingWithNics) != "{}" { // empty struct - dst.CreateServerNetworkingWithNics = dstServerNetworking2.CreateServerNetworkingWithNics - match++ - } - } - - if match > 1 { // more than 1 match - // reset to nil - dst.CreateServerNetworking = nil - dst.CreateServerNetworkingWithNics = nil - - return fmt.Errorf("data matches more than one schema in oneOf(ServerNetworking)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src ServerNetworking) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.CreateServerNetworking != nil { - return json.Marshal(&src.CreateServerNetworking) - } - - if src.CreateServerNetworkingWithNics != nil { - return json.Marshal(&src.CreateServerNetworkingWithNics) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *ServerNetworking) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.CreateServerNetworking != nil { - return obj.CreateServerNetworking - } - - if obj.CreateServerNetworkingWithNics != nil { - return obj.CreateServerNetworkingWithNics - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServerNetworking struct { - value *ServerNetworking - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerNetworking) Get() *ServerNetworking { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerNetworking) Set(val *ServerNetworking) { - 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 NullableServerNetworking) 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 *NullableServerNetworking) 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 NewNullableServerNetworking(val *ServerNetworking) *NullableServerNetworking { - return &NullableServerNetworking{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 NullableServerNetworking) 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 *NullableServerNetworking) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_networking_test.go b/services/iaas/model_server_networking_test.go deleted file mode 100644 index 1b1c28c4f4..0000000000 --- a/services/iaas/model_server_networking_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas - -import ( - "testing" -) - -// isOneOf - -func TestServerNetworking_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{} - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := &ServerNetworking{} - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - marshalJson, err := v.MarshalJSON() - if err != nil { - t.Fatalf("failed marshalling ServerNetworking: %v", err) - } - if string(marshalJson) != string(tt.args.src) { - t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson) - } - }) - } -} diff --git a/services/iaas/model_server_test.go b/services/iaas/model_server_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_server_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_service_account_mail_list_response.go b/services/iaas/model_service_account_mail_list_response.go deleted file mode 100644 index cc4513a86d..0000000000 --- a/services/iaas/model_service_account_mail_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the ServiceAccountMailListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServiceAccountMailListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountMailListResponseGetItemsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountMailListResponseGetItemsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountMailListResponseGetItemsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServiceAccountMailListResponseGetItemsAttributeTypeOk(arg ServiceAccountMailListResponseGetItemsAttributeType) (ret ServiceAccountMailListResponseGetItemsRetType, 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 setServiceAccountMailListResponseGetItemsAttributeType(arg *ServiceAccountMailListResponseGetItemsAttributeType, val ServiceAccountMailListResponseGetItemsRetType) { - *arg = &val -} - -// ServiceAccountMailListResponse Service account mail list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountMailListResponse struct { - // A list of service account mails. - // REQUIRED - Items ServiceAccountMailListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ServiceAccountMailListResponse ServiceAccountMailListResponse - -// NewServiceAccountMailListResponse instantiates a new ServiceAccountMailListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServiceAccountMailListResponse(items ServiceAccountMailListResponseGetItemsArgType) *ServiceAccountMailListResponse { - this := ServiceAccountMailListResponse{} - setServiceAccountMailListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewServiceAccountMailListResponseWithDefaults instantiates a new ServiceAccountMailListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServiceAccountMailListResponseWithDefaults() *ServiceAccountMailListResponse { - this := ServiceAccountMailListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServiceAccountMailListResponse) GetItems() (ret ServiceAccountMailListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *ServiceAccountMailListResponse) GetItemsOk() (ret ServiceAccountMailListResponseGetItemsRetType, ok bool) { - return getServiceAccountMailListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServiceAccountMailListResponse) SetItems(v ServiceAccountMailListResponseGetItemsRetType) { - setServiceAccountMailListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServiceAccountMailListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServiceAccountMailListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServiceAccountMailListResponse struct { - value *ServiceAccountMailListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServiceAccountMailListResponse) Get() *ServiceAccountMailListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServiceAccountMailListResponse) Set(val *ServiceAccountMailListResponse) { - 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 NullableServiceAccountMailListResponse) 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 *NullableServiceAccountMailListResponse) 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 NewNullableServiceAccountMailListResponse(val *ServiceAccountMailListResponse) *NullableServiceAccountMailListResponse { - return &NullableServiceAccountMailListResponse{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 NullableServiceAccountMailListResponse) 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 *NullableServiceAccountMailListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_service_account_mail_list_response_test.go b/services/iaas/model_service_account_mail_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_service_account_mail_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_set_image_share_payload.go b/services/iaas/model_set_image_share_payload.go deleted file mode 100644 index 82bdc8d3e8..0000000000 --- a/services/iaas/model_set_image_share_payload.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the SetImageSharePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetImageSharePayload{} - -/* - types and functions for parentOrganization -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SetImageSharePayloadgetParentOrganizationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SetImageSharePayloadgetParentOrganizationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SetImageSharePayloadgetParentOrganizationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSetImageSharePayloadgetParentOrganizationAttributeTypeOk(arg SetImageSharePayloadgetParentOrganizationAttributeType) (ret SetImageSharePayloadgetParentOrganizationRetType, 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 setSetImageSharePayloadgetParentOrganizationAttributeType(arg *SetImageSharePayloadgetParentOrganizationAttributeType, val SetImageSharePayloadgetParentOrganizationRetType) { - *arg = &val -} - -/* - types and functions for projects -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SetImageSharePayloadGetProjectsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SetImageSharePayloadGetProjectsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SetImageSharePayloadGetProjectsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSetImageSharePayloadGetProjectsAttributeTypeOk(arg SetImageSharePayloadGetProjectsAttributeType) (ret SetImageSharePayloadGetProjectsRetType, 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 setSetImageSharePayloadGetProjectsAttributeType(arg *SetImageSharePayloadGetProjectsAttributeType, val SetImageSharePayloadGetProjectsRetType) { - *arg = &val -} - -// SetImageSharePayload Share details of an Image. For requests ParentOrganization and Projects are mutually exclusive. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SetImageSharePayload struct { - // Image is shared with all projects inside the image owners organization. - ParentOrganization SetImageSharePayloadgetParentOrganizationAttributeType `json:"parentOrganization,omitempty"` - // List of all projects the Image is shared with. - Projects SetImageSharePayloadGetProjectsAttributeType `json:"projects,omitempty"` -} - -// NewSetImageSharePayload instantiates a new SetImageSharePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSetImageSharePayload() *SetImageSharePayload { - this := SetImageSharePayload{} - return &this -} - -// NewSetImageSharePayloadWithDefaults instantiates a new SetImageSharePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSetImageSharePayloadWithDefaults() *SetImageSharePayload { - this := SetImageSharePayload{} - return &this -} - -// GetParentOrganization returns the ParentOrganization 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 *SetImageSharePayload) GetParentOrganization() (res SetImageSharePayloadgetParentOrganizationRetType) { - res, _ = o.GetParentOrganizationOk() - return -} - -// GetParentOrganizationOk returns a tuple with the ParentOrganization 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 *SetImageSharePayload) GetParentOrganizationOk() (ret SetImageSharePayloadgetParentOrganizationRetType, ok bool) { - return getSetImageSharePayloadgetParentOrganizationAttributeTypeOk(o.ParentOrganization) -} - -// HasParentOrganization 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 *SetImageSharePayload) HasParentOrganization() bool { - _, ok := o.GetParentOrganizationOk() - return ok -} - -// SetParentOrganization gets a reference to the given bool and assigns it to the ParentOrganization field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SetImageSharePayload) SetParentOrganization(v SetImageSharePayloadgetParentOrganizationRetType) { - setSetImageSharePayloadgetParentOrganizationAttributeType(&o.ParentOrganization, v) -} - -// GetProjects returns the Projects 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 *SetImageSharePayload) GetProjects() (res SetImageSharePayloadGetProjectsRetType) { - res, _ = o.GetProjectsOk() - return -} - -// GetProjectsOk returns a tuple with the Projects 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 *SetImageSharePayload) GetProjectsOk() (ret SetImageSharePayloadGetProjectsRetType, ok bool) { - return getSetImageSharePayloadGetProjectsAttributeTypeOk(o.Projects) -} - -// HasProjects 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 *SetImageSharePayload) HasProjects() bool { - _, ok := o.GetProjectsOk() - return ok -} - -// SetProjects gets a reference to the given []string and assigns it to the Projects field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SetImageSharePayload) SetProjects(v SetImageSharePayloadGetProjectsRetType) { - setSetImageSharePayloadGetProjectsAttributeType(&o.Projects, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SetImageSharePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSetImageSharePayloadgetParentOrganizationAttributeTypeOk(o.ParentOrganization); ok { - toSerialize["ParentOrganization"] = val - } - if val, ok := getSetImageSharePayloadGetProjectsAttributeTypeOk(o.Projects); ok { - toSerialize["Projects"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSetImageSharePayload struct { - value *SetImageSharePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSetImageSharePayload) Get() *SetImageSharePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSetImageSharePayload) Set(val *SetImageSharePayload) { - 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 NullableSetImageSharePayload) 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 *NullableSetImageSharePayload) 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 NewNullableSetImageSharePayload(val *SetImageSharePayload) *NullableSetImageSharePayload { - return &NullableSetImageSharePayload{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 NullableSetImageSharePayload) 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 *NullableSetImageSharePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_set_image_share_payload_test.go b/services/iaas/model_set_image_share_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_set_image_share_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_snapshot.go b/services/iaas/model_snapshot.go deleted file mode 100644 index 6326a0a1b5..0000000000 --- a/services/iaas/model_snapshot.go +++ /dev/null @@ -1,682 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Snapshot type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Snapshot{} - -/* - types and functions for availabilityZone -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetAvailabilityZoneAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetAvailabilityZoneAttributeTypeOk(arg SnapshotGetAvailabilityZoneAttributeType) (ret SnapshotGetAvailabilityZoneRetType, 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 setSnapshotGetAvailabilityZoneAttributeType(arg *SnapshotGetAvailabilityZoneAttributeType, val SnapshotGetAvailabilityZoneRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetAvailabilityZoneArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetAvailabilityZoneRetType = string - -/* - 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 SnapshotGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetCreatedAtAttributeTypeOk(arg SnapshotGetCreatedAtAttributeType) (ret SnapshotGetCreatedAtRetType, 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 setSnapshotGetCreatedAtAttributeType(arg *SnapshotGetCreatedAtAttributeType, val SnapshotGetCreatedAtRetType) { - *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 SnapshotGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetDescriptionAttributeTypeOk(arg SnapshotGetDescriptionAttributeType) (ret SnapshotGetDescriptionRetType, 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 setSnapshotGetDescriptionAttributeType(arg *SnapshotGetDescriptionAttributeType, val SnapshotGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetDescriptionRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetIdAttributeTypeOk(arg SnapshotGetIdAttributeType) (ret SnapshotGetIdRetType, 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 setSnapshotGetIdAttributeType(arg *SnapshotGetIdAttributeType, val SnapshotGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetLabelsAttributeTypeOk(arg SnapshotGetLabelsAttributeType) (ret SnapshotGetLabelsRetType, 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 setSnapshotGetLabelsAttributeType(arg *SnapshotGetLabelsAttributeType, val SnapshotGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetNameAttributeTypeOk(arg SnapshotGetNameAttributeType) (ret SnapshotGetNameRetType, 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 setSnapshotGetNameAttributeType(arg *SnapshotGetNameAttributeType, val SnapshotGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetNameRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetSizeAttributeTypeOk(arg SnapshotGetSizeAttributeType) (ret SnapshotGetSizeRetType, 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 setSnapshotGetSizeAttributeType(arg *SnapshotGetSizeAttributeType, val SnapshotGetSizeRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetStatusAttributeTypeOk(arg SnapshotGetStatusAttributeType) (ret SnapshotGetStatusRetType, 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 setSnapshotGetStatusAttributeType(arg *SnapshotGetStatusAttributeType, val SnapshotGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetStatusRetType = 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 SnapshotGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetUpdatedAtAttributeTypeOk(arg SnapshotGetUpdatedAtAttributeType) (ret SnapshotGetUpdatedAtRetType, 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 setSnapshotGetUpdatedAtAttributeType(arg *SnapshotGetUpdatedAtAttributeType, val SnapshotGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for volumeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetVolumeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotGetVolumeIdAttributeTypeOk(arg SnapshotGetVolumeIdAttributeType) (ret SnapshotGetVolumeIdRetType, 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 setSnapshotGetVolumeIdAttributeType(arg *SnapshotGetVolumeIdAttributeType, val SnapshotGetVolumeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetVolumeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotGetVolumeIdRetType = string - -// Snapshot Object that represents a snapshot. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Snapshot struct { - // Object that represents an availability zone. - AvailabilityZone SnapshotGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` - // Date-time when resource was created. - CreatedAt SnapshotGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - 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. - Labels SnapshotGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name SnapshotGetNameAttributeType `json:"name,omitempty"` - // Size in Gigabyte. - Size SnapshotGetSizeAttributeType `json:"size,omitempty"` - // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. - Status SnapshotGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt SnapshotGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - // Universally Unique Identifier (UUID). - // REQUIRED - VolumeId SnapshotGetVolumeIdAttributeType `json:"volumeId" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Snapshot Snapshot - -// NewSnapshot instantiates a new Snapshot 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSnapshot(volumeId SnapshotGetVolumeIdArgType) *Snapshot { - this := Snapshot{} - setSnapshotGetVolumeIdAttributeType(&this.VolumeId, volumeId) - return &this -} - -// NewSnapshotWithDefaults instantiates a new Snapshot 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSnapshotWithDefaults() *Snapshot { - this := Snapshot{} - return &this -} - -// GetAvailabilityZone returns the AvailabilityZone 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 *Snapshot) GetAvailabilityZone() (res SnapshotGetAvailabilityZoneRetType) { - res, _ = o.GetAvailabilityZoneOk() - return -} - -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone 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 *Snapshot) GetAvailabilityZoneOk() (ret SnapshotGetAvailabilityZoneRetType, ok bool) { - return getSnapshotGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) -} - -// HasAvailabilityZone 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 *Snapshot) HasAvailabilityZone() bool { - _, ok := o.GetAvailabilityZoneOk() - return ok -} - -// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) SetAvailabilityZone(v SnapshotGetAvailabilityZoneRetType) { - setSnapshotGetAvailabilityZoneAttributeType(&o.AvailabilityZone, 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 *Snapshot) GetCreatedAt() (res SnapshotGetCreatedAtRetType) { - 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 *Snapshot) GetCreatedAtOk() (ret SnapshotGetCreatedAtRetType, ok bool) { - return getSnapshotGetCreatedAtAttributeTypeOk(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 *Snapshot) 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 *Snapshot) SetCreatedAt(v SnapshotGetCreatedAtRetType) { - setSnapshotGetCreatedAtAttributeType(&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 *Snapshot) GetDescription() (res SnapshotGetDescriptionRetType) { - 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 *Snapshot) GetDescriptionOk() (ret SnapshotGetDescriptionRetType, ok bool) { - return getSnapshotGetDescriptionAttributeTypeOk(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 *Snapshot) 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 *Snapshot) SetDescription(v SnapshotGetDescriptionRetType) { - setSnapshotGetDescriptionAttributeType(&o.Description, 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 *Snapshot) GetId() (res SnapshotGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *Snapshot) GetIdOk() (ret SnapshotGetIdRetType, ok bool) { - return getSnapshotGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Snapshot) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) SetId(v SnapshotGetIdRetType) { - setSnapshotGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) GetLabels() (res SnapshotGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) GetLabelsOk() (ret SnapshotGetLabelsRetType, ok bool) { - return getSnapshotGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) SetLabels(v SnapshotGetLabelsRetType) { - setSnapshotGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) GetName() (res SnapshotGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *Snapshot) GetNameOk() (ret SnapshotGetNameRetType, ok bool) { - return getSnapshotGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *Snapshot) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) SetName(v SnapshotGetNameRetType) { - setSnapshotGetNameAttributeType(&o.Name, v) -} - -// GetSize returns the Size 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 *Snapshot) GetSize() (res SnapshotGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *Snapshot) GetSizeOk() (ret SnapshotGetSizeRetType, ok bool) { - return getSnapshotGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *Snapshot) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) SetSize(v SnapshotGetSizeRetType) { - setSnapshotGetSizeAttributeType(&o.Size, v) -} - -// GetStatus returns the Status 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 *Snapshot) GetStatus() (res SnapshotGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *Snapshot) GetStatusOk() (ret SnapshotGetStatusRetType, ok bool) { - return getSnapshotGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *Snapshot) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) SetStatus(v SnapshotGetStatusRetType) { - setSnapshotGetStatusAttributeType(&o.Status, 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 *Snapshot) GetUpdatedAt() (res SnapshotGetUpdatedAtRetType) { - 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 *Snapshot) GetUpdatedAtOk() (ret SnapshotGetUpdatedAtRetType, ok bool) { - return getSnapshotGetUpdatedAtAttributeTypeOk(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 *Snapshot) 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 *Snapshot) SetUpdatedAt(v SnapshotGetUpdatedAtRetType) { - setSnapshotGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetVolumeId returns the VolumeId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) GetVolumeId() (ret SnapshotGetVolumeIdRetType) { - ret, _ = o.GetVolumeIdOk() - return ret -} - -// GetVolumeIdOk returns a tuple with the VolumeId field value -// 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 *Snapshot) GetVolumeIdOk() (ret SnapshotGetVolumeIdRetType, ok bool) { - return getSnapshotGetVolumeIdAttributeTypeOk(o.VolumeId) -} - -// SetVolumeId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Snapshot) SetVolumeId(v SnapshotGetVolumeIdRetType) { - setSnapshotGetVolumeIdAttributeType(&o.VolumeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Snapshot) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSnapshotGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { - toSerialize["AvailabilityZone"] = val - } - if val, ok := getSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getSnapshotGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getSnapshotGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getSnapshotGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getSnapshotGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getSnapshotGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getSnapshotGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getSnapshotGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getSnapshotGetVolumeIdAttributeTypeOk(o.VolumeId); ok { - toSerialize["VolumeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSnapshot struct { - value *Snapshot - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSnapshot) Get() *Snapshot { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSnapshot) Set(val *Snapshot) { - 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 NullableSnapshot) 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 *NullableSnapshot) 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 NewNullableSnapshot(val *Snapshot) *NullableSnapshot { - return &NullableSnapshot{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 NullableSnapshot) 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 *NullableSnapshot) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_snapshot_list_response.go b/services/iaas/model_snapshot_list_response.go deleted file mode 100644 index af0d3cc229..0000000000 --- a/services/iaas/model_snapshot_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the SnapshotListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SnapshotListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotListResponseGetItemsAttributeType = *[]Snapshot - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotListResponseGetItemsArgType = []Snapshot - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotListResponseGetItemsRetType = []Snapshot - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSnapshotListResponseGetItemsAttributeTypeOk(arg SnapshotListResponseGetItemsAttributeType) (ret SnapshotListResponseGetItemsRetType, 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 setSnapshotListResponseGetItemsAttributeType(arg *SnapshotListResponseGetItemsAttributeType, val SnapshotListResponseGetItemsRetType) { - *arg = &val -} - -// SnapshotListResponse Snapshot list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SnapshotListResponse struct { - // A list containing snapshot objects. - // REQUIRED - Items SnapshotListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _SnapshotListResponse SnapshotListResponse - -// NewSnapshotListResponse instantiates a new SnapshotListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSnapshotListResponse(items SnapshotListResponseGetItemsArgType) *SnapshotListResponse { - this := SnapshotListResponse{} - setSnapshotListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewSnapshotListResponseWithDefaults instantiates a new SnapshotListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewSnapshotListResponseWithDefaults() *SnapshotListResponse { - this := SnapshotListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SnapshotListResponse) GetItems() (ret SnapshotListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *SnapshotListResponse) GetItemsOk() (ret SnapshotListResponseGetItemsRetType, ok bool) { - return getSnapshotListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SnapshotListResponse) SetItems(v SnapshotListResponseGetItemsRetType) { - setSnapshotListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SnapshotListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSnapshotListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSnapshotListResponse struct { - value *SnapshotListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSnapshotListResponse) Get() *SnapshotListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSnapshotListResponse) Set(val *SnapshotListResponse) { - 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 NullableSnapshotListResponse) 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 *NullableSnapshotListResponse) 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 NewNullableSnapshotListResponse(val *SnapshotListResponse) *NullableSnapshotListResponse { - return &NullableSnapshotListResponse{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 NullableSnapshotListResponse) 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 *NullableSnapshotListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_snapshot_list_response_test.go b/services/iaas/model_snapshot_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_snapshot_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_snapshot_test.go b/services/iaas/model_snapshot_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_snapshot_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_static_area_id.go b/services/iaas/model_static_area_id.go deleted file mode 100644 index ed6690e85c..0000000000 --- a/services/iaas/model_static_area_id.go +++ /dev/null @@ -1,132 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "fmt" -) - -// StaticAreaID The identifier (ID) of a static area. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StaticAreaID string - -// List of StaticAreaID -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - STATICAREAID_PUBLIC StaticAreaID = "PUBLIC" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - STATICAREAID_SCHWARZ StaticAreaID = "SCHWARZ" -) - -// All allowed values of StaticAreaID enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedStaticAreaIDEnumValues = []StaticAreaID{ - "PUBLIC", - "SCHWARZ", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *StaticAreaID) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := StaticAreaID(value) - for _, existing := range AllowedStaticAreaIDEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid StaticAreaID", value) -} - -// NewStaticAreaIDFromValue returns a pointer to a valid StaticAreaID -// 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 NewStaticAreaIDFromValue(v string) (*StaticAreaID, error) { - ev := StaticAreaID(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for StaticAreaID: valid values are %v", v, AllowedStaticAreaIDEnumValues) - } -} - -// 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 StaticAreaID) IsValid() bool { - for _, existing := range AllowedStaticAreaIDEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StaticAreaID value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v StaticAreaID) Ptr() *StaticAreaID { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableStaticAreaID struct { - value *StaticAreaID - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStaticAreaID) Get() *StaticAreaID { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStaticAreaID) Set(val *StaticAreaID) { - 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 NullableStaticAreaID) 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 *NullableStaticAreaID) 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 NewNullableStaticAreaID(val *StaticAreaID) *NullableStaticAreaID { - return &NullableStaticAreaID{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 NullableStaticAreaID) 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 *NullableStaticAreaID) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_static_area_id_test.go b/services/iaas/model_static_area_id_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_static_area_id_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_attached_volume_payload.go b/services/iaas/model_update_attached_volume_payload.go deleted file mode 100644 index 6952b8f572..0000000000 --- a/services/iaas/model_update_attached_volume_payload.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateAttachedVolumePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateAttachedVolumePayload{} - -/* - types and functions for deleteOnTermination -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadgetDeleteOnTerminationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeTypeOk(arg UpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType) (ret UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType, 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 setUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType(arg *UpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType, val UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType) { - *arg = &val -} - -/* - types and functions for serverId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadGetServerIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateAttachedVolumePayloadGetServerIdAttributeTypeOk(arg UpdateAttachedVolumePayloadGetServerIdAttributeType) (ret UpdateAttachedVolumePayloadGetServerIdRetType, 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 setUpdateAttachedVolumePayloadGetServerIdAttributeType(arg *UpdateAttachedVolumePayloadGetServerIdAttributeType, val UpdateAttachedVolumePayloadGetServerIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadGetServerIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadGetServerIdRetType = string - -/* - types and functions for volumeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadGetVolumeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateAttachedVolumePayloadGetVolumeIdAttributeTypeOk(arg UpdateAttachedVolumePayloadGetVolumeIdAttributeType) (ret UpdateAttachedVolumePayloadGetVolumeIdRetType, 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 setUpdateAttachedVolumePayloadGetVolumeIdAttributeType(arg *UpdateAttachedVolumePayloadGetVolumeIdAttributeType, val UpdateAttachedVolumePayloadGetVolumeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadGetVolumeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayloadGetVolumeIdRetType = string - -// UpdateAttachedVolumePayload Object that represents a Volume attachment to a server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateAttachedVolumePayload struct { - // Delete the volume during the termination of the server. Defaults to false. - DeleteOnTermination UpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType `json:"deleteOnTermination,omitempty"` - // Universally Unique Identifier (UUID). - ServerId UpdateAttachedVolumePayloadGetServerIdAttributeType `json:"serverId,omitempty"` - // Universally Unique Identifier (UUID). - VolumeId UpdateAttachedVolumePayloadGetVolumeIdAttributeType `json:"volumeId,omitempty"` -} - -// NewUpdateAttachedVolumePayload instantiates a new UpdateAttachedVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateAttachedVolumePayload() *UpdateAttachedVolumePayload { - this := UpdateAttachedVolumePayload{} - return &this -} - -// NewUpdateAttachedVolumePayloadWithDefaults instantiates a new UpdateAttachedVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateAttachedVolumePayloadWithDefaults() *UpdateAttachedVolumePayload { - this := UpdateAttachedVolumePayload{} - return &this -} - -// GetDeleteOnTermination returns the DeleteOnTermination 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 *UpdateAttachedVolumePayload) GetDeleteOnTermination() (res UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType) { - res, _ = o.GetDeleteOnTerminationOk() - return -} - -// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination 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 *UpdateAttachedVolumePayload) GetDeleteOnTerminationOk() (ret UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType, ok bool) { - return getUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination) -} - -// HasDeleteOnTermination 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 *UpdateAttachedVolumePayload) HasDeleteOnTermination() bool { - _, ok := o.GetDeleteOnTerminationOk() - return ok -} - -// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateAttachedVolumePayload) SetDeleteOnTermination(v UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType) { - setUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType(&o.DeleteOnTermination, v) -} - -// GetServerId returns the ServerId 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 *UpdateAttachedVolumePayload) GetServerId() (res UpdateAttachedVolumePayloadGetServerIdRetType) { - res, _ = o.GetServerIdOk() - return -} - -// GetServerIdOk returns a tuple with the ServerId 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 *UpdateAttachedVolumePayload) GetServerIdOk() (ret UpdateAttachedVolumePayloadGetServerIdRetType, ok bool) { - return getUpdateAttachedVolumePayloadGetServerIdAttributeTypeOk(o.ServerId) -} - -// HasServerId 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 *UpdateAttachedVolumePayload) HasServerId() bool { - _, ok := o.GetServerIdOk() - return ok -} - -// SetServerId gets a reference to the given string and assigns it to the ServerId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateAttachedVolumePayload) SetServerId(v UpdateAttachedVolumePayloadGetServerIdRetType) { - setUpdateAttachedVolumePayloadGetServerIdAttributeType(&o.ServerId, v) -} - -// GetVolumeId returns the VolumeId 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 *UpdateAttachedVolumePayload) GetVolumeId() (res UpdateAttachedVolumePayloadGetVolumeIdRetType) { - res, _ = o.GetVolumeIdOk() - return -} - -// GetVolumeIdOk returns a tuple with the VolumeId 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 *UpdateAttachedVolumePayload) GetVolumeIdOk() (ret UpdateAttachedVolumePayloadGetVolumeIdRetType, ok bool) { - return getUpdateAttachedVolumePayloadGetVolumeIdAttributeTypeOk(o.VolumeId) -} - -// HasVolumeId 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 *UpdateAttachedVolumePayload) HasVolumeId() bool { - _, ok := o.GetVolumeIdOk() - return ok -} - -// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateAttachedVolumePayload) SetVolumeId(v UpdateAttachedVolumePayloadGetVolumeIdRetType) { - setUpdateAttachedVolumePayloadGetVolumeIdAttributeType(&o.VolumeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateAttachedVolumePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination); ok { - toSerialize["DeleteOnTermination"] = val - } - if val, ok := getUpdateAttachedVolumePayloadGetServerIdAttributeTypeOk(o.ServerId); ok { - toSerialize["ServerId"] = val - } - if val, ok := getUpdateAttachedVolumePayloadGetVolumeIdAttributeTypeOk(o.VolumeId); ok { - toSerialize["VolumeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateAttachedVolumePayload struct { - value *UpdateAttachedVolumePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateAttachedVolumePayload) Get() *UpdateAttachedVolumePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateAttachedVolumePayload) Set(val *UpdateAttachedVolumePayload) { - 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 NullableUpdateAttachedVolumePayload) 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 *NullableUpdateAttachedVolumePayload) 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 NewNullableUpdateAttachedVolumePayload(val *UpdateAttachedVolumePayload) *NullableUpdateAttachedVolumePayload { - return &NullableUpdateAttachedVolumePayload{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 NullableUpdateAttachedVolumePayload) 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 *NullableUpdateAttachedVolumePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_attached_volume_payload_test.go b/services/iaas/model_update_attached_volume_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_attached_volume_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_backup_payload.go b/services/iaas/model_update_backup_payload.go deleted file mode 100644 index 7fe251b611..0000000000 --- a/services/iaas/model_update_backup_payload.go +++ /dev/null @@ -1,802 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the UpdateBackupPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateBackupPayload{} - -/* - types and functions for availabilityZone -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetAvailabilityZoneAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetAvailabilityZoneAttributeTypeOk(arg UpdateBackupPayloadGetAvailabilityZoneAttributeType) (ret UpdateBackupPayloadGetAvailabilityZoneRetType, 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 setUpdateBackupPayloadGetAvailabilityZoneAttributeType(arg *UpdateBackupPayloadGetAvailabilityZoneAttributeType, val UpdateBackupPayloadGetAvailabilityZoneRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetAvailabilityZoneArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetAvailabilityZoneRetType = string - -/* - 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 UpdateBackupPayloadGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetCreatedAtAttributeTypeOk(arg UpdateBackupPayloadGetCreatedAtAttributeType) (ret UpdateBackupPayloadGetCreatedAtRetType, 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 setUpdateBackupPayloadGetCreatedAtAttributeType(arg *UpdateBackupPayloadGetCreatedAtAttributeType, val UpdateBackupPayloadGetCreatedAtRetType) { - *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 UpdateBackupPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetDescriptionAttributeTypeOk(arg UpdateBackupPayloadGetDescriptionAttributeType) (ret UpdateBackupPayloadGetDescriptionRetType, 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 setUpdateBackupPayloadGetDescriptionAttributeType(arg *UpdateBackupPayloadGetDescriptionAttributeType, val UpdateBackupPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetDescriptionRetType = string - -/* - types and functions for encrypted -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadgetEncryptedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadgetEncryptedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadgetEncryptedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadgetEncryptedAttributeTypeOk(arg UpdateBackupPayloadgetEncryptedAttributeType) (ret UpdateBackupPayloadgetEncryptedRetType, 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 setUpdateBackupPayloadgetEncryptedAttributeType(arg *UpdateBackupPayloadgetEncryptedAttributeType, val UpdateBackupPayloadgetEncryptedRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetIdAttributeTypeOk(arg UpdateBackupPayloadGetIdAttributeType) (ret UpdateBackupPayloadGetIdRetType, 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 setUpdateBackupPayloadGetIdAttributeType(arg *UpdateBackupPayloadGetIdAttributeType, val UpdateBackupPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetIdRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetLabelsAttributeTypeOk(arg UpdateBackupPayloadGetLabelsAttributeType) (ret UpdateBackupPayloadGetLabelsRetType, 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 setUpdateBackupPayloadGetLabelsAttributeType(arg *UpdateBackupPayloadGetLabelsAttributeType, val UpdateBackupPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetNameAttributeTypeOk(arg UpdateBackupPayloadGetNameAttributeType) (ret UpdateBackupPayloadGetNameRetType, 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 setUpdateBackupPayloadGetNameAttributeType(arg *UpdateBackupPayloadGetNameAttributeType, val UpdateBackupPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetNameRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetSizeAttributeTypeOk(arg UpdateBackupPayloadGetSizeAttributeType) (ret UpdateBackupPayloadGetSizeRetType, 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 setUpdateBackupPayloadGetSizeAttributeType(arg *UpdateBackupPayloadGetSizeAttributeType, val UpdateBackupPayloadGetSizeRetType) { - *arg = &val -} - -/* - types and functions for snapshotId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetSnapshotIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetSnapshotIdAttributeTypeOk(arg UpdateBackupPayloadGetSnapshotIdAttributeType) (ret UpdateBackupPayloadGetSnapshotIdRetType, 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 setUpdateBackupPayloadGetSnapshotIdAttributeType(arg *UpdateBackupPayloadGetSnapshotIdAttributeType, val UpdateBackupPayloadGetSnapshotIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetSnapshotIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetSnapshotIdRetType = string - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetStatusAttributeTypeOk(arg UpdateBackupPayloadGetStatusAttributeType) (ret UpdateBackupPayloadGetStatusRetType, 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 setUpdateBackupPayloadGetStatusAttributeType(arg *UpdateBackupPayloadGetStatusAttributeType, val UpdateBackupPayloadGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetStatusRetType = 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 UpdateBackupPayloadGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetUpdatedAtAttributeTypeOk(arg UpdateBackupPayloadGetUpdatedAtAttributeType) (ret UpdateBackupPayloadGetUpdatedAtRetType, 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 setUpdateBackupPayloadGetUpdatedAtAttributeType(arg *UpdateBackupPayloadGetUpdatedAtAttributeType, val UpdateBackupPayloadGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for volumeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetVolumeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateBackupPayloadGetVolumeIdAttributeTypeOk(arg UpdateBackupPayloadGetVolumeIdAttributeType) (ret UpdateBackupPayloadGetVolumeIdRetType, 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 setUpdateBackupPayloadGetVolumeIdAttributeType(arg *UpdateBackupPayloadGetVolumeIdAttributeType, val UpdateBackupPayloadGetVolumeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetVolumeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayloadGetVolumeIdRetType = string - -// UpdateBackupPayload Object that represents a backup. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateBackupPayload struct { - // Object that represents an availability zone. - AvailabilityZone UpdateBackupPayloadGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` - // Date-time when resource was created. - CreatedAt UpdateBackupPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description UpdateBackupPayloadGetDescriptionAttributeType `json:"description,omitempty"` - // Indicates if a volume is encrypted. - 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. - Labels UpdateBackupPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name UpdateBackupPayloadGetNameAttributeType `json:"name,omitempty"` - // Size in Gigabyte. - Size UpdateBackupPayloadGetSizeAttributeType `json:"size,omitempty"` - // Universally Unique Identifier (UUID). - SnapshotId UpdateBackupPayloadGetSnapshotIdAttributeType `json:"snapshotId,omitempty"` - // The status of a backup object. Possible values: `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`. - Status UpdateBackupPayloadGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt UpdateBackupPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` - // Universally Unique Identifier (UUID). - VolumeId UpdateBackupPayloadGetVolumeIdAttributeType `json:"volumeId,omitempty"` -} - -// NewUpdateBackupPayload instantiates a new UpdateBackupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateBackupPayload() *UpdateBackupPayload { - this := UpdateBackupPayload{} - return &this -} - -// NewUpdateBackupPayloadWithDefaults instantiates a new UpdateBackupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateBackupPayloadWithDefaults() *UpdateBackupPayload { - this := UpdateBackupPayload{} - return &this -} - -// GetAvailabilityZone returns the AvailabilityZone 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 *UpdateBackupPayload) GetAvailabilityZone() (res UpdateBackupPayloadGetAvailabilityZoneRetType) { - res, _ = o.GetAvailabilityZoneOk() - return -} - -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone 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 *UpdateBackupPayload) GetAvailabilityZoneOk() (ret UpdateBackupPayloadGetAvailabilityZoneRetType, ok bool) { - return getUpdateBackupPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) -} - -// HasAvailabilityZone 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 *UpdateBackupPayload) HasAvailabilityZone() bool { - _, ok := o.GetAvailabilityZoneOk() - return ok -} - -// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetAvailabilityZone(v UpdateBackupPayloadGetAvailabilityZoneRetType) { - setUpdateBackupPayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, 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 *UpdateBackupPayload) GetCreatedAt() (res UpdateBackupPayloadGetCreatedAtRetType) { - 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 *UpdateBackupPayload) GetCreatedAtOk() (ret UpdateBackupPayloadGetCreatedAtRetType, ok bool) { - return getUpdateBackupPayloadGetCreatedAtAttributeTypeOk(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 *UpdateBackupPayload) 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 *UpdateBackupPayload) SetCreatedAt(v UpdateBackupPayloadGetCreatedAtRetType) { - setUpdateBackupPayloadGetCreatedAtAttributeType(&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 *UpdateBackupPayload) GetDescription() (res UpdateBackupPayloadGetDescriptionRetType) { - 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 *UpdateBackupPayload) GetDescriptionOk() (ret UpdateBackupPayloadGetDescriptionRetType, ok bool) { - return getUpdateBackupPayloadGetDescriptionAttributeTypeOk(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 *UpdateBackupPayload) 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 *UpdateBackupPayload) SetDescription(v UpdateBackupPayloadGetDescriptionRetType) { - setUpdateBackupPayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetEncrypted returns the Encrypted 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 *UpdateBackupPayload) GetEncrypted() (res UpdateBackupPayloadgetEncryptedRetType) { - res, _ = o.GetEncryptedOk() - return -} - -// GetEncryptedOk returns a tuple with the Encrypted 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 *UpdateBackupPayload) GetEncryptedOk() (ret UpdateBackupPayloadgetEncryptedRetType, ok bool) { - return getUpdateBackupPayloadgetEncryptedAttributeTypeOk(o.Encrypted) -} - -// HasEncrypted 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 *UpdateBackupPayload) HasEncrypted() bool { - _, ok := o.GetEncryptedOk() - return ok -} - -// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetEncrypted(v UpdateBackupPayloadgetEncryptedRetType) { - setUpdateBackupPayloadgetEncryptedAttributeType(&o.Encrypted, 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 *UpdateBackupPayload) GetId() (res UpdateBackupPayloadGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *UpdateBackupPayload) GetIdOk() (ret UpdateBackupPayloadGetIdRetType, ok bool) { - return getUpdateBackupPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *UpdateBackupPayload) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetId(v UpdateBackupPayloadGetIdRetType) { - setUpdateBackupPayloadGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) GetLabels() (res UpdateBackupPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) GetLabelsOk() (ret UpdateBackupPayloadGetLabelsRetType, ok bool) { - return getUpdateBackupPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetLabels(v UpdateBackupPayloadGetLabelsRetType) { - setUpdateBackupPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) GetName() (res UpdateBackupPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *UpdateBackupPayload) GetNameOk() (ret UpdateBackupPayloadGetNameRetType, ok bool) { - return getUpdateBackupPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *UpdateBackupPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetName(v UpdateBackupPayloadGetNameRetType) { - setUpdateBackupPayloadGetNameAttributeType(&o.Name, v) -} - -// GetSize returns the Size 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 *UpdateBackupPayload) GetSize() (res UpdateBackupPayloadGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *UpdateBackupPayload) GetSizeOk() (ret UpdateBackupPayloadGetSizeRetType, ok bool) { - return getUpdateBackupPayloadGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *UpdateBackupPayload) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetSize(v UpdateBackupPayloadGetSizeRetType) { - setUpdateBackupPayloadGetSizeAttributeType(&o.Size, v) -} - -// GetSnapshotId returns the SnapshotId 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 *UpdateBackupPayload) GetSnapshotId() (res UpdateBackupPayloadGetSnapshotIdRetType) { - res, _ = o.GetSnapshotIdOk() - return -} - -// GetSnapshotIdOk returns a tuple with the SnapshotId 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 *UpdateBackupPayload) GetSnapshotIdOk() (ret UpdateBackupPayloadGetSnapshotIdRetType, ok bool) { - return getUpdateBackupPayloadGetSnapshotIdAttributeTypeOk(o.SnapshotId) -} - -// HasSnapshotId 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 *UpdateBackupPayload) HasSnapshotId() bool { - _, ok := o.GetSnapshotIdOk() - return ok -} - -// SetSnapshotId gets a reference to the given string and assigns it to the SnapshotId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetSnapshotId(v UpdateBackupPayloadGetSnapshotIdRetType) { - setUpdateBackupPayloadGetSnapshotIdAttributeType(&o.SnapshotId, v) -} - -// GetStatus returns the Status 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 *UpdateBackupPayload) GetStatus() (res UpdateBackupPayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *UpdateBackupPayload) GetStatusOk() (ret UpdateBackupPayloadGetStatusRetType, ok bool) { - return getUpdateBackupPayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *UpdateBackupPayload) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetStatus(v UpdateBackupPayloadGetStatusRetType) { - setUpdateBackupPayloadGetStatusAttributeType(&o.Status, 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 *UpdateBackupPayload) GetUpdatedAt() (res UpdateBackupPayloadGetUpdatedAtRetType) { - 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 *UpdateBackupPayload) GetUpdatedAtOk() (ret UpdateBackupPayloadGetUpdatedAtRetType, ok bool) { - return getUpdateBackupPayloadGetUpdatedAtAttributeTypeOk(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 *UpdateBackupPayload) 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 *UpdateBackupPayload) SetUpdatedAt(v UpdateBackupPayloadGetUpdatedAtRetType) { - setUpdateBackupPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetVolumeId returns the VolumeId 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 *UpdateBackupPayload) GetVolumeId() (res UpdateBackupPayloadGetVolumeIdRetType) { - res, _ = o.GetVolumeIdOk() - return -} - -// GetVolumeIdOk returns a tuple with the VolumeId 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 *UpdateBackupPayload) GetVolumeIdOk() (ret UpdateBackupPayloadGetVolumeIdRetType, ok bool) { - return getUpdateBackupPayloadGetVolumeIdAttributeTypeOk(o.VolumeId) -} - -// HasVolumeId 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 *UpdateBackupPayload) HasVolumeId() bool { - _, ok := o.GetVolumeIdOk() - return ok -} - -// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateBackupPayload) SetVolumeId(v UpdateBackupPayloadGetVolumeIdRetType) { - setUpdateBackupPayloadGetVolumeIdAttributeType(&o.VolumeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateBackupPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateBackupPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { - toSerialize["AvailabilityZone"] = val - } - if val, ok := getUpdateBackupPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getUpdateBackupPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getUpdateBackupPayloadgetEncryptedAttributeTypeOk(o.Encrypted); ok { - toSerialize["Encrypted"] = val - } - if val, ok := getUpdateBackupPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getUpdateBackupPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateBackupPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getUpdateBackupPayloadGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getUpdateBackupPayloadGetSnapshotIdAttributeTypeOk(o.SnapshotId); ok { - toSerialize["SnapshotId"] = val - } - if val, ok := getUpdateBackupPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getUpdateBackupPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getUpdateBackupPayloadGetVolumeIdAttributeTypeOk(o.VolumeId); ok { - toSerialize["VolumeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateBackupPayload struct { - value *UpdateBackupPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateBackupPayload) Get() *UpdateBackupPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateBackupPayload) Set(val *UpdateBackupPayload) { - 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 NullableUpdateBackupPayload) 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 *NullableUpdateBackupPayload) 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 NewNullableUpdateBackupPayload(val *UpdateBackupPayload) *NullableUpdateBackupPayload { - return &NullableUpdateBackupPayload{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 NullableUpdateBackupPayload) 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 *NullableUpdateBackupPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_backup_payload_test.go b/services/iaas/model_update_backup_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_backup_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_image_payload.go b/services/iaas/model_update_image_payload.go deleted file mode 100644 index cb6ef3732d..0000000000 --- a/services/iaas/model_update_image_payload.go +++ /dev/null @@ -1,563 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateImagePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateImagePayload{} - -/* - types and functions for agent -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetAgentAttributeType = *ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetAgentArgType = ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetAgentRetType = ImageAgent - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImagePayloadGetAgentAttributeTypeOk(arg UpdateImagePayloadGetAgentAttributeType) (ret UpdateImagePayloadGetAgentRetType, 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 setUpdateImagePayloadGetAgentAttributeType(arg *UpdateImagePayloadGetAgentAttributeType, val UpdateImagePayloadGetAgentRetType) { - *arg = &val -} - -/* - types and functions for config -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetConfigAttributeType = *ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetConfigArgType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetConfigRetType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImagePayloadGetConfigAttributeTypeOk(arg UpdateImagePayloadGetConfigAttributeType) (ret UpdateImagePayloadGetConfigRetType, 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 setUpdateImagePayloadGetConfigAttributeType(arg *UpdateImagePayloadGetConfigAttributeType, val UpdateImagePayloadGetConfigRetType) { - *arg = &val -} - -/* - types and functions for diskFormat -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetDiskFormatAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImagePayloadGetDiskFormatAttributeTypeOk(arg UpdateImagePayloadGetDiskFormatAttributeType) (ret UpdateImagePayloadGetDiskFormatRetType, 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 setUpdateImagePayloadGetDiskFormatAttributeType(arg *UpdateImagePayloadGetDiskFormatAttributeType, val UpdateImagePayloadGetDiskFormatRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetDiskFormatArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetDiskFormatRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImagePayloadGetLabelsAttributeTypeOk(arg UpdateImagePayloadGetLabelsAttributeType) (ret UpdateImagePayloadGetLabelsRetType, 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 setUpdateImagePayloadGetLabelsAttributeType(arg *UpdateImagePayloadGetLabelsAttributeType, val UpdateImagePayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for minDiskSize -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetMinDiskSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetMinDiskSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetMinDiskSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImagePayloadGetMinDiskSizeAttributeTypeOk(arg UpdateImagePayloadGetMinDiskSizeAttributeType) (ret UpdateImagePayloadGetMinDiskSizeRetType, 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 setUpdateImagePayloadGetMinDiskSizeAttributeType(arg *UpdateImagePayloadGetMinDiskSizeAttributeType, val UpdateImagePayloadGetMinDiskSizeRetType) { - *arg = &val -} - -/* - types and functions for minRam -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetMinRamAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetMinRamArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetMinRamRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImagePayloadGetMinRamAttributeTypeOk(arg UpdateImagePayloadGetMinRamAttributeType) (ret UpdateImagePayloadGetMinRamRetType, 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 setUpdateImagePayloadGetMinRamAttributeType(arg *UpdateImagePayloadGetMinRamAttributeType, val UpdateImagePayloadGetMinRamRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImagePayloadGetNameAttributeTypeOk(arg UpdateImagePayloadGetNameAttributeType) (ret UpdateImagePayloadGetNameRetType, 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 setUpdateImagePayloadGetNameAttributeType(arg *UpdateImagePayloadGetNameAttributeType, val UpdateImagePayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadGetNameRetType = string - -/* - types and functions for protected -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadgetProtectedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadgetProtectedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayloadgetProtectedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImagePayloadgetProtectedAttributeTypeOk(arg UpdateImagePayloadgetProtectedAttributeType) (ret UpdateImagePayloadgetProtectedRetType, 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 setUpdateImagePayloadgetProtectedAttributeType(arg *UpdateImagePayloadgetProtectedAttributeType, val UpdateImagePayloadgetProtectedRetType) { - *arg = &val -} - -// UpdateImagePayload Object that represents an update request body of an Image. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImagePayload struct { - Agent UpdateImagePayloadGetAgentAttributeType `json:"agent,omitempty"` - 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. - Labels UpdateImagePayloadGetLabelsAttributeType `json:"labels,omitempty"` - // Size in Gigabyte. - MinDiskSize UpdateImagePayloadGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"` - // Size in Megabyte. - MinRam UpdateImagePayloadGetMinRamAttributeType `json:"minRam,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name UpdateImagePayloadGetNameAttributeType `json:"name,omitempty"` - // When true the image is prevented from being deleted. - Protected UpdateImagePayloadgetProtectedAttributeType `json:"protected,omitempty"` -} - -// NewUpdateImagePayload instantiates a new UpdateImagePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateImagePayload() *UpdateImagePayload { - this := UpdateImagePayload{} - return &this -} - -// NewUpdateImagePayloadWithDefaults instantiates a new UpdateImagePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateImagePayloadWithDefaults() *UpdateImagePayload { - this := UpdateImagePayload{} - return &this -} - -// GetAgent returns the Agent 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 *UpdateImagePayload) GetAgent() (res UpdateImagePayloadGetAgentRetType) { - res, _ = o.GetAgentOk() - return -} - -// GetAgentOk returns a tuple with the Agent 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 *UpdateImagePayload) GetAgentOk() (ret UpdateImagePayloadGetAgentRetType, ok bool) { - return getUpdateImagePayloadGetAgentAttributeTypeOk(o.Agent) -} - -// HasAgent 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 *UpdateImagePayload) HasAgent() bool { - _, ok := o.GetAgentOk() - return ok -} - -// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) SetAgent(v UpdateImagePayloadGetAgentRetType) { - setUpdateImagePayloadGetAgentAttributeType(&o.Agent, v) -} - -// GetConfig returns the Config 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 *UpdateImagePayload) GetConfig() (res UpdateImagePayloadGetConfigRetType) { - res, _ = o.GetConfigOk() - return -} - -// GetConfigOk returns a tuple with the Config 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 *UpdateImagePayload) GetConfigOk() (ret UpdateImagePayloadGetConfigRetType, ok bool) { - return getUpdateImagePayloadGetConfigAttributeTypeOk(o.Config) -} - -// HasConfig 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 *UpdateImagePayload) HasConfig() bool { - _, ok := o.GetConfigOk() - return ok -} - -// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) SetConfig(v UpdateImagePayloadGetConfigRetType) { - setUpdateImagePayloadGetConfigAttributeType(&o.Config, v) -} - -// GetDiskFormat returns the DiskFormat 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 *UpdateImagePayload) GetDiskFormat() (res UpdateImagePayloadGetDiskFormatRetType) { - res, _ = o.GetDiskFormatOk() - return -} - -// GetDiskFormatOk returns a tuple with the DiskFormat 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 *UpdateImagePayload) GetDiskFormatOk() (ret UpdateImagePayloadGetDiskFormatRetType, ok bool) { - return getUpdateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat) -} - -// HasDiskFormat 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 *UpdateImagePayload) HasDiskFormat() bool { - _, ok := o.GetDiskFormatOk() - return ok -} - -// SetDiskFormat gets a reference to the given string and assigns it to the DiskFormat field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) SetDiskFormat(v UpdateImagePayloadGetDiskFormatRetType) { - setUpdateImagePayloadGetDiskFormatAttributeType(&o.DiskFormat, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) GetLabels() (res UpdateImagePayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) GetLabelsOk() (ret UpdateImagePayloadGetLabelsRetType, ok bool) { - return getUpdateImagePayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) SetLabels(v UpdateImagePayloadGetLabelsRetType) { - setUpdateImagePayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetMinDiskSize returns the MinDiskSize 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 *UpdateImagePayload) GetMinDiskSize() (res UpdateImagePayloadGetMinDiskSizeRetType) { - res, _ = o.GetMinDiskSizeOk() - return -} - -// GetMinDiskSizeOk returns a tuple with the MinDiskSize 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 *UpdateImagePayload) GetMinDiskSizeOk() (ret UpdateImagePayloadGetMinDiskSizeRetType, ok bool) { - return getUpdateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize) -} - -// HasMinDiskSize 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 *UpdateImagePayload) HasMinDiskSize() bool { - _, ok := o.GetMinDiskSizeOk() - return ok -} - -// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) SetMinDiskSize(v UpdateImagePayloadGetMinDiskSizeRetType) { - setUpdateImagePayloadGetMinDiskSizeAttributeType(&o.MinDiskSize, v) -} - -// GetMinRam returns the MinRam 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 *UpdateImagePayload) GetMinRam() (res UpdateImagePayloadGetMinRamRetType) { - res, _ = o.GetMinRamOk() - return -} - -// GetMinRamOk returns a tuple with the MinRam 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 *UpdateImagePayload) GetMinRamOk() (ret UpdateImagePayloadGetMinRamRetType, ok bool) { - return getUpdateImagePayloadGetMinRamAttributeTypeOk(o.MinRam) -} - -// HasMinRam 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 *UpdateImagePayload) HasMinRam() bool { - _, ok := o.GetMinRamOk() - return ok -} - -// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) SetMinRam(v UpdateImagePayloadGetMinRamRetType) { - setUpdateImagePayloadGetMinRamAttributeType(&o.MinRam, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) GetName() (res UpdateImagePayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *UpdateImagePayload) GetNameOk() (ret UpdateImagePayloadGetNameRetType, ok bool) { - return getUpdateImagePayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *UpdateImagePayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) SetName(v UpdateImagePayloadGetNameRetType) { - setUpdateImagePayloadGetNameAttributeType(&o.Name, v) -} - -// GetProtected returns the Protected 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 *UpdateImagePayload) GetProtected() (res UpdateImagePayloadgetProtectedRetType) { - res, _ = o.GetProtectedOk() - return -} - -// GetProtectedOk returns a tuple with the Protected 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 *UpdateImagePayload) GetProtectedOk() (ret UpdateImagePayloadgetProtectedRetType, ok bool) { - return getUpdateImagePayloadgetProtectedAttributeTypeOk(o.Protected) -} - -// HasProtected 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 *UpdateImagePayload) HasProtected() bool { - _, ok := o.GetProtectedOk() - return ok -} - -// SetProtected gets a reference to the given bool and assigns it to the Protected field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImagePayload) SetProtected(v UpdateImagePayloadgetProtectedRetType) { - setUpdateImagePayloadgetProtectedAttributeType(&o.Protected, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateImagePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateImagePayloadGetAgentAttributeTypeOk(o.Agent); ok { - toSerialize["Agent"] = val - } - if val, ok := getUpdateImagePayloadGetConfigAttributeTypeOk(o.Config); ok { - toSerialize["Config"] = val - } - if val, ok := getUpdateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat); ok { - toSerialize["DiskFormat"] = val - } - if val, ok := getUpdateImagePayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok { - toSerialize["MinDiskSize"] = val - } - if val, ok := getUpdateImagePayloadGetMinRamAttributeTypeOk(o.MinRam); ok { - toSerialize["MinRam"] = val - } - if val, ok := getUpdateImagePayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getUpdateImagePayloadgetProtectedAttributeTypeOk(o.Protected); ok { - toSerialize["Protected"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateImagePayload struct { - value *UpdateImagePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateImagePayload) Get() *UpdateImagePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateImagePayload) Set(val *UpdateImagePayload) { - 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 NullableUpdateImagePayload) 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 *NullableUpdateImagePayload) 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 NewNullableUpdateImagePayload(val *UpdateImagePayload) *NullableUpdateImagePayload { - return &NullableUpdateImagePayload{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 NullableUpdateImagePayload) 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 *NullableUpdateImagePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_image_payload_test.go b/services/iaas/model_update_image_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_image_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_image_share_payload.go b/services/iaas/model_update_image_share_payload.go deleted file mode 100644 index a4cddee2e8..0000000000 --- a/services/iaas/model_update_image_share_payload.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateImageSharePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateImageSharePayload{} - -/* - types and functions for parentOrganization -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageSharePayloadgetParentOrganizationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageSharePayloadgetParentOrganizationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageSharePayloadgetParentOrganizationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImageSharePayloadgetParentOrganizationAttributeTypeOk(arg UpdateImageSharePayloadgetParentOrganizationAttributeType) (ret UpdateImageSharePayloadgetParentOrganizationRetType, 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 setUpdateImageSharePayloadgetParentOrganizationAttributeType(arg *UpdateImageSharePayloadgetParentOrganizationAttributeType, val UpdateImageSharePayloadgetParentOrganizationRetType) { - *arg = &val -} - -/* - types and functions for projects -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageSharePayloadGetProjectsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageSharePayloadGetProjectsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageSharePayloadGetProjectsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateImageSharePayloadGetProjectsAttributeTypeOk(arg UpdateImageSharePayloadGetProjectsAttributeType) (ret UpdateImageSharePayloadGetProjectsRetType, 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 setUpdateImageSharePayloadGetProjectsAttributeType(arg *UpdateImageSharePayloadGetProjectsAttributeType, val UpdateImageSharePayloadGetProjectsRetType) { - *arg = &val -} - -// UpdateImageSharePayload Share details of an Image. For requests ParentOrganization and Projects are mutually exclusive. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateImageSharePayload struct { - // Image is shared with all projects inside the image owners organization. - ParentOrganization UpdateImageSharePayloadgetParentOrganizationAttributeType `json:"parentOrganization,omitempty"` - // List of all projects the Image is shared with. - Projects UpdateImageSharePayloadGetProjectsAttributeType `json:"projects,omitempty"` -} - -// NewUpdateImageSharePayload instantiates a new UpdateImageSharePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateImageSharePayload() *UpdateImageSharePayload { - this := UpdateImageSharePayload{} - return &this -} - -// NewUpdateImageSharePayloadWithDefaults instantiates a new UpdateImageSharePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateImageSharePayloadWithDefaults() *UpdateImageSharePayload { - this := UpdateImageSharePayload{} - return &this -} - -// GetParentOrganization returns the ParentOrganization 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 *UpdateImageSharePayload) GetParentOrganization() (res UpdateImageSharePayloadgetParentOrganizationRetType) { - res, _ = o.GetParentOrganizationOk() - return -} - -// GetParentOrganizationOk returns a tuple with the ParentOrganization 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 *UpdateImageSharePayload) GetParentOrganizationOk() (ret UpdateImageSharePayloadgetParentOrganizationRetType, ok bool) { - return getUpdateImageSharePayloadgetParentOrganizationAttributeTypeOk(o.ParentOrganization) -} - -// HasParentOrganization 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 *UpdateImageSharePayload) HasParentOrganization() bool { - _, ok := o.GetParentOrganizationOk() - return ok -} - -// SetParentOrganization gets a reference to the given bool and assigns it to the ParentOrganization field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImageSharePayload) SetParentOrganization(v UpdateImageSharePayloadgetParentOrganizationRetType) { - setUpdateImageSharePayloadgetParentOrganizationAttributeType(&o.ParentOrganization, v) -} - -// GetProjects returns the Projects 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 *UpdateImageSharePayload) GetProjects() (res UpdateImageSharePayloadGetProjectsRetType) { - res, _ = o.GetProjectsOk() - return -} - -// GetProjectsOk returns a tuple with the Projects 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 *UpdateImageSharePayload) GetProjectsOk() (ret UpdateImageSharePayloadGetProjectsRetType, ok bool) { - return getUpdateImageSharePayloadGetProjectsAttributeTypeOk(o.Projects) -} - -// HasProjects 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 *UpdateImageSharePayload) HasProjects() bool { - _, ok := o.GetProjectsOk() - return ok -} - -// SetProjects gets a reference to the given []string and assigns it to the Projects field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateImageSharePayload) SetProjects(v UpdateImageSharePayloadGetProjectsRetType) { - setUpdateImageSharePayloadGetProjectsAttributeType(&o.Projects, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateImageSharePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateImageSharePayloadgetParentOrganizationAttributeTypeOk(o.ParentOrganization); ok { - toSerialize["ParentOrganization"] = val - } - if val, ok := getUpdateImageSharePayloadGetProjectsAttributeTypeOk(o.Projects); ok { - toSerialize["Projects"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateImageSharePayload struct { - value *UpdateImageSharePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateImageSharePayload) Get() *UpdateImageSharePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateImageSharePayload) Set(val *UpdateImageSharePayload) { - 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 NullableUpdateImageSharePayload) 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 *NullableUpdateImageSharePayload) 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 NewNullableUpdateImageSharePayload(val *UpdateImageSharePayload) *NullableUpdateImageSharePayload { - return &NullableUpdateImageSharePayload{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 NullableUpdateImageSharePayload) 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 *NullableUpdateImageSharePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_image_share_payload_test.go b/services/iaas/model_update_image_share_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_image_share_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_key_pair_payload.go b/services/iaas/model_update_key_pair_payload.go deleted file mode 100644 index 1ae3ec2ebb..0000000000 --- a/services/iaas/model_update_key_pair_payload.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateKeyPairPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateKeyPairPayload{} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateKeyPairPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateKeyPairPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateKeyPairPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateKeyPairPayloadGetLabelsAttributeTypeOk(arg UpdateKeyPairPayloadGetLabelsAttributeType) (ret UpdateKeyPairPayloadGetLabelsRetType, 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 setUpdateKeyPairPayloadGetLabelsAttributeType(arg *UpdateKeyPairPayloadGetLabelsAttributeType, val UpdateKeyPairPayloadGetLabelsRetType) { - *arg = &val -} - -// 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. - Labels UpdateKeyPairPayloadGetLabelsAttributeType `json:"labels,omitempty"` -} - -// NewUpdateKeyPairPayload instantiates a new UpdateKeyPairPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateKeyPairPayload() *UpdateKeyPairPayload { - this := UpdateKeyPairPayload{} - return &this -} - -// NewUpdateKeyPairPayloadWithDefaults instantiates a new UpdateKeyPairPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateKeyPairPayloadWithDefaults() *UpdateKeyPairPayload { - this := UpdateKeyPairPayload{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateKeyPairPayload) GetLabels() (res UpdateKeyPairPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateKeyPairPayload) GetLabelsOk() (ret UpdateKeyPairPayloadGetLabelsRetType, ok bool) { - return getUpdateKeyPairPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateKeyPairPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateKeyPairPayload) SetLabels(v UpdateKeyPairPayloadGetLabelsRetType) { - setUpdateKeyPairPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateKeyPairPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateKeyPairPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateKeyPairPayload struct { - value *UpdateKeyPairPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateKeyPairPayload) Get() *UpdateKeyPairPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateKeyPairPayload) Set(val *UpdateKeyPairPayload) { - 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 NullableUpdateKeyPairPayload) 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 *NullableUpdateKeyPairPayload) 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 NewNullableUpdateKeyPairPayload(val *UpdateKeyPairPayload) *NullableUpdateKeyPairPayload { - return &NullableUpdateKeyPairPayload{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 NullableUpdateKeyPairPayload) 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 *NullableUpdateKeyPairPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_key_pair_payload_test.go b/services/iaas/model_update_key_pair_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_key_pair_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_network_area_region_payload.go b/services/iaas/model_update_network_area_region_payload.go deleted file mode 100644 index 815cac99da..0000000000 --- a/services/iaas/model_update_network_area_region_payload.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateNetworkAreaRegionPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateNetworkAreaRegionPayload{} - -/* - types and functions for ipv4 -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRegionPayloadGetIpv4AttributeType = *UpdateRegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRegionPayloadGetIpv4ArgType = UpdateRegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRegionPayloadGetIpv4RetType = UpdateRegionalAreaIPv4 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNetworkAreaRegionPayloadGetIpv4AttributeTypeOk(arg UpdateNetworkAreaRegionPayloadGetIpv4AttributeType) (ret UpdateNetworkAreaRegionPayloadGetIpv4RetType, 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 setUpdateNetworkAreaRegionPayloadGetIpv4AttributeType(arg *UpdateNetworkAreaRegionPayloadGetIpv4AttributeType, val UpdateNetworkAreaRegionPayloadGetIpv4RetType) { - *arg = &val -} - -// UpdateNetworkAreaRegionPayload Object that represents the request body for a regional network area update. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRegionPayload struct { - Ipv4 UpdateNetworkAreaRegionPayloadGetIpv4AttributeType `json:"ipv4,omitempty"` -} - -// NewUpdateNetworkAreaRegionPayload instantiates a new UpdateNetworkAreaRegionPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateNetworkAreaRegionPayload() *UpdateNetworkAreaRegionPayload { - this := UpdateNetworkAreaRegionPayload{} - return &this -} - -// NewUpdateNetworkAreaRegionPayloadWithDefaults instantiates a new UpdateNetworkAreaRegionPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateNetworkAreaRegionPayloadWithDefaults() *UpdateNetworkAreaRegionPayload { - this := UpdateNetworkAreaRegionPayload{} - return &this -} - -// 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 *UpdateNetworkAreaRegionPayload) GetIpv4() (res UpdateNetworkAreaRegionPayloadGetIpv4RetType) { - res, _ = o.GetIpv4Ok() - return -} - -// GetIpv4Ok returns a tuple with the Ipv4 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 *UpdateNetworkAreaRegionPayload) GetIpv4Ok() (ret UpdateNetworkAreaRegionPayloadGetIpv4RetType, ok bool) { - return getUpdateNetworkAreaRegionPayloadGetIpv4AttributeTypeOk(o.Ipv4) -} - -// HasIpv4 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 *UpdateNetworkAreaRegionPayload) HasIpv4() bool { - _, ok := o.GetIpv4Ok() - return ok -} - -// SetIpv4 gets a reference to the given UpdateRegionalAreaIPv4 and assigns it to the Ipv4 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkAreaRegionPayload) SetIpv4(v UpdateNetworkAreaRegionPayloadGetIpv4RetType) { - setUpdateNetworkAreaRegionPayloadGetIpv4AttributeType(&o.Ipv4, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateNetworkAreaRegionPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateNetworkAreaRegionPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { - toSerialize["Ipv4"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateNetworkAreaRegionPayload struct { - value *UpdateNetworkAreaRegionPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateNetworkAreaRegionPayload) Get() *UpdateNetworkAreaRegionPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateNetworkAreaRegionPayload) Set(val *UpdateNetworkAreaRegionPayload) { - 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 NullableUpdateNetworkAreaRegionPayload) 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 *NullableUpdateNetworkAreaRegionPayload) 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 NewNullableUpdateNetworkAreaRegionPayload(val *UpdateNetworkAreaRegionPayload) *NullableUpdateNetworkAreaRegionPayload { - return &NullableUpdateNetworkAreaRegionPayload{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 NullableUpdateNetworkAreaRegionPayload) 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 *NullableUpdateNetworkAreaRegionPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_network_area_region_payload_test.go b/services/iaas/model_update_network_area_region_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_network_area_region_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_network_area_route_payload.go b/services/iaas/model_update_network_area_route_payload.go deleted file mode 100644 index a047754efd..0000000000 --- a/services/iaas/model_update_network_area_route_payload.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateNetworkAreaRoutePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateNetworkAreaRoutePayload{} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRoutePayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRoutePayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkAreaRoutePayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNetworkAreaRoutePayloadGetLabelsAttributeTypeOk(arg UpdateNetworkAreaRoutePayloadGetLabelsAttributeType) (ret UpdateNetworkAreaRoutePayloadGetLabelsRetType, 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 setUpdateNetworkAreaRoutePayloadGetLabelsAttributeType(arg *UpdateNetworkAreaRoutePayloadGetLabelsAttributeType, val UpdateNetworkAreaRoutePayloadGetLabelsRetType) { - *arg = &val -} - -// 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. - Labels UpdateNetworkAreaRoutePayloadGetLabelsAttributeType `json:"labels,omitempty"` -} - -// NewUpdateNetworkAreaRoutePayload instantiates a new UpdateNetworkAreaRoutePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateNetworkAreaRoutePayload() *UpdateNetworkAreaRoutePayload { - this := UpdateNetworkAreaRoutePayload{} - return &this -} - -// NewUpdateNetworkAreaRoutePayloadWithDefaults instantiates a new UpdateNetworkAreaRoutePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateNetworkAreaRoutePayloadWithDefaults() *UpdateNetworkAreaRoutePayload { - this := UpdateNetworkAreaRoutePayload{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkAreaRoutePayload) GetLabels() (res UpdateNetworkAreaRoutePayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkAreaRoutePayload) GetLabelsOk() (ret UpdateNetworkAreaRoutePayloadGetLabelsRetType, ok bool) { - return getUpdateNetworkAreaRoutePayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkAreaRoutePayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkAreaRoutePayload) SetLabels(v UpdateNetworkAreaRoutePayloadGetLabelsRetType) { - setUpdateNetworkAreaRoutePayloadGetLabelsAttributeType(&o.Labels, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateNetworkAreaRoutePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateNetworkAreaRoutePayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateNetworkAreaRoutePayload struct { - value *UpdateNetworkAreaRoutePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateNetworkAreaRoutePayload) Get() *UpdateNetworkAreaRoutePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateNetworkAreaRoutePayload) Set(val *UpdateNetworkAreaRoutePayload) { - 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 NullableUpdateNetworkAreaRoutePayload) 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 *NullableUpdateNetworkAreaRoutePayload) 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 NewNullableUpdateNetworkAreaRoutePayload(val *UpdateNetworkAreaRoutePayload) *NullableUpdateNetworkAreaRoutePayload { - return &NullableUpdateNetworkAreaRoutePayload{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 NullableUpdateNetworkAreaRoutePayload) 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 *NullableUpdateNetworkAreaRoutePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_network_area_route_payload_test.go b/services/iaas/model_update_network_area_route_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_network_area_route_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_network_ipv4_body.go b/services/iaas/model_update_network_ipv4_body.go deleted file mode 100644 index ea10a86fe3..0000000000 --- a/services/iaas/model_update_network_ipv4_body.go +++ /dev/null @@ -1,228 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateNetworkIPv4Body type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateNetworkIPv4Body{} - -/* - types and functions for gateway -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv4BodyGetGatewayAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNetworkIPv4BodyGetGatewayAttributeTypeOk(arg UpdateNetworkIPv4BodyGetGatewayAttributeType) (ret UpdateNetworkIPv4BodyGetGatewayRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateNetworkIPv4BodyGetGatewayAttributeType(arg *UpdateNetworkIPv4BodyGetGatewayAttributeType, val UpdateNetworkIPv4BodyGetGatewayRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv4BodyGetGatewayArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv4BodyGetGatewayRetType = *string - -/* - types and functions for nameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv4BodyGetNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv4BodyGetNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv4BodyGetNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNetworkIPv4BodyGetNameserversAttributeTypeOk(arg UpdateNetworkIPv4BodyGetNameserversAttributeType) (ret UpdateNetworkIPv4BodyGetNameserversRetType, 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 setUpdateNetworkIPv4BodyGetNameserversAttributeType(arg *UpdateNetworkIPv4BodyGetNameserversAttributeType, val UpdateNetworkIPv4BodyGetNameserversRetType) { - *arg = &val -} - -// UpdateNetworkIPv4Body The config object for a IPv4 network update. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 UpdateNetworkIPv4BodyGetGatewayAttributeType `json:"gateway,omitempty"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers UpdateNetworkIPv4BodyGetNameserversAttributeType `json:"nameservers,omitempty"` -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv4Body) GetGateway() (res UpdateNetworkIPv4BodyGetGatewayRetType) { - res, _ = o.GetGatewayOk() - return -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv4Body) GetGatewayOk() (ret UpdateNetworkIPv4BodyGetGatewayRetType, ok bool) { - return getUpdateNetworkIPv4BodyGetGatewayAttributeTypeOk(o.Gateway) -} - -// HasGateway 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 *UpdateNetworkIPv4Body) HasGateway() bool { - _, ok := o.GetGatewayOk() - return ok -} - -// SetGateway gets a reference to the given string and assigns it to the Gateway field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv4Body) SetGateway(v UpdateNetworkIPv4BodyGetGatewayRetType) { - setUpdateNetworkIPv4BodyGetGatewayAttributeType(&o.Gateway, v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv4Body) SetGatewayNil() { - o.Gateway = nil -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv4Body) UnsetGateway() { - o.Gateway = nil -} - -// GetNameservers returns the Nameservers 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 *UpdateNetworkIPv4Body) GetNameservers() (res UpdateNetworkIPv4BodyGetNameserversRetType) { - res, _ = o.GetNameserversOk() - return -} - -// GetNameserversOk returns a tuple with the Nameservers 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 *UpdateNetworkIPv4Body) GetNameserversOk() (ret UpdateNetworkIPv4BodyGetNameserversRetType, ok bool) { - return getUpdateNetworkIPv4BodyGetNameserversAttributeTypeOk(o.Nameservers) -} - -// HasNameservers 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 *UpdateNetworkIPv4Body) HasNameservers() bool { - _, ok := o.GetNameserversOk() - return ok -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv4Body) SetNameservers(v UpdateNetworkIPv4BodyGetNameserversRetType) { - setUpdateNetworkIPv4BodyGetNameserversAttributeType(&o.Nameservers, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateNetworkIPv4Body) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateNetworkIPv4BodyGetGatewayAttributeTypeOk(o.Gateway); ok { - toSerialize["Gateway"] = val - } - if val, ok := getUpdateNetworkIPv4BodyGetNameserversAttributeTypeOk(o.Nameservers); ok { - toSerialize["Nameservers"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateNetworkIPv4Body struct { - value *UpdateNetworkIPv4Body - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateNetworkIPv4Body) Get() *UpdateNetworkIPv4Body { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateNetworkIPv4Body) Set(val *UpdateNetworkIPv4Body) { - 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 NullableUpdateNetworkIPv4Body) 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 *NullableUpdateNetworkIPv4Body) 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 NewNullableUpdateNetworkIPv4Body(val *UpdateNetworkIPv4Body) *NullableUpdateNetworkIPv4Body { - return &NullableUpdateNetworkIPv4Body{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 NullableUpdateNetworkIPv4Body) 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 *NullableUpdateNetworkIPv4Body) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_network_ipv4_body_test.go b/services/iaas/model_update_network_ipv4_body_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_network_ipv4_body_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_network_ipv6_body.go b/services/iaas/model_update_network_ipv6_body.go deleted file mode 100644 index b7a4e8a82e..0000000000 --- a/services/iaas/model_update_network_ipv6_body.go +++ /dev/null @@ -1,228 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateNetworkIPv6Body type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateNetworkIPv6Body{} - -/* - types and functions for gateway -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv6BodyGetGatewayAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNetworkIPv6BodyGetGatewayAttributeTypeOk(arg UpdateNetworkIPv6BodyGetGatewayAttributeType) (ret UpdateNetworkIPv6BodyGetGatewayRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateNetworkIPv6BodyGetGatewayAttributeType(arg *UpdateNetworkIPv6BodyGetGatewayAttributeType, val UpdateNetworkIPv6BodyGetGatewayRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv6BodyGetGatewayArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv6BodyGetGatewayRetType = *string - -/* - types and functions for nameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv6BodyGetNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv6BodyGetNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNetworkIPv6BodyGetNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNetworkIPv6BodyGetNameserversAttributeTypeOk(arg UpdateNetworkIPv6BodyGetNameserversAttributeType) (ret UpdateNetworkIPv6BodyGetNameserversRetType, 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 setUpdateNetworkIPv6BodyGetNameserversAttributeType(arg *UpdateNetworkIPv6BodyGetNameserversAttributeType, val UpdateNetworkIPv6BodyGetNameserversRetType) { - *arg = &val -} - -// UpdateNetworkIPv6Body The config object for a IPv6 network update. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 UpdateNetworkIPv6BodyGetGatewayAttributeType `json:"gateway,omitempty"` - // A list containing DNS Servers/Nameservers for IPv6. - Nameservers UpdateNetworkIPv6BodyGetNameserversAttributeType `json:"nameservers,omitempty"` -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv6Body) GetGateway() (res UpdateNetworkIPv6BodyGetGatewayRetType) { - res, _ = o.GetGatewayOk() - return -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv6Body) GetGatewayOk() (ret UpdateNetworkIPv6BodyGetGatewayRetType, ok bool) { - return getUpdateNetworkIPv6BodyGetGatewayAttributeTypeOk(o.Gateway) -} - -// HasGateway 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 *UpdateNetworkIPv6Body) HasGateway() bool { - _, ok := o.GetGatewayOk() - return ok -} - -// SetGateway gets a reference to the given string and assigns it to the Gateway field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv6Body) SetGateway(v UpdateNetworkIPv6BodyGetGatewayRetType) { - setUpdateNetworkIPv6BodyGetGatewayAttributeType(&o.Gateway, v) -} - -// SetGatewayNil sets the value for Gateway to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv6Body) SetGatewayNil() { - o.Gateway = nil -} - -// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv6Body) UnsetGateway() { - o.Gateway = nil -} - -// GetNameservers returns the Nameservers 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 *UpdateNetworkIPv6Body) GetNameservers() (res UpdateNetworkIPv6BodyGetNameserversRetType) { - res, _ = o.GetNameserversOk() - return -} - -// GetNameserversOk returns a tuple with the Nameservers 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 *UpdateNetworkIPv6Body) GetNameserversOk() (ret UpdateNetworkIPv6BodyGetNameserversRetType, ok bool) { - return getUpdateNetworkIPv6BodyGetNameserversAttributeTypeOk(o.Nameservers) -} - -// HasNameservers 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 *UpdateNetworkIPv6Body) HasNameservers() bool { - _, ok := o.GetNameserversOk() - return ok -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNetworkIPv6Body) SetNameservers(v UpdateNetworkIPv6BodyGetNameserversRetType) { - setUpdateNetworkIPv6BodyGetNameserversAttributeType(&o.Nameservers, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateNetworkIPv6Body) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateNetworkIPv6BodyGetGatewayAttributeTypeOk(o.Gateway); ok { - toSerialize["Gateway"] = val - } - if val, ok := getUpdateNetworkIPv6BodyGetNameserversAttributeTypeOk(o.Nameservers); ok { - toSerialize["Nameservers"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateNetworkIPv6Body struct { - value *UpdateNetworkIPv6Body - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateNetworkIPv6Body) Get() *UpdateNetworkIPv6Body { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateNetworkIPv6Body) Set(val *UpdateNetworkIPv6Body) { - 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 NullableUpdateNetworkIPv6Body) 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 *NullableUpdateNetworkIPv6Body) 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 NewNullableUpdateNetworkIPv6Body(val *UpdateNetworkIPv6Body) *NullableUpdateNetworkIPv6Body { - return &NullableUpdateNetworkIPv6Body{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 NullableUpdateNetworkIPv6Body) 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 *NullableUpdateNetworkIPv6Body) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_network_ipv6_body_test.go b/services/iaas/model_update_network_ipv6_body_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_network_ipv6_body_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_nic_payload.go b/services/iaas/model_update_nic_payload.go deleted file mode 100644 index ba960d6b68..0000000000 --- a/services/iaas/model_update_nic_payload.go +++ /dev/null @@ -1,447 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateNicPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateNicPayload{} - -/* - types and functions for allowedAddresses -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetAllowedAddressesAttributeType = *[]AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetAllowedAddressesArgType = []AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetAllowedAddressesRetType = []AllowedAddressesInner - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNicPayloadGetAllowedAddressesAttributeTypeOk(arg UpdateNicPayloadGetAllowedAddressesAttributeType) (ret UpdateNicPayloadGetAllowedAddressesRetType, 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 setUpdateNicPayloadGetAllowedAddressesAttributeType(arg *UpdateNicPayloadGetAllowedAddressesAttributeType, val UpdateNicPayloadGetAllowedAddressesRetType) { - *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 UpdateNicPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNicPayloadGetDescriptionAttributeTypeOk(arg UpdateNicPayloadGetDescriptionAttributeType) (ret UpdateNicPayloadGetDescriptionRetType, 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 setUpdateNicPayloadGetDescriptionAttributeType(arg *UpdateNicPayloadGetDescriptionAttributeType, val UpdateNicPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetDescriptionRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNicPayloadGetLabelsAttributeTypeOk(arg UpdateNicPayloadGetLabelsAttributeType) (ret UpdateNicPayloadGetLabelsRetType, 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 setUpdateNicPayloadGetLabelsAttributeType(arg *UpdateNicPayloadGetLabelsAttributeType, val UpdateNicPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNicPayloadGetNameAttributeTypeOk(arg UpdateNicPayloadGetNameAttributeType) (ret UpdateNicPayloadGetNameRetType, 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 setUpdateNicPayloadGetNameAttributeType(arg *UpdateNicPayloadGetNameAttributeType, val UpdateNicPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetNameRetType = string - -/* - types and functions for nicSecurity -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadgetNicSecurityAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadgetNicSecurityArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadgetNicSecurityRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNicPayloadgetNicSecurityAttributeTypeOk(arg UpdateNicPayloadgetNicSecurityAttributeType) (ret UpdateNicPayloadgetNicSecurityRetType, 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 setUpdateNicPayloadgetNicSecurityAttributeType(arg *UpdateNicPayloadgetNicSecurityAttributeType, val UpdateNicPayloadgetNicSecurityRetType) { - *arg = &val -} - -/* - types and functions for securityGroups -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetSecurityGroupsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetSecurityGroupsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayloadGetSecurityGroupsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateNicPayloadGetSecurityGroupsAttributeTypeOk(arg UpdateNicPayloadGetSecurityGroupsAttributeType) (ret UpdateNicPayloadGetSecurityGroupsRetType, 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 setUpdateNicPayloadGetSecurityGroupsAttributeType(arg *UpdateNicPayloadGetSecurityGroupsAttributeType, val UpdateNicPayloadGetSecurityGroupsRetType) { - *arg = &val -} - -// UpdateNicPayload Object that represents a network interface update. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateNicPayload struct { - // A list of IPs or CIDR notations. - 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. - Labels UpdateNicPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name UpdateNicPayloadGetNameAttributeType `json:"name,omitempty"` - // If this is set to false, then no security groups will apply to this network interface. - NicSecurity UpdateNicPayloadgetNicSecurityAttributeType `json:"nicSecurity,omitempty"` - // A list of UUIDs. - SecurityGroups UpdateNicPayloadGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"` -} - -// NewUpdateNicPayload instantiates a new UpdateNicPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateNicPayload() *UpdateNicPayload { - this := UpdateNicPayload{} - return &this -} - -// NewUpdateNicPayloadWithDefaults instantiates a new UpdateNicPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateNicPayloadWithDefaults() *UpdateNicPayload { - this := UpdateNicPayload{} - return &this -} - -// GetAllowedAddresses returns the AllowedAddresses 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 *UpdateNicPayload) GetAllowedAddresses() (res UpdateNicPayloadGetAllowedAddressesRetType) { - res, _ = o.GetAllowedAddressesOk() - return -} - -// GetAllowedAddressesOk returns a tuple with the AllowedAddresses 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 *UpdateNicPayload) GetAllowedAddressesOk() (ret UpdateNicPayloadGetAllowedAddressesRetType, ok bool) { - return getUpdateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses) -} - -// HasAllowedAddresses 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 *UpdateNicPayload) HasAllowedAddresses() bool { - _, ok := o.GetAllowedAddressesOk() - return ok -} - -// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) SetAllowedAddresses(v UpdateNicPayloadGetAllowedAddressesRetType) { - setUpdateNicPayloadGetAllowedAddressesAttributeType(&o.AllowedAddresses, 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 *UpdateNicPayload) GetDescription() (res UpdateNicPayloadGetDescriptionRetType) { - 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 *UpdateNicPayload) GetDescriptionOk() (ret UpdateNicPayloadGetDescriptionRetType, ok bool) { - return getUpdateNicPayloadGetDescriptionAttributeTypeOk(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 *UpdateNicPayload) 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 *UpdateNicPayload) SetDescription(v UpdateNicPayloadGetDescriptionRetType) { - setUpdateNicPayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) GetLabels() (res UpdateNicPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) GetLabelsOk() (ret UpdateNicPayloadGetLabelsRetType, ok bool) { - return getUpdateNicPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) SetLabels(v UpdateNicPayloadGetLabelsRetType) { - setUpdateNicPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) GetName() (res UpdateNicPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *UpdateNicPayload) GetNameOk() (ret UpdateNicPayloadGetNameRetType, ok bool) { - return getUpdateNicPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *UpdateNicPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) SetName(v UpdateNicPayloadGetNameRetType) { - setUpdateNicPayloadGetNameAttributeType(&o.Name, v) -} - -// GetNicSecurity returns the NicSecurity 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 *UpdateNicPayload) GetNicSecurity() (res UpdateNicPayloadgetNicSecurityRetType) { - res, _ = o.GetNicSecurityOk() - return -} - -// GetNicSecurityOk returns a tuple with the NicSecurity 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 *UpdateNicPayload) GetNicSecurityOk() (ret UpdateNicPayloadgetNicSecurityRetType, ok bool) { - return getUpdateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity) -} - -// HasNicSecurity 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 *UpdateNicPayload) HasNicSecurity() bool { - _, ok := o.GetNicSecurityOk() - return ok -} - -// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) SetNicSecurity(v UpdateNicPayloadgetNicSecurityRetType) { - setUpdateNicPayloadgetNicSecurityAttributeType(&o.NicSecurity, v) -} - -// GetSecurityGroups returns the SecurityGroups 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 *UpdateNicPayload) GetSecurityGroups() (res UpdateNicPayloadGetSecurityGroupsRetType) { - res, _ = o.GetSecurityGroupsOk() - return -} - -// GetSecurityGroupsOk returns a tuple with the SecurityGroups 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 *UpdateNicPayload) GetSecurityGroupsOk() (ret UpdateNicPayloadGetSecurityGroupsRetType, ok bool) { - return getUpdateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups) -} - -// HasSecurityGroups 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 *UpdateNicPayload) HasSecurityGroups() bool { - _, ok := o.GetSecurityGroupsOk() - return ok -} - -// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateNicPayload) SetSecurityGroups(v UpdateNicPayloadGetSecurityGroupsRetType) { - setUpdateNicPayloadGetSecurityGroupsAttributeType(&o.SecurityGroups, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateNicPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses); ok { - toSerialize["AllowedAddresses"] = val - } - if val, ok := getUpdateNicPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getUpdateNicPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateNicPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getUpdateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity); ok { - toSerialize["NicSecurity"] = val - } - if val, ok := getUpdateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok { - toSerialize["SecurityGroups"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateNicPayload struct { - value *UpdateNicPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateNicPayload) Get() *UpdateNicPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateNicPayload) Set(val *UpdateNicPayload) { - 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 NullableUpdateNicPayload) 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 *NullableUpdateNicPayload) 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 NewNullableUpdateNicPayload(val *UpdateNicPayload) *NullableUpdateNicPayload { - return &NullableUpdateNicPayload{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 NullableUpdateNicPayload) 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 *NullableUpdateNicPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_nic_payload_test.go b/services/iaas/model_update_nic_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_nic_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_public_ip_payload.go b/services/iaas/model_update_public_ip_payload.go deleted file mode 100644 index fe0f9c26be..0000000000 --- a/services/iaas/model_update_public_ip_payload.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdatePublicIPPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdatePublicIPPayload{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdatePublicIPPayloadGetIdAttributeTypeOk(arg UpdatePublicIPPayloadGetIdAttributeType) (ret UpdatePublicIPPayloadGetIdRetType, 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 setUpdatePublicIPPayloadGetIdAttributeType(arg *UpdatePublicIPPayloadGetIdAttributeType, val UpdatePublicIPPayloadGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetIdRetType = string - -/* - types and functions for ip -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetIpAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdatePublicIPPayloadGetIpAttributeTypeOk(arg UpdatePublicIPPayloadGetIpAttributeType) (ret UpdatePublicIPPayloadGetIpRetType, 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 setUpdatePublicIPPayloadGetIpAttributeType(arg *UpdatePublicIPPayloadGetIpAttributeType, val UpdatePublicIPPayloadGetIpRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetIpArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetIpRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdatePublicIPPayloadGetLabelsAttributeTypeOk(arg UpdatePublicIPPayloadGetLabelsAttributeType) (ret UpdatePublicIPPayloadGetLabelsRetType, 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 setUpdatePublicIPPayloadGetLabelsAttributeType(arg *UpdatePublicIPPayloadGetLabelsAttributeType, val UpdatePublicIPPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for networkInterface -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdatePublicIPPayloadGetNetworkInterfaceAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(arg UpdatePublicIPPayloadGetNetworkInterfaceAttributeType) (ret UpdatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdatePublicIPPayloadGetNetworkInterfaceAttributeType(arg *UpdatePublicIPPayloadGetNetworkInterfaceAttributeType, val UpdatePublicIPPayloadGetNetworkInterfaceRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 - -// 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 { - // 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. - Labels UpdatePublicIPPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // Universally Unique Identifier (UUID). - NetworkInterface UpdatePublicIPPayloadGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"` -} - -// NewUpdatePublicIPPayload instantiates a new UpdatePublicIPPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdatePublicIPPayload() *UpdatePublicIPPayload { - this := UpdatePublicIPPayload{} - return &this -} - -// NewUpdatePublicIPPayloadWithDefaults instantiates a new UpdatePublicIPPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdatePublicIPPayloadWithDefaults() *UpdatePublicIPPayload { - this := UpdatePublicIPPayload{} - return &this -} - -// 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) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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) GetIdOk() (ret UpdatePublicIPPayloadGetIdRetType, ok bool) { - return getUpdatePublicIPPayloadGetIdAttributeTypeOk(o.Id) -} - -// HasId 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) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) SetId(v UpdatePublicIPPayloadGetIdRetType) { - setUpdatePublicIPPayloadGetIdAttributeType(&o.Id, v) -} - -// GetIp returns the Ip 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) GetIp() (res UpdatePublicIPPayloadGetIpRetType) { - res, _ = o.GetIpOk() - return -} - -// GetIpOk returns a tuple with the Ip 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) GetIpOk() (ret UpdatePublicIPPayloadGetIpRetType, ok bool) { - return getUpdatePublicIPPayloadGetIpAttributeTypeOk(o.Ip) -} - -// HasIp 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) HasIp() bool { - _, ok := o.GetIpOk() - return ok -} - -// SetIp gets a reference to the given string and assigns it to the Ip field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) SetIp(v UpdatePublicIPPayloadGetIpRetType) { - setUpdatePublicIPPayloadGetIpAttributeType(&o.Ip, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) GetLabels() (res UpdatePublicIPPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) GetLabelsOk() (ret UpdatePublicIPPayloadGetLabelsRetType, ok bool) { - return getUpdatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) SetLabels(v UpdatePublicIPPayloadGetLabelsRetType) { - setUpdatePublicIPPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetNetworkInterface returns the NetworkInterface field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) GetNetworkInterface() (res UpdatePublicIPPayloadGetNetworkInterfaceRetType) { - res, _ = o.GetNetworkInterfaceOk() - return -} - -// GetNetworkInterfaceOk returns a tuple with the NetworkInterface 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) GetNetworkInterfaceOk() (ret UpdatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) { - return getUpdatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface) -} - -// HasNetworkInterface 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) HasNetworkInterface() bool { - _, ok := o.GetNetworkInterfaceOk() - return ok -} - -// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) SetNetworkInterface(v UpdatePublicIPPayloadGetNetworkInterfaceRetType) { - setUpdatePublicIPPayloadGetNetworkInterfaceAttributeType(&o.NetworkInterface, v) -} - -// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) SetNetworkInterfaceNil() { - o.NetworkInterface = nil -} - -// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdatePublicIPPayload) UnsetNetworkInterface() { - o.NetworkInterface = nil -} - -// 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 := getUpdatePublicIPPayloadGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getUpdatePublicIPPayloadGetIpAttributeTypeOk(o.Ip); ok { - toSerialize["Ip"] = val - } - if val, ok := getUpdatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok { - toSerialize["NetworkInterface"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdatePublicIPPayload struct { - value *UpdatePublicIPPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdatePublicIPPayload) Get() *UpdatePublicIPPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdatePublicIPPayload) Set(val *UpdatePublicIPPayload) { - 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 NullableUpdatePublicIPPayload) 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 *NullableUpdatePublicIPPayload) 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 NewNullableUpdatePublicIPPayload(val *UpdatePublicIPPayload) *NullableUpdatePublicIPPayload { - return &NullableUpdatePublicIPPayload{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 NullableUpdatePublicIPPayload) 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 *NullableUpdatePublicIPPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_public_ip_payload_test.go b/services/iaas/model_update_public_ip_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_public_ip_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_regional_area_ipv4.go b/services/iaas/model_update_regional_area_ipv4.go deleted file mode 100644 index 8299613150..0000000000 --- a/services/iaas/model_update_regional_area_ipv4.go +++ /dev/null @@ -1,328 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateRegionalAreaIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateRegionalAreaIPv4{} - -/* - types and functions for defaultNameservers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetDefaultNameserversAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetDefaultNameserversArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetDefaultNameserversRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRegionalAreaIPv4GetDefaultNameserversAttributeTypeOk(arg UpdateRegionalAreaIPv4GetDefaultNameserversAttributeType) (ret UpdateRegionalAreaIPv4GetDefaultNameserversRetType, 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 setUpdateRegionalAreaIPv4GetDefaultNameserversAttributeType(arg *UpdateRegionalAreaIPv4GetDefaultNameserversAttributeType, val UpdateRegionalAreaIPv4GetDefaultNameserversRetType) { - *arg = &val -} - -/* - types and functions for defaultPrefixLen -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetDefaultPrefixLenArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetDefaultPrefixLenRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeTypeOk(arg UpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeType) (ret UpdateRegionalAreaIPv4GetDefaultPrefixLenRetType, 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 setUpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeType(arg *UpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeType, val UpdateRegionalAreaIPv4GetDefaultPrefixLenRetType) { - *arg = &val -} - -/* - types and functions for maxPrefixLen -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetMaxPrefixLenAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetMaxPrefixLenArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetMaxPrefixLenRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRegionalAreaIPv4GetMaxPrefixLenAttributeTypeOk(arg UpdateRegionalAreaIPv4GetMaxPrefixLenAttributeType) (ret UpdateRegionalAreaIPv4GetMaxPrefixLenRetType, 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 setUpdateRegionalAreaIPv4GetMaxPrefixLenAttributeType(arg *UpdateRegionalAreaIPv4GetMaxPrefixLenAttributeType, val UpdateRegionalAreaIPv4GetMaxPrefixLenRetType) { - *arg = &val -} - -/* - types and functions for minPrefixLen -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetMinPrefixLenAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetMinPrefixLenArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4GetMinPrefixLenRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRegionalAreaIPv4GetMinPrefixLenAttributeTypeOk(arg UpdateRegionalAreaIPv4GetMinPrefixLenAttributeType) (ret UpdateRegionalAreaIPv4GetMinPrefixLenRetType, 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 setUpdateRegionalAreaIPv4GetMinPrefixLenAttributeType(arg *UpdateRegionalAreaIPv4GetMinPrefixLenAttributeType, val UpdateRegionalAreaIPv4GetMinPrefixLenRetType) { - *arg = &val -} - -// UpdateRegionalAreaIPv4 Object that represents the request body for a regional network area IPv4 configuration update. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRegionalAreaIPv4 struct { - DefaultNameservers UpdateRegionalAreaIPv4GetDefaultNameserversAttributeType `json:"defaultNameservers,omitempty"` - // The default prefix length for networks in the network area. - DefaultPrefixLen UpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeType `json:"defaultPrefixLen,omitempty"` - // The maximal prefix length for networks in the network area. - MaxPrefixLen UpdateRegionalAreaIPv4GetMaxPrefixLenAttributeType `json:"maxPrefixLen,omitempty"` - // The minimal prefix length for networks in the network area. - MinPrefixLen UpdateRegionalAreaIPv4GetMinPrefixLenAttributeType `json:"minPrefixLen,omitempty"` -} - -// NewUpdateRegionalAreaIPv4 instantiates a new UpdateRegionalAreaIPv4 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateRegionalAreaIPv4() *UpdateRegionalAreaIPv4 { - this := UpdateRegionalAreaIPv4{} - return &this -} - -// NewUpdateRegionalAreaIPv4WithDefaults instantiates a new UpdateRegionalAreaIPv4 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateRegionalAreaIPv4WithDefaults() *UpdateRegionalAreaIPv4 { - this := UpdateRegionalAreaIPv4{} - return &this -} - -// GetDefaultNameservers returns the DefaultNameservers 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 *UpdateRegionalAreaIPv4) GetDefaultNameservers() (res UpdateRegionalAreaIPv4GetDefaultNameserversRetType) { - res, _ = o.GetDefaultNameserversOk() - return -} - -// GetDefaultNameserversOk returns a tuple with the DefaultNameservers 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 *UpdateRegionalAreaIPv4) GetDefaultNameserversOk() (ret UpdateRegionalAreaIPv4GetDefaultNameserversRetType, ok bool) { - return getUpdateRegionalAreaIPv4GetDefaultNameserversAttributeTypeOk(o.DefaultNameservers) -} - -// HasDefaultNameservers 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 *UpdateRegionalAreaIPv4) HasDefaultNameservers() bool { - _, ok := o.GetDefaultNameserversOk() - return ok -} - -// SetDefaultNameservers gets a reference to the given []string and assigns it to the DefaultNameservers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRegionalAreaIPv4) SetDefaultNameservers(v UpdateRegionalAreaIPv4GetDefaultNameserversRetType) { - setUpdateRegionalAreaIPv4GetDefaultNameserversAttributeType(&o.DefaultNameservers, v) -} - -// GetDefaultPrefixLen returns the DefaultPrefixLen 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 *UpdateRegionalAreaIPv4) GetDefaultPrefixLen() (res UpdateRegionalAreaIPv4GetDefaultPrefixLenRetType) { - res, _ = o.GetDefaultPrefixLenOk() - return -} - -// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen 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 *UpdateRegionalAreaIPv4) GetDefaultPrefixLenOk() (ret UpdateRegionalAreaIPv4GetDefaultPrefixLenRetType, ok bool) { - return getUpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeTypeOk(o.DefaultPrefixLen) -} - -// HasDefaultPrefixLen 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 *UpdateRegionalAreaIPv4) HasDefaultPrefixLen() bool { - _, ok := o.GetDefaultPrefixLenOk() - return ok -} - -// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRegionalAreaIPv4) SetDefaultPrefixLen(v UpdateRegionalAreaIPv4GetDefaultPrefixLenRetType) { - setUpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeType(&o.DefaultPrefixLen, v) -} - -// GetMaxPrefixLen returns the MaxPrefixLen 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 *UpdateRegionalAreaIPv4) GetMaxPrefixLen() (res UpdateRegionalAreaIPv4GetMaxPrefixLenRetType) { - res, _ = o.GetMaxPrefixLenOk() - return -} - -// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen 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 *UpdateRegionalAreaIPv4) GetMaxPrefixLenOk() (ret UpdateRegionalAreaIPv4GetMaxPrefixLenRetType, ok bool) { - return getUpdateRegionalAreaIPv4GetMaxPrefixLenAttributeTypeOk(o.MaxPrefixLen) -} - -// HasMaxPrefixLen 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 *UpdateRegionalAreaIPv4) HasMaxPrefixLen() bool { - _, ok := o.GetMaxPrefixLenOk() - return ok -} - -// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRegionalAreaIPv4) SetMaxPrefixLen(v UpdateRegionalAreaIPv4GetMaxPrefixLenRetType) { - setUpdateRegionalAreaIPv4GetMaxPrefixLenAttributeType(&o.MaxPrefixLen, v) -} - -// GetMinPrefixLen returns the MinPrefixLen 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 *UpdateRegionalAreaIPv4) GetMinPrefixLen() (res UpdateRegionalAreaIPv4GetMinPrefixLenRetType) { - res, _ = o.GetMinPrefixLenOk() - return -} - -// GetMinPrefixLenOk returns a tuple with the MinPrefixLen 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 *UpdateRegionalAreaIPv4) GetMinPrefixLenOk() (ret UpdateRegionalAreaIPv4GetMinPrefixLenRetType, ok bool) { - return getUpdateRegionalAreaIPv4GetMinPrefixLenAttributeTypeOk(o.MinPrefixLen) -} - -// HasMinPrefixLen 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 *UpdateRegionalAreaIPv4) HasMinPrefixLen() bool { - _, ok := o.GetMinPrefixLenOk() - return ok -} - -// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRegionalAreaIPv4) SetMinPrefixLen(v UpdateRegionalAreaIPv4GetMinPrefixLenRetType) { - setUpdateRegionalAreaIPv4GetMinPrefixLenAttributeType(&o.MinPrefixLen, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateRegionalAreaIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateRegionalAreaIPv4GetDefaultNameserversAttributeTypeOk(o.DefaultNameservers); ok { - toSerialize["DefaultNameservers"] = val - } - if val, ok := getUpdateRegionalAreaIPv4GetDefaultPrefixLenAttributeTypeOk(o.DefaultPrefixLen); ok { - toSerialize["DefaultPrefixLen"] = val - } - if val, ok := getUpdateRegionalAreaIPv4GetMaxPrefixLenAttributeTypeOk(o.MaxPrefixLen); ok { - toSerialize["MaxPrefixLen"] = val - } - if val, ok := getUpdateRegionalAreaIPv4GetMinPrefixLenAttributeTypeOk(o.MinPrefixLen); ok { - toSerialize["MinPrefixLen"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateRegionalAreaIPv4 struct { - value *UpdateRegionalAreaIPv4 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateRegionalAreaIPv4) Get() *UpdateRegionalAreaIPv4 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateRegionalAreaIPv4) Set(val *UpdateRegionalAreaIPv4) { - 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 NullableUpdateRegionalAreaIPv4) 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 *NullableUpdateRegionalAreaIPv4) 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 NewNullableUpdateRegionalAreaIPv4(val *UpdateRegionalAreaIPv4) *NullableUpdateRegionalAreaIPv4 { - return &NullableUpdateRegionalAreaIPv4{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 NullableUpdateRegionalAreaIPv4) 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 *NullableUpdateRegionalAreaIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_regional_area_ipv4_test.go b/services/iaas/model_update_regional_area_ipv4_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_regional_area_ipv4_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_route_of_routing_table_payload.go b/services/iaas/model_update_route_of_routing_table_payload.go deleted file mode 100644 index 5f3d8cf70e..0000000000 --- a/services/iaas/model_update_route_of_routing_table_payload.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateRouteOfRoutingTablePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateRouteOfRoutingTablePayload{} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRouteOfRoutingTablePayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRouteOfRoutingTablePayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRouteOfRoutingTablePayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRouteOfRoutingTablePayloadGetLabelsAttributeTypeOk(arg UpdateRouteOfRoutingTablePayloadGetLabelsAttributeType) (ret UpdateRouteOfRoutingTablePayloadGetLabelsRetType, 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 setUpdateRouteOfRoutingTablePayloadGetLabelsAttributeType(arg *UpdateRouteOfRoutingTablePayloadGetLabelsAttributeType, val UpdateRouteOfRoutingTablePayloadGetLabelsRetType) { - *arg = &val -} - -// 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. - Labels UpdateRouteOfRoutingTablePayloadGetLabelsAttributeType `json:"labels,omitempty"` -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateRouteOfRoutingTablePayloadWithDefaults() *UpdateRouteOfRoutingTablePayload { - this := UpdateRouteOfRoutingTablePayload{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRouteOfRoutingTablePayload) GetLabels() (res UpdateRouteOfRoutingTablePayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRouteOfRoutingTablePayload) GetLabelsOk() (ret UpdateRouteOfRoutingTablePayloadGetLabelsRetType, ok bool) { - return getUpdateRouteOfRoutingTablePayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRouteOfRoutingTablePayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRouteOfRoutingTablePayload) SetLabels(v UpdateRouteOfRoutingTablePayloadGetLabelsRetType) { - setUpdateRouteOfRoutingTablePayloadGetLabelsAttributeType(&o.Labels, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateRouteOfRoutingTablePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateRouteOfRoutingTablePayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateRouteOfRoutingTablePayload struct { - value *UpdateRouteOfRoutingTablePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateRouteOfRoutingTablePayload) Get() *UpdateRouteOfRoutingTablePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateRouteOfRoutingTablePayload) Set(val *UpdateRouteOfRoutingTablePayload) { - 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 NullableUpdateRouteOfRoutingTablePayload) 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 *NullableUpdateRouteOfRoutingTablePayload) 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 NewNullableUpdateRouteOfRoutingTablePayload(val *UpdateRouteOfRoutingTablePayload) *NullableUpdateRouteOfRoutingTablePayload { - return &NullableUpdateRouteOfRoutingTablePayload{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 NullableUpdateRouteOfRoutingTablePayload) 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 *NullableUpdateRouteOfRoutingTablePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_route_of_routing_table_payload_test.go b/services/iaas/model_update_route_of_routing_table_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_route_of_routing_table_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_routing_table_of_area_payload.go b/services/iaas/model_update_routing_table_of_area_payload.go deleted file mode 100644 index f80907e75b..0000000000 --- a/services/iaas/model_update_routing_table_of_area_payload.go +++ /dev/null @@ -1,388 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateRoutingTableOfAreaPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateRoutingTableOfAreaPayload{} - -/* - 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 UpdateRoutingTableOfAreaPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRoutingTableOfAreaPayloadGetDescriptionAttributeTypeOk(arg UpdateRoutingTableOfAreaPayloadGetDescriptionAttributeType) (ret UpdateRoutingTableOfAreaPayloadGetDescriptionRetType, 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 setUpdateRoutingTableOfAreaPayloadGetDescriptionAttributeType(arg *UpdateRoutingTableOfAreaPayloadGetDescriptionAttributeType, val UpdateRoutingTableOfAreaPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadGetDescriptionRetType = string - -/* - types and functions for dynamicRoutes -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadgetDynamicRoutesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadgetDynamicRoutesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeTypeOk(arg UpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeType) (ret UpdateRoutingTableOfAreaPayloadgetDynamicRoutesRetType, 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 setUpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeType(arg *UpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeType, val UpdateRoutingTableOfAreaPayloadgetDynamicRoutesRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRoutingTableOfAreaPayloadGetLabelsAttributeTypeOk(arg UpdateRoutingTableOfAreaPayloadGetLabelsAttributeType) (ret UpdateRoutingTableOfAreaPayloadGetLabelsRetType, 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 setUpdateRoutingTableOfAreaPayloadGetLabelsAttributeType(arg *UpdateRoutingTableOfAreaPayloadGetLabelsAttributeType, val UpdateRoutingTableOfAreaPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRoutingTableOfAreaPayloadGetNameAttributeTypeOk(arg UpdateRoutingTableOfAreaPayloadGetNameAttributeType) (ret UpdateRoutingTableOfAreaPayloadGetNameRetType, 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 setUpdateRoutingTableOfAreaPayloadGetNameAttributeType(arg *UpdateRoutingTableOfAreaPayloadGetNameAttributeType, val UpdateRoutingTableOfAreaPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadGetNameRetType = string - -/* - types and functions for systemRoutes -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadgetSystemRoutesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayloadgetSystemRoutesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeTypeOk(arg UpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeType) (ret UpdateRoutingTableOfAreaPayloadgetSystemRoutesRetType, 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 setUpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeType(arg *UpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeType, val UpdateRoutingTableOfAreaPayloadgetSystemRoutesRetType) { - *arg = &val -} - -// UpdateRoutingTableOfAreaPayload Object that represents the request body for a routing table update. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateRoutingTableOfAreaPayload struct { - // Description Object. Allows string up to 255 Characters. - 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. - Labels UpdateRoutingTableOfAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name UpdateRoutingTableOfAreaPayloadGetNameAttributeType `json:"name,omitempty"` - // The update config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. - SystemRoutes UpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeType `json:"systemRoutes,omitempty"` -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateRoutingTableOfAreaPayloadWithDefaults() *UpdateRoutingTableOfAreaPayload { - this := UpdateRoutingTableOfAreaPayload{} - 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 *UpdateRoutingTableOfAreaPayload) GetDescription() (res UpdateRoutingTableOfAreaPayloadGetDescriptionRetType) { - 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 *UpdateRoutingTableOfAreaPayload) GetDescriptionOk() (ret UpdateRoutingTableOfAreaPayloadGetDescriptionRetType, ok bool) { - return getUpdateRoutingTableOfAreaPayloadGetDescriptionAttributeTypeOk(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 *UpdateRoutingTableOfAreaPayload) 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 *UpdateRoutingTableOfAreaPayload) SetDescription(v UpdateRoutingTableOfAreaPayloadGetDescriptionRetType) { - setUpdateRoutingTableOfAreaPayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetDynamicRoutes returns the DynamicRoutes 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 *UpdateRoutingTableOfAreaPayload) GetDynamicRoutes() (res UpdateRoutingTableOfAreaPayloadgetDynamicRoutesRetType) { - res, _ = o.GetDynamicRoutesOk() - return -} - -// GetDynamicRoutesOk returns a tuple with the DynamicRoutes 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 *UpdateRoutingTableOfAreaPayload) GetDynamicRoutesOk() (ret UpdateRoutingTableOfAreaPayloadgetDynamicRoutesRetType, ok bool) { - return getUpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeTypeOk(o.DynamicRoutes) -} - -// HasDynamicRoutes 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 *UpdateRoutingTableOfAreaPayload) HasDynamicRoutes() bool { - _, ok := o.GetDynamicRoutesOk() - return ok -} - -// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRoutingTableOfAreaPayload) SetDynamicRoutes(v UpdateRoutingTableOfAreaPayloadgetDynamicRoutesRetType) { - setUpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeType(&o.DynamicRoutes, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRoutingTableOfAreaPayload) GetLabels() (res UpdateRoutingTableOfAreaPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRoutingTableOfAreaPayload) GetLabelsOk() (ret UpdateRoutingTableOfAreaPayloadGetLabelsRetType, ok bool) { - return getUpdateRoutingTableOfAreaPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRoutingTableOfAreaPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRoutingTableOfAreaPayload) SetLabels(v UpdateRoutingTableOfAreaPayloadGetLabelsRetType) { - setUpdateRoutingTableOfAreaPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRoutingTableOfAreaPayload) GetName() (res UpdateRoutingTableOfAreaPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *UpdateRoutingTableOfAreaPayload) GetNameOk() (ret UpdateRoutingTableOfAreaPayloadGetNameRetType, ok bool) { - return getUpdateRoutingTableOfAreaPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *UpdateRoutingTableOfAreaPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRoutingTableOfAreaPayload) SetName(v UpdateRoutingTableOfAreaPayloadGetNameRetType) { - setUpdateRoutingTableOfAreaPayloadGetNameAttributeType(&o.Name, v) -} - -// GetSystemRoutes returns the SystemRoutes 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 *UpdateRoutingTableOfAreaPayload) GetSystemRoutes() (res UpdateRoutingTableOfAreaPayloadgetSystemRoutesRetType) { - res, _ = o.GetSystemRoutesOk() - return -} - -// GetSystemRoutesOk returns a tuple with the SystemRoutes 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 *UpdateRoutingTableOfAreaPayload) GetSystemRoutesOk() (ret UpdateRoutingTableOfAreaPayloadgetSystemRoutesRetType, ok bool) { - return getUpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeTypeOk(o.SystemRoutes) -} - -// HasSystemRoutes 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 *UpdateRoutingTableOfAreaPayload) HasSystemRoutes() bool { - _, ok := o.GetSystemRoutesOk() - return ok -} - -// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateRoutingTableOfAreaPayload) SetSystemRoutes(v UpdateRoutingTableOfAreaPayloadgetSystemRoutesRetType) { - setUpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeType(&o.SystemRoutes, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateRoutingTableOfAreaPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateRoutingTableOfAreaPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getUpdateRoutingTableOfAreaPayloadgetDynamicRoutesAttributeTypeOk(o.DynamicRoutes); ok { - toSerialize["DynamicRoutes"] = val - } - if val, ok := getUpdateRoutingTableOfAreaPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateRoutingTableOfAreaPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getUpdateRoutingTableOfAreaPayloadgetSystemRoutesAttributeTypeOk(o.SystemRoutes); ok { - toSerialize["SystemRoutes"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateRoutingTableOfAreaPayload struct { - value *UpdateRoutingTableOfAreaPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateRoutingTableOfAreaPayload) Get() *UpdateRoutingTableOfAreaPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateRoutingTableOfAreaPayload) Set(val *UpdateRoutingTableOfAreaPayload) { - 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 NullableUpdateRoutingTableOfAreaPayload) 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 *NullableUpdateRoutingTableOfAreaPayload) 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 NewNullableUpdateRoutingTableOfAreaPayload(val *UpdateRoutingTableOfAreaPayload) *NullableUpdateRoutingTableOfAreaPayload { - return &NullableUpdateRoutingTableOfAreaPayload{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 NullableUpdateRoutingTableOfAreaPayload) 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 *NullableUpdateRoutingTableOfAreaPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_routing_table_of_area_payload_test.go b/services/iaas/model_update_routing_table_of_area_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_routing_table_of_area_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_security_group_payload.go b/services/iaas/model_update_security_group_payload.go deleted file mode 100644 index b48172a657..0000000000 --- a/services/iaas/model_update_security_group_payload.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateSecurityGroupPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateSecurityGroupPayload{} - -/* - 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 UpdateSecurityGroupPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateSecurityGroupPayloadGetDescriptionAttributeTypeOk(arg UpdateSecurityGroupPayloadGetDescriptionAttributeType) (ret UpdateSecurityGroupPayloadGetDescriptionRetType, 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 setUpdateSecurityGroupPayloadGetDescriptionAttributeType(arg *UpdateSecurityGroupPayloadGetDescriptionAttributeType, val UpdateSecurityGroupPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupPayloadGetDescriptionRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateSecurityGroupPayloadGetLabelsAttributeTypeOk(arg UpdateSecurityGroupPayloadGetLabelsAttributeType) (ret UpdateSecurityGroupPayloadGetLabelsRetType, 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 setUpdateSecurityGroupPayloadGetLabelsAttributeType(arg *UpdateSecurityGroupPayloadGetLabelsAttributeType, val UpdateSecurityGroupPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateSecurityGroupPayloadGetNameAttributeTypeOk(arg UpdateSecurityGroupPayloadGetNameAttributeType) (ret UpdateSecurityGroupPayloadGetNameRetType, 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 setUpdateSecurityGroupPayloadGetNameAttributeType(arg *UpdateSecurityGroupPayloadGetNameAttributeType, val UpdateSecurityGroupPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSecurityGroupPayloadGetNameRetType = string - -// UpdateSecurityGroupPayload Object that represents an update request body of a security group. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. - Labels UpdateSecurityGroupPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name UpdateSecurityGroupPayloadGetNameAttributeType `json:"name,omitempty"` -} - -// NewUpdateSecurityGroupPayload instantiates a new UpdateSecurityGroupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateSecurityGroupPayload() *UpdateSecurityGroupPayload { - this := UpdateSecurityGroupPayload{} - return &this -} - -// NewUpdateSecurityGroupPayloadWithDefaults instantiates a new UpdateSecurityGroupPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateSecurityGroupPayloadWithDefaults() *UpdateSecurityGroupPayload { - this := UpdateSecurityGroupPayload{} - 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 *UpdateSecurityGroupPayload) GetDescription() (res UpdateSecurityGroupPayloadGetDescriptionRetType) { - 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 *UpdateSecurityGroupPayload) GetDescriptionOk() (ret UpdateSecurityGroupPayloadGetDescriptionRetType, ok bool) { - return getUpdateSecurityGroupPayloadGetDescriptionAttributeTypeOk(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 *UpdateSecurityGroupPayload) 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 *UpdateSecurityGroupPayload) SetDescription(v UpdateSecurityGroupPayloadGetDescriptionRetType) { - setUpdateSecurityGroupPayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSecurityGroupPayload) GetLabels() (res UpdateSecurityGroupPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSecurityGroupPayload) GetLabelsOk() (ret UpdateSecurityGroupPayloadGetLabelsRetType, ok bool) { - return getUpdateSecurityGroupPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSecurityGroupPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSecurityGroupPayload) SetLabels(v UpdateSecurityGroupPayloadGetLabelsRetType) { - setUpdateSecurityGroupPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSecurityGroupPayload) GetName() (res UpdateSecurityGroupPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *UpdateSecurityGroupPayload) GetNameOk() (ret UpdateSecurityGroupPayloadGetNameRetType, ok bool) { - return getUpdateSecurityGroupPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *UpdateSecurityGroupPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSecurityGroupPayload) SetName(v UpdateSecurityGroupPayloadGetNameRetType) { - setUpdateSecurityGroupPayloadGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateSecurityGroupPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateSecurityGroupPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getUpdateSecurityGroupPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateSecurityGroupPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateSecurityGroupPayload struct { - value *UpdateSecurityGroupPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateSecurityGroupPayload) Get() *UpdateSecurityGroupPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateSecurityGroupPayload) Set(val *UpdateSecurityGroupPayload) { - 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 NullableUpdateSecurityGroupPayload) 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 *NullableUpdateSecurityGroupPayload) 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 NewNullableUpdateSecurityGroupPayload(val *UpdateSecurityGroupPayload) *NullableUpdateSecurityGroupPayload { - return &NullableUpdateSecurityGroupPayload{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 NullableUpdateSecurityGroupPayload) 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 *NullableUpdateSecurityGroupPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_security_group_payload_test.go b/services/iaas/model_update_security_group_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_security_group_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_server_payload.go b/services/iaas/model_update_server_payload.go deleted file mode 100644 index 7729173653..0000000000 --- a/services/iaas/model_update_server_payload.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateServerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateServerPayload{} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateServerPayloadGetLabelsAttributeTypeOk(arg UpdateServerPayloadGetLabelsAttributeType) (ret UpdateServerPayloadGetLabelsRetType, 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 setUpdateServerPayloadGetLabelsAttributeType(arg *UpdateServerPayloadGetLabelsAttributeType, val UpdateServerPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for metadata -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerPayloadGetMetadataAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerPayloadGetMetadataArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerPayloadGetMetadataRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateServerPayloadGetMetadataAttributeTypeOk(arg UpdateServerPayloadGetMetadataAttributeType) (ret UpdateServerPayloadGetMetadataRetType, 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 setUpdateServerPayloadGetMetadataAttributeType(arg *UpdateServerPayloadGetMetadataAttributeType, val UpdateServerPayloadGetMetadataRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateServerPayloadGetNameAttributeTypeOk(arg UpdateServerPayloadGetNameAttributeType) (ret UpdateServerPayloadGetNameRetType, 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 setUpdateServerPayloadGetNameAttributeType(arg *UpdateServerPayloadGetNameAttributeType, val UpdateServerPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateServerPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. - 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"` - // The name for a Server. - Name UpdateServerPayloadGetNameAttributeType `json:"name,omitempty"` -} - -// NewUpdateServerPayload instantiates a new UpdateServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateServerPayload() *UpdateServerPayload { - this := UpdateServerPayload{} - return &this -} - -// NewUpdateServerPayloadWithDefaults instantiates a new UpdateServerPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateServerPayloadWithDefaults() *UpdateServerPayload { - this := UpdateServerPayload{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateServerPayload) GetLabels() (res UpdateServerPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateServerPayload) GetLabelsOk() (ret UpdateServerPayloadGetLabelsRetType, ok bool) { - return getUpdateServerPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateServerPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateServerPayload) SetLabels(v UpdateServerPayloadGetLabelsRetType) { - setUpdateServerPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetMetadata returns the Metadata 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 *UpdateServerPayload) GetMetadata() (res UpdateServerPayloadGetMetadataRetType) { - res, _ = o.GetMetadataOk() - return -} - -// GetMetadataOk returns a tuple with the Metadata 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 *UpdateServerPayload) GetMetadataOk() (ret UpdateServerPayloadGetMetadataRetType, ok bool) { - return getUpdateServerPayloadGetMetadataAttributeTypeOk(o.Metadata) -} - -// HasMetadata 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 *UpdateServerPayload) HasMetadata() bool { - _, ok := o.GetMetadataOk() - return ok -} - -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateServerPayload) SetMetadata(v UpdateServerPayloadGetMetadataRetType) { - setUpdateServerPayloadGetMetadataAttributeType(&o.Metadata, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateServerPayload) GetName() (res UpdateServerPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *UpdateServerPayload) GetNameOk() (ret UpdateServerPayloadGetNameRetType, ok bool) { - return getUpdateServerPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *UpdateServerPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateServerPayload) SetName(v UpdateServerPayloadGetNameRetType) { - setUpdateServerPayloadGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateServerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateServerPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateServerPayloadGetMetadataAttributeTypeOk(o.Metadata); ok { - toSerialize["Metadata"] = val - } - if val, ok := getUpdateServerPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateServerPayload struct { - value *UpdateServerPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateServerPayload) Get() *UpdateServerPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateServerPayload) Set(val *UpdateServerPayload) { - 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 NullableUpdateServerPayload) 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 *NullableUpdateServerPayload) 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 NewNullableUpdateServerPayload(val *UpdateServerPayload) *NullableUpdateServerPayload { - return &NullableUpdateServerPayload{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 NullableUpdateServerPayload) 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 *NullableUpdateServerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_server_payload_test.go b/services/iaas/model_update_server_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_server_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_snapshot_payload.go b/services/iaas/model_update_snapshot_payload.go deleted file mode 100644 index 63f9c5340b..0000000000 --- a/services/iaas/model_update_snapshot_payload.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateSnapshotPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateSnapshotPayload{} - -/* - 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 UpdateSnapshotPayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateSnapshotPayloadGetDescriptionAttributeTypeOk(arg UpdateSnapshotPayloadGetDescriptionAttributeType) (ret UpdateSnapshotPayloadGetDescriptionRetType, 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 setUpdateSnapshotPayloadGetDescriptionAttributeType(arg *UpdateSnapshotPayloadGetDescriptionAttributeType, val UpdateSnapshotPayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotPayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotPayloadGetDescriptionRetType = string - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotPayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotPayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotPayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateSnapshotPayloadGetLabelsAttributeTypeOk(arg UpdateSnapshotPayloadGetLabelsAttributeType) (ret UpdateSnapshotPayloadGetLabelsRetType, 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 setUpdateSnapshotPayloadGetLabelsAttributeType(arg *UpdateSnapshotPayloadGetLabelsAttributeType, val UpdateSnapshotPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateSnapshotPayloadGetNameAttributeTypeOk(arg UpdateSnapshotPayloadGetNameAttributeType) (ret UpdateSnapshotPayloadGetNameRetType, 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 setUpdateSnapshotPayloadGetNameAttributeType(arg *UpdateSnapshotPayloadGetNameAttributeType, val UpdateSnapshotPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateSnapshotPayloadGetNameRetType = string - -// UpdateSnapshotPayload Object that represents an update request body of a snapshot. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. - Labels UpdateSnapshotPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name UpdateSnapshotPayloadGetNameAttributeType `json:"name,omitempty"` -} - -// NewUpdateSnapshotPayload instantiates a new UpdateSnapshotPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateSnapshotPayload() *UpdateSnapshotPayload { - this := UpdateSnapshotPayload{} - return &this -} - -// NewUpdateSnapshotPayloadWithDefaults instantiates a new UpdateSnapshotPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateSnapshotPayloadWithDefaults() *UpdateSnapshotPayload { - this := UpdateSnapshotPayload{} - 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 *UpdateSnapshotPayload) GetDescription() (res UpdateSnapshotPayloadGetDescriptionRetType) { - 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 *UpdateSnapshotPayload) GetDescriptionOk() (ret UpdateSnapshotPayloadGetDescriptionRetType, ok bool) { - return getUpdateSnapshotPayloadGetDescriptionAttributeTypeOk(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 *UpdateSnapshotPayload) 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 *UpdateSnapshotPayload) SetDescription(v UpdateSnapshotPayloadGetDescriptionRetType) { - setUpdateSnapshotPayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSnapshotPayload) GetLabels() (res UpdateSnapshotPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSnapshotPayload) GetLabelsOk() (ret UpdateSnapshotPayloadGetLabelsRetType, ok bool) { - return getUpdateSnapshotPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSnapshotPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSnapshotPayload) SetLabels(v UpdateSnapshotPayloadGetLabelsRetType) { - setUpdateSnapshotPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSnapshotPayload) GetName() (res UpdateSnapshotPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *UpdateSnapshotPayload) GetNameOk() (ret UpdateSnapshotPayloadGetNameRetType, ok bool) { - return getUpdateSnapshotPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *UpdateSnapshotPayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateSnapshotPayload) SetName(v UpdateSnapshotPayloadGetNameRetType) { - setUpdateSnapshotPayloadGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateSnapshotPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateSnapshotPayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getUpdateSnapshotPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateSnapshotPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateSnapshotPayload struct { - value *UpdateSnapshotPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateSnapshotPayload) Get() *UpdateSnapshotPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateSnapshotPayload) Set(val *UpdateSnapshotPayload) { - 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 NullableUpdateSnapshotPayload) 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 *NullableUpdateSnapshotPayload) 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 NewNullableUpdateSnapshotPayload(val *UpdateSnapshotPayload) *NullableUpdateSnapshotPayload { - return &NullableUpdateSnapshotPayload{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 NullableUpdateSnapshotPayload) 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 *NullableUpdateSnapshotPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_snapshot_payload_test.go b/services/iaas/model_update_snapshot_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_snapshot_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_update_volume_payload.go b/services/iaas/model_update_volume_payload.go deleted file mode 100644 index 231e95bc25..0000000000 --- a/services/iaas/model_update_volume_payload.go +++ /dev/null @@ -1,387 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the UpdateVolumePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateVolumePayload{} - -/* - types and functions for bootable -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadgetBootableAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadgetBootableArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadgetBootableRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateVolumePayloadgetBootableAttributeTypeOk(arg UpdateVolumePayloadgetBootableAttributeType) (ret UpdateVolumePayloadgetBootableRetType, 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 setUpdateVolumePayloadgetBootableAttributeType(arg *UpdateVolumePayloadgetBootableAttributeType, val UpdateVolumePayloadgetBootableRetType) { - *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 UpdateVolumePayloadGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateVolumePayloadGetDescriptionAttributeTypeOk(arg UpdateVolumePayloadGetDescriptionAttributeType) (ret UpdateVolumePayloadGetDescriptionRetType, 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 setUpdateVolumePayloadGetDescriptionAttributeType(arg *UpdateVolumePayloadGetDescriptionAttributeType, val UpdateVolumePayloadGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetDescriptionRetType = string - -/* - types and functions for imageConfig -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetImageConfigAttributeType = *ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetImageConfigArgType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetImageConfigRetType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateVolumePayloadGetImageConfigAttributeTypeOk(arg UpdateVolumePayloadGetImageConfigAttributeType) (ret UpdateVolumePayloadGetImageConfigRetType, 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 setUpdateVolumePayloadGetImageConfigAttributeType(arg *UpdateVolumePayloadGetImageConfigAttributeType, val UpdateVolumePayloadGetImageConfigRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateVolumePayloadGetLabelsAttributeTypeOk(arg UpdateVolumePayloadGetLabelsAttributeType) (ret UpdateVolumePayloadGetLabelsRetType, 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 setUpdateVolumePayloadGetLabelsAttributeType(arg *UpdateVolumePayloadGetLabelsAttributeType, val UpdateVolumePayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateVolumePayloadGetNameAttributeTypeOk(arg UpdateVolumePayloadGetNameAttributeType) (ret UpdateVolumePayloadGetNameRetType, 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 setUpdateVolumePayloadGetNameAttributeType(arg *UpdateVolumePayloadGetNameAttributeType, val UpdateVolumePayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayloadGetNameRetType = string - -// UpdateVolumePayload Object that represents an update request body of a volume. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateVolumePayload struct { - // Indicates if a volume is bootable. - Bootable UpdateVolumePayloadgetBootableAttributeType `json:"bootable,omitempty"` - // 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. - Labels UpdateVolumePayloadGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name UpdateVolumePayloadGetNameAttributeType `json:"name,omitempty"` -} - -// NewUpdateVolumePayload instantiates a new UpdateVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateVolumePayload() *UpdateVolumePayload { - this := UpdateVolumePayload{} - return &this -} - -// NewUpdateVolumePayloadWithDefaults instantiates a new UpdateVolumePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewUpdateVolumePayloadWithDefaults() *UpdateVolumePayload { - this := UpdateVolumePayload{} - return &this -} - -// GetBootable returns the Bootable 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 *UpdateVolumePayload) GetBootable() (res UpdateVolumePayloadgetBootableRetType) { - res, _ = o.GetBootableOk() - return -} - -// GetBootableOk returns a tuple with the Bootable 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 *UpdateVolumePayload) GetBootableOk() (ret UpdateVolumePayloadgetBootableRetType, ok bool) { - return getUpdateVolumePayloadgetBootableAttributeTypeOk(o.Bootable) -} - -// HasBootable 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 *UpdateVolumePayload) HasBootable() bool { - _, ok := o.GetBootableOk() - return ok -} - -// SetBootable gets a reference to the given bool and assigns it to the Bootable field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateVolumePayload) SetBootable(v UpdateVolumePayloadgetBootableRetType) { - setUpdateVolumePayloadgetBootableAttributeType(&o.Bootable, 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 *UpdateVolumePayload) GetDescription() (res UpdateVolumePayloadGetDescriptionRetType) { - 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 *UpdateVolumePayload) GetDescriptionOk() (ret UpdateVolumePayloadGetDescriptionRetType, ok bool) { - return getUpdateVolumePayloadGetDescriptionAttributeTypeOk(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 *UpdateVolumePayload) 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 *UpdateVolumePayload) SetDescription(v UpdateVolumePayloadGetDescriptionRetType) { - setUpdateVolumePayloadGetDescriptionAttributeType(&o.Description, v) -} - -// GetImageConfig returns the ImageConfig 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 *UpdateVolumePayload) GetImageConfig() (res UpdateVolumePayloadGetImageConfigRetType) { - res, _ = o.GetImageConfigOk() - return -} - -// GetImageConfigOk returns a tuple with the ImageConfig 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 *UpdateVolumePayload) GetImageConfigOk() (ret UpdateVolumePayloadGetImageConfigRetType, ok bool) { - return getUpdateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig) -} - -// HasImageConfig 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 *UpdateVolumePayload) HasImageConfig() bool { - _, ok := o.GetImageConfigOk() - return ok -} - -// SetImageConfig gets a reference to the given ImageConfig and assigns it to the ImageConfig field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateVolumePayload) SetImageConfig(v UpdateVolumePayloadGetImageConfigRetType) { - setUpdateVolumePayloadGetImageConfigAttributeType(&o.ImageConfig, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateVolumePayload) GetLabels() (res UpdateVolumePayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateVolumePayload) GetLabelsOk() (ret UpdateVolumePayloadGetLabelsRetType, ok bool) { - return getUpdateVolumePayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateVolumePayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateVolumePayload) SetLabels(v UpdateVolumePayloadGetLabelsRetType) { - setUpdateVolumePayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateVolumePayload) GetName() (res UpdateVolumePayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *UpdateVolumePayload) GetNameOk() (ret UpdateVolumePayloadGetNameRetType, ok bool) { - return getUpdateVolumePayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *UpdateVolumePayload) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateVolumePayload) SetName(v UpdateVolumePayloadGetNameRetType) { - setUpdateVolumePayloadGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateVolumePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateVolumePayloadgetBootableAttributeTypeOk(o.Bootable); ok { - toSerialize["Bootable"] = val - } - if val, ok := getUpdateVolumePayloadGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getUpdateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig); ok { - toSerialize["ImageConfig"] = val - } - if val, ok := getUpdateVolumePayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateVolumePayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateVolumePayload struct { - value *UpdateVolumePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateVolumePayload) Get() *UpdateVolumePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateVolumePayload) Set(val *UpdateVolumePayload) { - 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 NullableUpdateVolumePayload) 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 *NullableUpdateVolumePayload) 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 NewNullableUpdateVolumePayload(val *UpdateVolumePayload) *NullableUpdateVolumePayload { - return &NullableUpdateVolumePayload{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 NullableUpdateVolumePayload) 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 *NullableUpdateVolumePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_update_volume_payload_test.go b/services/iaas/model_update_volume_payload_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_update_volume_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_volume.go b/services/iaas/model_volume.go deleted file mode 100644 index ad86d056a8..0000000000 --- a/services/iaas/model_volume.go +++ /dev/null @@ -1,1033 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" - "time" -) - -// checks if the Volume type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Volume{} - -/* - types and functions for availabilityZone -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetAvailabilityZoneAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetAvailabilityZoneAttributeTypeOk(arg VolumeGetAvailabilityZoneAttributeType) (ret VolumeGetAvailabilityZoneRetType, 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 setVolumeGetAvailabilityZoneAttributeType(arg *VolumeGetAvailabilityZoneAttributeType, val VolumeGetAvailabilityZoneRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetAvailabilityZoneArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetAvailabilityZoneRetType = string - -/* - types and functions for bootable -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumegetBootableAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumegetBootableArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumegetBootableRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumegetBootableAttributeTypeOk(arg VolumegetBootableAttributeType) (ret VolumegetBootableRetType, 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 setVolumegetBootableAttributeType(arg *VolumegetBootableAttributeType, val VolumegetBootableRetType) { - *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 VolumeGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetCreatedAtAttributeTypeOk(arg VolumeGetCreatedAtAttributeType) (ret VolumeGetCreatedAtRetType, 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 setVolumeGetCreatedAtAttributeType(arg *VolumeGetCreatedAtAttributeType, val VolumeGetCreatedAtRetType) { - *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 VolumeGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetDescriptionAttributeTypeOk(arg VolumeGetDescriptionAttributeType) (ret VolumeGetDescriptionRetType, 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 setVolumeGetDescriptionAttributeType(arg *VolumeGetDescriptionAttributeType, val VolumeGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetDescriptionRetType = string - -/* - types and functions for encrypted -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumegetEncryptedAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumegetEncryptedArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumegetEncryptedRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumegetEncryptedAttributeTypeOk(arg VolumegetEncryptedAttributeType) (ret VolumegetEncryptedRetType, 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 setVolumegetEncryptedAttributeType(arg *VolumegetEncryptedAttributeType, val VolumegetEncryptedRetType) { - *arg = &val -} - -/* - types and functions for encryptionParameters -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetEncryptionParametersAttributeType = *VolumeEncryptionParameter - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetEncryptionParametersArgType = VolumeEncryptionParameter - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetEncryptionParametersRetType = VolumeEncryptionParameter - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetEncryptionParametersAttributeTypeOk(arg VolumeGetEncryptionParametersAttributeType) (ret VolumeGetEncryptionParametersRetType, 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 setVolumeGetEncryptionParametersAttributeType(arg *VolumeGetEncryptionParametersAttributeType, val VolumeGetEncryptionParametersRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetIdAttributeTypeOk(arg VolumeGetIdAttributeType) (ret VolumeGetIdRetType, 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 setVolumeGetIdAttributeType(arg *VolumeGetIdAttributeType, val VolumeGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetIdRetType = string - -/* - types and functions for imageConfig -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetImageConfigAttributeType = *ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetImageConfigArgType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetImageConfigRetType = ImageConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetImageConfigAttributeTypeOk(arg VolumeGetImageConfigAttributeType) (ret VolumeGetImageConfigRetType, 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 setVolumeGetImageConfigAttributeType(arg *VolumeGetImageConfigAttributeType, val VolumeGetImageConfigRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetLabelsAttributeTypeOk(arg VolumeGetLabelsAttributeType) (ret VolumeGetLabelsRetType, 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 setVolumeGetLabelsAttributeType(arg *VolumeGetLabelsAttributeType, val VolumeGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetNameAttributeTypeOk(arg VolumeGetNameAttributeType) (ret VolumeGetNameRetType, 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 setVolumeGetNameAttributeType(arg *VolumeGetNameAttributeType, val VolumeGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetNameRetType = string - -/* - types and functions for performanceClass -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetPerformanceClassAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetPerformanceClassAttributeTypeOk(arg VolumeGetPerformanceClassAttributeType) (ret VolumeGetPerformanceClassRetType, 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 setVolumeGetPerformanceClassAttributeType(arg *VolumeGetPerformanceClassAttributeType, val VolumeGetPerformanceClassRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetPerformanceClassArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetPerformanceClassRetType = string - -/* - types and functions for serverId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetServerIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetServerIdAttributeTypeOk(arg VolumeGetServerIdAttributeType) (ret VolumeGetServerIdRetType, 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 setVolumeGetServerIdAttributeType(arg *VolumeGetServerIdAttributeType, val VolumeGetServerIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetServerIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetServerIdRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetSizeAttributeTypeOk(arg VolumeGetSizeAttributeType) (ret VolumeGetSizeRetType, 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 setVolumeGetSizeAttributeType(arg *VolumeGetSizeAttributeType, val VolumeGetSizeRetType) { - *arg = &val -} - -/* - types and functions for source -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetSourceAttributeType = *VolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetSourceArgType = VolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetSourceRetType = VolumeSource - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetSourceAttributeTypeOk(arg VolumeGetSourceAttributeType) (ret VolumeGetSourceRetType, 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 setVolumeGetSourceAttributeType(arg *VolumeGetSourceAttributeType, val VolumeGetSourceRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetStatusAttributeTypeOk(arg VolumeGetStatusAttributeType) (ret VolumeGetStatusRetType, 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 setVolumeGetStatusAttributeType(arg *VolumeGetStatusAttributeType, val VolumeGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetStatusRetType = 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 VolumeGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeGetUpdatedAtAttributeTypeOk(arg VolumeGetUpdatedAtAttributeType) (ret VolumeGetUpdatedAtRetType, 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 setVolumeGetUpdatedAtAttributeType(arg *VolumeGetUpdatedAtAttributeType, val VolumeGetUpdatedAtRetType) { - *arg = &val -} - -// Volume Object that represents a volume and its parameters. Volumes sized up to 16000GB are supported. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Volume struct { - // Object that represents an availability zone. - // REQUIRED - AvailabilityZone VolumeGetAvailabilityZoneAttributeType `json:"availabilityZone" required:"true"` - // Indicates if a volume is bootable. - Bootable VolumegetBootableAttributeType `json:"bootable,omitempty"` - // Date-time when resource was created. - CreatedAt VolumeGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description VolumeGetDescriptionAttributeType `json:"description,omitempty"` - // Indicates if a volume is encrypted. - Encrypted VolumegetEncryptedAttributeType `json:"encrypted,omitempty"` - EncryptionParameters VolumeGetEncryptionParametersAttributeType `json:"encryptionParameters,omitempty"` - // 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. - Labels VolumeGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - Name VolumeGetNameAttributeType `json:"name,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass VolumeGetPerformanceClassAttributeType `json:"performanceClass,omitempty"` - // Universally Unique Identifier (UUID). - ServerId VolumeGetServerIdAttributeType `json:"serverId,omitempty"` - // Size in Gigabyte. - Size VolumeGetSizeAttributeType `json:"size,omitempty"` - Source VolumeGetSourceAttributeType `json:"source,omitempty"` - // The status of a volume object. Possible values: `ATTACHED`, `ATTACHING`, `AVAILABLE`, `AWAITING-TRANSFER`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `DETACHING`, `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, `ERROR_KMS-ENCRYPTION-PARAMS`, `MAINTENANCE`, `RESERVED`, `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`. - Status VolumeGetStatusAttributeType `json:"status,omitempty"` - // Date-time when resource was last updated. - UpdatedAt VolumeGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Volume Volume - -// NewVolume instantiates a new Volume 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolume(availabilityZone VolumeGetAvailabilityZoneArgType) *Volume { - this := Volume{} - setVolumeGetAvailabilityZoneAttributeType(&this.AvailabilityZone, availabilityZone) - return &this -} - -// NewVolumeWithDefaults instantiates a new Volume 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeWithDefaults() *Volume { - this := Volume{} - return &this -} - -// GetAvailabilityZone returns the AvailabilityZone field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) GetAvailabilityZone() (ret VolumeGetAvailabilityZoneRetType) { - ret, _ = o.GetAvailabilityZoneOk() - return ret -} - -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value -// 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 *Volume) GetAvailabilityZoneOk() (ret VolumeGetAvailabilityZoneRetType, ok bool) { - return getVolumeGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) -} - -// SetAvailabilityZone sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetAvailabilityZone(v VolumeGetAvailabilityZoneRetType) { - setVolumeGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) -} - -// GetBootable returns the Bootable 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 *Volume) GetBootable() (res VolumegetBootableRetType) { - res, _ = o.GetBootableOk() - return -} - -// GetBootableOk returns a tuple with the Bootable 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 *Volume) GetBootableOk() (ret VolumegetBootableRetType, ok bool) { - return getVolumegetBootableAttributeTypeOk(o.Bootable) -} - -// HasBootable 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 *Volume) HasBootable() bool { - _, ok := o.GetBootableOk() - return ok -} - -// SetBootable gets a reference to the given bool and assigns it to the Bootable field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetBootable(v VolumegetBootableRetType) { - setVolumegetBootableAttributeType(&o.Bootable, 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 *Volume) GetCreatedAt() (res VolumeGetCreatedAtRetType) { - 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 *Volume) GetCreatedAtOk() (ret VolumeGetCreatedAtRetType, ok bool) { - return getVolumeGetCreatedAtAttributeTypeOk(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 *Volume) 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 *Volume) SetCreatedAt(v VolumeGetCreatedAtRetType) { - setVolumeGetCreatedAtAttributeType(&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 *Volume) GetDescription() (res VolumeGetDescriptionRetType) { - 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 *Volume) GetDescriptionOk() (ret VolumeGetDescriptionRetType, ok bool) { - return getVolumeGetDescriptionAttributeTypeOk(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 *Volume) 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 *Volume) SetDescription(v VolumeGetDescriptionRetType) { - setVolumeGetDescriptionAttributeType(&o.Description, v) -} - -// GetEncrypted returns the Encrypted 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 *Volume) GetEncrypted() (res VolumegetEncryptedRetType) { - res, _ = o.GetEncryptedOk() - return -} - -// GetEncryptedOk returns a tuple with the Encrypted 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 *Volume) GetEncryptedOk() (ret VolumegetEncryptedRetType, ok bool) { - return getVolumegetEncryptedAttributeTypeOk(o.Encrypted) -} - -// HasEncrypted 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 *Volume) HasEncrypted() bool { - _, ok := o.GetEncryptedOk() - return ok -} - -// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetEncrypted(v VolumegetEncryptedRetType) { - setVolumegetEncryptedAttributeType(&o.Encrypted, v) -} - -// GetEncryptionParameters returns the EncryptionParameters 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 *Volume) GetEncryptionParameters() (res VolumeGetEncryptionParametersRetType) { - res, _ = o.GetEncryptionParametersOk() - return -} - -// GetEncryptionParametersOk returns a tuple with the EncryptionParameters 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 *Volume) GetEncryptionParametersOk() (ret VolumeGetEncryptionParametersRetType, ok bool) { - return getVolumeGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters) -} - -// HasEncryptionParameters 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 *Volume) HasEncryptionParameters() bool { - _, ok := o.GetEncryptionParametersOk() - return ok -} - -// SetEncryptionParameters gets a reference to the given VolumeEncryptionParameter and assigns it to the EncryptionParameters field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetEncryptionParameters(v VolumeGetEncryptionParametersRetType) { - setVolumeGetEncryptionParametersAttributeType(&o.EncryptionParameters, 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 *Volume) GetId() (res VolumeGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *Volume) GetIdOk() (ret VolumeGetIdRetType, ok bool) { - return getVolumeGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Volume) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetId(v VolumeGetIdRetType) { - setVolumeGetIdAttributeType(&o.Id, v) -} - -// GetImageConfig returns the ImageConfig 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 *Volume) GetImageConfig() (res VolumeGetImageConfigRetType) { - res, _ = o.GetImageConfigOk() - return -} - -// GetImageConfigOk returns a tuple with the ImageConfig 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 *Volume) GetImageConfigOk() (ret VolumeGetImageConfigRetType, ok bool) { - return getVolumeGetImageConfigAttributeTypeOk(o.ImageConfig) -} - -// HasImageConfig 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 *Volume) HasImageConfig() bool { - _, ok := o.GetImageConfigOk() - return ok -} - -// SetImageConfig gets a reference to the given ImageConfig and assigns it to the ImageConfig field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetImageConfig(v VolumeGetImageConfigRetType) { - setVolumeGetImageConfigAttributeType(&o.ImageConfig, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) GetLabels() (res VolumeGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) GetLabelsOk() (ret VolumeGetLabelsRetType, ok bool) { - return getVolumeGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetLabels(v VolumeGetLabelsRetType) { - setVolumeGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) GetName() (res VolumeGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *Volume) GetNameOk() (ret VolumeGetNameRetType, ok bool) { - return getVolumeGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *Volume) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetName(v VolumeGetNameRetType) { - setVolumeGetNameAttributeType(&o.Name, v) -} - -// GetPerformanceClass returns the PerformanceClass 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 *Volume) GetPerformanceClass() (res VolumeGetPerformanceClassRetType) { - res, _ = o.GetPerformanceClassOk() - return -} - -// GetPerformanceClassOk returns a tuple with the PerformanceClass 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 *Volume) GetPerformanceClassOk() (ret VolumeGetPerformanceClassRetType, ok bool) { - return getVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass) -} - -// HasPerformanceClass 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 *Volume) HasPerformanceClass() bool { - _, ok := o.GetPerformanceClassOk() - return ok -} - -// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetPerformanceClass(v VolumeGetPerformanceClassRetType) { - setVolumeGetPerformanceClassAttributeType(&o.PerformanceClass, v) -} - -// GetServerId returns the ServerId 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 *Volume) GetServerId() (res VolumeGetServerIdRetType) { - res, _ = o.GetServerIdOk() - return -} - -// GetServerIdOk returns a tuple with the ServerId 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 *Volume) GetServerIdOk() (ret VolumeGetServerIdRetType, ok bool) { - return getVolumeGetServerIdAttributeTypeOk(o.ServerId) -} - -// HasServerId 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 *Volume) HasServerId() bool { - _, ok := o.GetServerIdOk() - return ok -} - -// SetServerId gets a reference to the given string and assigns it to the ServerId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetServerId(v VolumeGetServerIdRetType) { - setVolumeGetServerIdAttributeType(&o.ServerId, v) -} - -// GetSize returns the Size 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 *Volume) GetSize() (res VolumeGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *Volume) GetSizeOk() (ret VolumeGetSizeRetType, ok bool) { - return getVolumeGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *Volume) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetSize(v VolumeGetSizeRetType) { - setVolumeGetSizeAttributeType(&o.Size, v) -} - -// GetSource returns the Source 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 *Volume) GetSource() (res VolumeGetSourceRetType) { - res, _ = o.GetSourceOk() - return -} - -// GetSourceOk returns a tuple with the Source 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 *Volume) GetSourceOk() (ret VolumeGetSourceRetType, ok bool) { - return getVolumeGetSourceAttributeTypeOk(o.Source) -} - -// HasSource 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 *Volume) HasSource() bool { - _, ok := o.GetSourceOk() - return ok -} - -// SetSource gets a reference to the given VolumeSource and assigns it to the Source field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetSource(v VolumeGetSourceRetType) { - setVolumeGetSourceAttributeType(&o.Source, v) -} - -// GetStatus returns the Status 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 *Volume) GetStatus() (res VolumeGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *Volume) GetStatusOk() (ret VolumeGetStatusRetType, ok bool) { - return getVolumeGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *Volume) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Volume) SetStatus(v VolumeGetStatusRetType) { - setVolumeGetStatusAttributeType(&o.Status, 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 *Volume) GetUpdatedAt() (res VolumeGetUpdatedAtRetType) { - 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 *Volume) GetUpdatedAtOk() (ret VolumeGetUpdatedAtRetType, ok bool) { - return getVolumeGetUpdatedAtAttributeTypeOk(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 *Volume) 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 *Volume) SetUpdatedAt(v VolumeGetUpdatedAtRetType) { - setVolumeGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Volume) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVolumeGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { - toSerialize["AvailabilityZone"] = val - } - if val, ok := getVolumegetBootableAttributeTypeOk(o.Bootable); ok { - toSerialize["Bootable"] = val - } - if val, ok := getVolumeGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getVolumeGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getVolumegetEncryptedAttributeTypeOk(o.Encrypted); ok { - toSerialize["Encrypted"] = val - } - if val, ok := getVolumeGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters); ok { - toSerialize["EncryptionParameters"] = val - } - if val, ok := getVolumeGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getVolumeGetImageConfigAttributeTypeOk(o.ImageConfig); ok { - toSerialize["ImageConfig"] = val - } - if val, ok := getVolumeGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getVolumeGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok { - toSerialize["PerformanceClass"] = val - } - if val, ok := getVolumeGetServerIdAttributeTypeOk(o.ServerId); ok { - toSerialize["ServerId"] = val - } - if val, ok := getVolumeGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getVolumeGetSourceAttributeTypeOk(o.Source); ok { - toSerialize["Source"] = val - } - if val, ok := getVolumeGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getVolumeGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableVolume struct { - value *Volume - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableVolume) Get() *Volume { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableVolume) Set(val *Volume) { - 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 NullableVolume) 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 *NullableVolume) 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 NewNullableVolume(val *Volume) *NullableVolume { - return &NullableVolume{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 NullableVolume) 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 *NullableVolume) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_volume_attachment.go b/services/iaas/model_volume_attachment.go deleted file mode 100644 index 2552e8f3b0..0000000000 --- a/services/iaas/model_volume_attachment.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the VolumeAttachment type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VolumeAttachment{} - -/* - types and functions for deleteOnTermination -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentgetDeleteOnTerminationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentgetDeleteOnTerminationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentgetDeleteOnTerminationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeAttachmentgetDeleteOnTerminationAttributeTypeOk(arg VolumeAttachmentgetDeleteOnTerminationAttributeType) (ret VolumeAttachmentgetDeleteOnTerminationRetType, 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 setVolumeAttachmentgetDeleteOnTerminationAttributeType(arg *VolumeAttachmentgetDeleteOnTerminationAttributeType, val VolumeAttachmentgetDeleteOnTerminationRetType) { - *arg = &val -} - -/* - types and functions for serverId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentGetServerIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeAttachmentGetServerIdAttributeTypeOk(arg VolumeAttachmentGetServerIdAttributeType) (ret VolumeAttachmentGetServerIdRetType, 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 setVolumeAttachmentGetServerIdAttributeType(arg *VolumeAttachmentGetServerIdAttributeType, val VolumeAttachmentGetServerIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentGetServerIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentGetServerIdRetType = string - -/* - types and functions for volumeId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentGetVolumeIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeAttachmentGetVolumeIdAttributeTypeOk(arg VolumeAttachmentGetVolumeIdAttributeType) (ret VolumeAttachmentGetVolumeIdRetType, 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 setVolumeAttachmentGetVolumeIdAttributeType(arg *VolumeAttachmentGetVolumeIdAttributeType, val VolumeAttachmentGetVolumeIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentGetVolumeIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentGetVolumeIdRetType = string - -// VolumeAttachment Object that represents a Volume attachment to a server. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachment struct { - // Delete the volume during the termination of the server. Defaults to false. - DeleteOnTermination VolumeAttachmentgetDeleteOnTerminationAttributeType `json:"deleteOnTermination,omitempty"` - // Universally Unique Identifier (UUID). - ServerId VolumeAttachmentGetServerIdAttributeType `json:"serverId,omitempty"` - // Universally Unique Identifier (UUID). - VolumeId VolumeAttachmentGetVolumeIdAttributeType `json:"volumeId,omitempty"` -} - -// NewVolumeAttachment instantiates a new VolumeAttachment 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeAttachment() *VolumeAttachment { - this := VolumeAttachment{} - return &this -} - -// NewVolumeAttachmentWithDefaults instantiates a new VolumeAttachment 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeAttachmentWithDefaults() *VolumeAttachment { - this := VolumeAttachment{} - return &this -} - -// GetDeleteOnTermination returns the DeleteOnTermination 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 *VolumeAttachment) GetDeleteOnTermination() (res VolumeAttachmentgetDeleteOnTerminationRetType) { - res, _ = o.GetDeleteOnTerminationOk() - return -} - -// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination 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 *VolumeAttachment) GetDeleteOnTerminationOk() (ret VolumeAttachmentgetDeleteOnTerminationRetType, ok bool) { - return getVolumeAttachmentgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination) -} - -// HasDeleteOnTermination 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 *VolumeAttachment) HasDeleteOnTermination() bool { - _, ok := o.GetDeleteOnTerminationOk() - return ok -} - -// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeAttachment) SetDeleteOnTermination(v VolumeAttachmentgetDeleteOnTerminationRetType) { - setVolumeAttachmentgetDeleteOnTerminationAttributeType(&o.DeleteOnTermination, v) -} - -// GetServerId returns the ServerId 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 *VolumeAttachment) GetServerId() (res VolumeAttachmentGetServerIdRetType) { - res, _ = o.GetServerIdOk() - return -} - -// GetServerIdOk returns a tuple with the ServerId 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 *VolumeAttachment) GetServerIdOk() (ret VolumeAttachmentGetServerIdRetType, ok bool) { - return getVolumeAttachmentGetServerIdAttributeTypeOk(o.ServerId) -} - -// HasServerId 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 *VolumeAttachment) HasServerId() bool { - _, ok := o.GetServerIdOk() - return ok -} - -// SetServerId gets a reference to the given string and assigns it to the ServerId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeAttachment) SetServerId(v VolumeAttachmentGetServerIdRetType) { - setVolumeAttachmentGetServerIdAttributeType(&o.ServerId, v) -} - -// GetVolumeId returns the VolumeId 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 *VolumeAttachment) GetVolumeId() (res VolumeAttachmentGetVolumeIdRetType) { - res, _ = o.GetVolumeIdOk() - return -} - -// GetVolumeIdOk returns a tuple with the VolumeId 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 *VolumeAttachment) GetVolumeIdOk() (ret VolumeAttachmentGetVolumeIdRetType, ok bool) { - return getVolumeAttachmentGetVolumeIdAttributeTypeOk(o.VolumeId) -} - -// HasVolumeId 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 *VolumeAttachment) HasVolumeId() bool { - _, ok := o.GetVolumeIdOk() - return ok -} - -// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeAttachment) SetVolumeId(v VolumeAttachmentGetVolumeIdRetType) { - setVolumeAttachmentGetVolumeIdAttributeType(&o.VolumeId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o VolumeAttachment) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVolumeAttachmentgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination); ok { - toSerialize["DeleteOnTermination"] = val - } - if val, ok := getVolumeAttachmentGetServerIdAttributeTypeOk(o.ServerId); ok { - toSerialize["ServerId"] = val - } - if val, ok := getVolumeAttachmentGetVolumeIdAttributeTypeOk(o.VolumeId); ok { - toSerialize["VolumeId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableVolumeAttachment struct { - value *VolumeAttachment - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableVolumeAttachment) Get() *VolumeAttachment { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableVolumeAttachment) Set(val *VolumeAttachment) { - 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 NullableVolumeAttachment) 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 *NullableVolumeAttachment) 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 NewNullableVolumeAttachment(val *VolumeAttachment) *NullableVolumeAttachment { - return &NullableVolumeAttachment{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 NullableVolumeAttachment) 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 *NullableVolumeAttachment) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_volume_attachment_list_response.go b/services/iaas/model_volume_attachment_list_response.go deleted file mode 100644 index 277f22a16e..0000000000 --- a/services/iaas/model_volume_attachment_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the VolumeAttachmentListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VolumeAttachmentListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentListResponseGetItemsAttributeType = *[]VolumeAttachment - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentListResponseGetItemsArgType = []VolumeAttachment - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentListResponseGetItemsRetType = []VolumeAttachment - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeAttachmentListResponseGetItemsAttributeTypeOk(arg VolumeAttachmentListResponseGetItemsAttributeType) (ret VolumeAttachmentListResponseGetItemsRetType, 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 setVolumeAttachmentListResponseGetItemsAttributeType(arg *VolumeAttachmentListResponseGetItemsAttributeType, val VolumeAttachmentListResponseGetItemsRetType) { - *arg = &val -} - -// VolumeAttachmentListResponse Volume attachment list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeAttachmentListResponse struct { - // A list containing Volume attachments of a server. - // REQUIRED - Items VolumeAttachmentListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _VolumeAttachmentListResponse VolumeAttachmentListResponse - -// NewVolumeAttachmentListResponse instantiates a new VolumeAttachmentListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeAttachmentListResponse(items VolumeAttachmentListResponseGetItemsArgType) *VolumeAttachmentListResponse { - this := VolumeAttachmentListResponse{} - setVolumeAttachmentListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewVolumeAttachmentListResponseWithDefaults instantiates a new VolumeAttachmentListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeAttachmentListResponseWithDefaults() *VolumeAttachmentListResponse { - this := VolumeAttachmentListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeAttachmentListResponse) GetItems() (ret VolumeAttachmentListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *VolumeAttachmentListResponse) GetItemsOk() (ret VolumeAttachmentListResponseGetItemsRetType, ok bool) { - return getVolumeAttachmentListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeAttachmentListResponse) SetItems(v VolumeAttachmentListResponseGetItemsRetType) { - setVolumeAttachmentListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o VolumeAttachmentListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVolumeAttachmentListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableVolumeAttachmentListResponse struct { - value *VolumeAttachmentListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableVolumeAttachmentListResponse) Get() *VolumeAttachmentListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableVolumeAttachmentListResponse) Set(val *VolumeAttachmentListResponse) { - 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 NullableVolumeAttachmentListResponse) 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 *NullableVolumeAttachmentListResponse) 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 NewNullableVolumeAttachmentListResponse(val *VolumeAttachmentListResponse) *NullableVolumeAttachmentListResponse { - return &NullableVolumeAttachmentListResponse{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 NullableVolumeAttachmentListResponse) 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 *NullableVolumeAttachmentListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_volume_attachment_list_response_test.go b/services/iaas/model_volume_attachment_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_volume_attachment_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_volume_attachment_test.go b/services/iaas/model_volume_attachment_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_volume_attachment_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_volume_encryption_parameter.go b/services/iaas/model_volume_encryption_parameter.go deleted file mode 100644 index 3296f43ab9..0000000000 --- a/services/iaas/model_volume_encryption_parameter.go +++ /dev/null @@ -1,430 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the VolumeEncryptionParameter type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VolumeEncryptionParameter{} - -/* - types and functions for kekKeyId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeEncryptionParameterGetKekKeyIdAttributeTypeOk(arg VolumeEncryptionParameterGetKekKeyIdAttributeType) (ret VolumeEncryptionParameterGetKekKeyIdRetType, 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 setVolumeEncryptionParameterGetKekKeyIdAttributeType(arg *VolumeEncryptionParameterGetKekKeyIdAttributeType, val VolumeEncryptionParameterGetKekKeyIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyIdRetType = string - -/* - types and functions for kekKeyVersion -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyVersionAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyVersionArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyVersionRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeEncryptionParameterGetKekKeyVersionAttributeTypeOk(arg VolumeEncryptionParameterGetKekKeyVersionAttributeType) (ret VolumeEncryptionParameterGetKekKeyVersionRetType, 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 setVolumeEncryptionParameterGetKekKeyVersionAttributeType(arg *VolumeEncryptionParameterGetKekKeyVersionAttributeType, val VolumeEncryptionParameterGetKekKeyVersionRetType) { - *arg = &val -} - -/* - types and functions for kekKeyringId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyringIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeEncryptionParameterGetKekKeyringIdAttributeTypeOk(arg VolumeEncryptionParameterGetKekKeyringIdAttributeType) (ret VolumeEncryptionParameterGetKekKeyringIdRetType, 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 setVolumeEncryptionParameterGetKekKeyringIdAttributeType(arg *VolumeEncryptionParameterGetKekKeyringIdAttributeType, val VolumeEncryptionParameterGetKekKeyringIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyringIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekKeyringIdRetType = string - -/* - types and functions for kekProjectId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekProjectIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeEncryptionParameterGetKekProjectIdAttributeTypeOk(arg VolumeEncryptionParameterGetKekProjectIdAttributeType) (ret VolumeEncryptionParameterGetKekProjectIdRetType, 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 setVolumeEncryptionParameterGetKekProjectIdAttributeType(arg *VolumeEncryptionParameterGetKekProjectIdAttributeType, val VolumeEncryptionParameterGetKekProjectIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekProjectIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKekProjectIdRetType = string - -/* - types and functions for keyPayload -*/ - -// isByteArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKeyPayloadAttributeType = *[]byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKeyPayloadArgType = []byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetKeyPayloadRetType = []byte - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeEncryptionParameterGetKeyPayloadAttributeTypeOk(arg VolumeEncryptionParameterGetKeyPayloadAttributeType) (ret VolumeEncryptionParameterGetKeyPayloadRetType, 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 setVolumeEncryptionParameterGetKeyPayloadAttributeType(arg *VolumeEncryptionParameterGetKeyPayloadAttributeType, val VolumeEncryptionParameterGetKeyPayloadRetType) { - *arg = &val -} - -/* - types and functions for serviceAccount -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetServiceAccountAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeEncryptionParameterGetServiceAccountAttributeTypeOk(arg VolumeEncryptionParameterGetServiceAccountAttributeType) (ret VolumeEncryptionParameterGetServiceAccountRetType, 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 setVolumeEncryptionParameterGetServiceAccountAttributeType(arg *VolumeEncryptionParameterGetServiceAccountAttributeType, val VolumeEncryptionParameterGetServiceAccountRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetServiceAccountArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameterGetServiceAccountRetType = string - -// VolumeEncryptionParameter Parameter to connect to a key-encryption-key within the STACKIT-KMS to create encrypted volumes. If no key_payload is set, a random passphrase is generated, which will be encrypted against the STACKIT-KMS. These parameter never leave the backend again. So these parameters are not in the responses. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeEncryptionParameter struct { - // Universally Unique Identifier (UUID). - // REQUIRED - KekKeyId VolumeEncryptionParameterGetKekKeyIdAttributeType `json:"kekKeyId" required:"true"` - // Version of a key within the STACKIT-KMS. - // REQUIRED - KekKeyVersion VolumeEncryptionParameterGetKekKeyVersionAttributeType `json:"kekKeyVersion" required:"true"` - // Universally Unique Identifier (UUID). - // REQUIRED - KekKeyringId VolumeEncryptionParameterGetKekKeyringIdAttributeType `json:"kekKeyringId" required:"true"` - // Universally Unique Identifier (UUID). - KekProjectId VolumeEncryptionParameterGetKekProjectIdAttributeType `json:"kekProjectId,omitempty"` - // base64 encoded secret. - KeyPayload VolumeEncryptionParameterGetKeyPayloadAttributeType `json:"keyPayload,omitempty"` - // Object that represents an e-mail address of a service account. - // REQUIRED - ServiceAccount VolumeEncryptionParameterGetServiceAccountAttributeType `json:"serviceAccount" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _VolumeEncryptionParameter VolumeEncryptionParameter - -// NewVolumeEncryptionParameter instantiates a new VolumeEncryptionParameter 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeEncryptionParameter(kekKeyId VolumeEncryptionParameterGetKekKeyIdArgType, kekKeyVersion VolumeEncryptionParameterGetKekKeyVersionArgType, kekKeyringId VolumeEncryptionParameterGetKekKeyringIdArgType, serviceAccount VolumeEncryptionParameterGetServiceAccountArgType) *VolumeEncryptionParameter { - this := VolumeEncryptionParameter{} - setVolumeEncryptionParameterGetKekKeyIdAttributeType(&this.KekKeyId, kekKeyId) - setVolumeEncryptionParameterGetKekKeyVersionAttributeType(&this.KekKeyVersion, kekKeyVersion) - setVolumeEncryptionParameterGetKekKeyringIdAttributeType(&this.KekKeyringId, kekKeyringId) - setVolumeEncryptionParameterGetServiceAccountAttributeType(&this.ServiceAccount, serviceAccount) - return &this -} - -// NewVolumeEncryptionParameterWithDefaults instantiates a new VolumeEncryptionParameter 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeEncryptionParameterWithDefaults() *VolumeEncryptionParameter { - this := VolumeEncryptionParameter{} - return &this -} - -// GetKekKeyId returns the KekKeyId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) GetKekKeyId() (ret VolumeEncryptionParameterGetKekKeyIdRetType) { - ret, _ = o.GetKekKeyIdOk() - return ret -} - -// GetKekKeyIdOk returns a tuple with the KekKeyId field value -// 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 *VolumeEncryptionParameter) GetKekKeyIdOk() (ret VolumeEncryptionParameterGetKekKeyIdRetType, ok bool) { - return getVolumeEncryptionParameterGetKekKeyIdAttributeTypeOk(o.KekKeyId) -} - -// SetKekKeyId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) SetKekKeyId(v VolumeEncryptionParameterGetKekKeyIdRetType) { - setVolumeEncryptionParameterGetKekKeyIdAttributeType(&o.KekKeyId, v) -} - -// GetKekKeyVersion returns the KekKeyVersion field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) GetKekKeyVersion() (ret VolumeEncryptionParameterGetKekKeyVersionRetType) { - ret, _ = o.GetKekKeyVersionOk() - return ret -} - -// GetKekKeyVersionOk returns a tuple with the KekKeyVersion field value -// 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 *VolumeEncryptionParameter) GetKekKeyVersionOk() (ret VolumeEncryptionParameterGetKekKeyVersionRetType, ok bool) { - return getVolumeEncryptionParameterGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion) -} - -// SetKekKeyVersion sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) SetKekKeyVersion(v VolumeEncryptionParameterGetKekKeyVersionRetType) { - setVolumeEncryptionParameterGetKekKeyVersionAttributeType(&o.KekKeyVersion, v) -} - -// GetKekKeyringId returns the KekKeyringId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) GetKekKeyringId() (ret VolumeEncryptionParameterGetKekKeyringIdRetType) { - ret, _ = o.GetKekKeyringIdOk() - return ret -} - -// GetKekKeyringIdOk returns a tuple with the KekKeyringId field value -// 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 *VolumeEncryptionParameter) GetKekKeyringIdOk() (ret VolumeEncryptionParameterGetKekKeyringIdRetType, ok bool) { - return getVolumeEncryptionParameterGetKekKeyringIdAttributeTypeOk(o.KekKeyringId) -} - -// SetKekKeyringId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) SetKekKeyringId(v VolumeEncryptionParameterGetKekKeyringIdRetType) { - setVolumeEncryptionParameterGetKekKeyringIdAttributeType(&o.KekKeyringId, v) -} - -// GetKekProjectId returns the KekProjectId 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 *VolumeEncryptionParameter) GetKekProjectId() (res VolumeEncryptionParameterGetKekProjectIdRetType) { - res, _ = o.GetKekProjectIdOk() - return -} - -// GetKekProjectIdOk returns a tuple with the KekProjectId 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 *VolumeEncryptionParameter) GetKekProjectIdOk() (ret VolumeEncryptionParameterGetKekProjectIdRetType, ok bool) { - return getVolumeEncryptionParameterGetKekProjectIdAttributeTypeOk(o.KekProjectId) -} - -// HasKekProjectId 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 *VolumeEncryptionParameter) HasKekProjectId() bool { - _, ok := o.GetKekProjectIdOk() - return ok -} - -// SetKekProjectId gets a reference to the given string and assigns it to the KekProjectId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) SetKekProjectId(v VolumeEncryptionParameterGetKekProjectIdRetType) { - setVolumeEncryptionParameterGetKekProjectIdAttributeType(&o.KekProjectId, v) -} - -// GetKeyPayload returns the KeyPayload 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 *VolumeEncryptionParameter) GetKeyPayload() (res VolumeEncryptionParameterGetKeyPayloadRetType) { - res, _ = o.GetKeyPayloadOk() - return -} - -// GetKeyPayloadOk returns a tuple with the KeyPayload 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 *VolumeEncryptionParameter) GetKeyPayloadOk() (ret VolumeEncryptionParameterGetKeyPayloadRetType, ok bool) { - return getVolumeEncryptionParameterGetKeyPayloadAttributeTypeOk(o.KeyPayload) -} - -// HasKeyPayload 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 *VolumeEncryptionParameter) HasKeyPayload() bool { - _, ok := o.GetKeyPayloadOk() - return ok -} - -// SetKeyPayload gets a reference to the given string and assigns it to the KeyPayload field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) SetKeyPayload(v VolumeEncryptionParameterGetKeyPayloadRetType) { - setVolumeEncryptionParameterGetKeyPayloadAttributeType(&o.KeyPayload, v) -} - -// GetServiceAccount returns the ServiceAccount field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) GetServiceAccount() (ret VolumeEncryptionParameterGetServiceAccountRetType) { - ret, _ = o.GetServiceAccountOk() - return ret -} - -// GetServiceAccountOk returns a tuple with the ServiceAccount field value -// 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 *VolumeEncryptionParameter) GetServiceAccountOk() (ret VolumeEncryptionParameterGetServiceAccountRetType, ok bool) { - return getVolumeEncryptionParameterGetServiceAccountAttributeTypeOk(o.ServiceAccount) -} - -// SetServiceAccount sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeEncryptionParameter) SetServiceAccount(v VolumeEncryptionParameterGetServiceAccountRetType) { - setVolumeEncryptionParameterGetServiceAccountAttributeType(&o.ServiceAccount, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o VolumeEncryptionParameter) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVolumeEncryptionParameterGetKekKeyIdAttributeTypeOk(o.KekKeyId); ok { - toSerialize["KekKeyId"] = val - } - if val, ok := getVolumeEncryptionParameterGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion); ok { - toSerialize["KekKeyVersion"] = val - } - if val, ok := getVolumeEncryptionParameterGetKekKeyringIdAttributeTypeOk(o.KekKeyringId); ok { - toSerialize["KekKeyringId"] = val - } - if val, ok := getVolumeEncryptionParameterGetKekProjectIdAttributeTypeOk(o.KekProjectId); ok { - toSerialize["KekProjectId"] = val - } - if val, ok := getVolumeEncryptionParameterGetKeyPayloadAttributeTypeOk(o.KeyPayload); ok { - toSerialize["KeyPayload"] = val - } - if val, ok := getVolumeEncryptionParameterGetServiceAccountAttributeTypeOk(o.ServiceAccount); ok { - toSerialize["ServiceAccount"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableVolumeEncryptionParameter struct { - value *VolumeEncryptionParameter - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableVolumeEncryptionParameter) Get() *VolumeEncryptionParameter { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableVolumeEncryptionParameter) Set(val *VolumeEncryptionParameter) { - 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 NullableVolumeEncryptionParameter) 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 *NullableVolumeEncryptionParameter) 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 NewNullableVolumeEncryptionParameter(val *VolumeEncryptionParameter) *NullableVolumeEncryptionParameter { - return &NullableVolumeEncryptionParameter{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 NullableVolumeEncryptionParameter) 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 *NullableVolumeEncryptionParameter) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_volume_encryption_parameter_test.go b/services/iaas/model_volume_encryption_parameter_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_volume_encryption_parameter_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_volume_list_response.go b/services/iaas/model_volume_list_response.go deleted file mode 100644 index 6fd70a8b47..0000000000 --- a/services/iaas/model_volume_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the VolumeListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VolumeListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeListResponseGetItemsAttributeType = *[]Volume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeListResponseGetItemsArgType = []Volume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeListResponseGetItemsRetType = []Volume - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeListResponseGetItemsAttributeTypeOk(arg VolumeListResponseGetItemsAttributeType) (ret VolumeListResponseGetItemsRetType, 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 setVolumeListResponseGetItemsAttributeType(arg *VolumeListResponseGetItemsAttributeType, val VolumeListResponseGetItemsRetType) { - *arg = &val -} - -// VolumeListResponse Volume list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeListResponse struct { - // A list containing volume objects. - // REQUIRED - Items VolumeListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _VolumeListResponse VolumeListResponse - -// NewVolumeListResponse instantiates a new VolumeListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeListResponse(items VolumeListResponseGetItemsArgType) *VolumeListResponse { - this := VolumeListResponse{} - setVolumeListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewVolumeListResponseWithDefaults instantiates a new VolumeListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeListResponseWithDefaults() *VolumeListResponse { - this := VolumeListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeListResponse) GetItems() (ret VolumeListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *VolumeListResponse) GetItemsOk() (ret VolumeListResponseGetItemsRetType, ok bool) { - return getVolumeListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeListResponse) SetItems(v VolumeListResponseGetItemsRetType) { - setVolumeListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o VolumeListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVolumeListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableVolumeListResponse struct { - value *VolumeListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableVolumeListResponse) Get() *VolumeListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableVolumeListResponse) Set(val *VolumeListResponse) { - 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 NullableVolumeListResponse) 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 *NullableVolumeListResponse) 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 NewNullableVolumeListResponse(val *VolumeListResponse) *NullableVolumeListResponse { - return &NullableVolumeListResponse{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 NullableVolumeListResponse) 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 *NullableVolumeListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_volume_list_response_test.go b/services/iaas/model_volume_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_volume_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_volume_performance_class.go b/services/iaas/model_volume_performance_class.go deleted file mode 100644 index 0ba93d4a22..0000000000 --- a/services/iaas/model_volume_performance_class.go +++ /dev/null @@ -1,386 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the VolumePerformanceClass type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VolumePerformanceClass{} - -/* - 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 VolumePerformanceClassGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumePerformanceClassGetDescriptionAttributeTypeOk(arg VolumePerformanceClassGetDescriptionAttributeType) (ret VolumePerformanceClassGetDescriptionRetType, 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 setVolumePerformanceClassGetDescriptionAttributeType(arg *VolumePerformanceClassGetDescriptionAttributeType, val VolumePerformanceClassGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetDescriptionRetType = string - -/* - types and functions for iops -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetIopsAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetIopsArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetIopsRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumePerformanceClassGetIopsAttributeTypeOk(arg VolumePerformanceClassGetIopsAttributeType) (ret VolumePerformanceClassGetIopsRetType, 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 setVolumePerformanceClassGetIopsAttributeType(arg *VolumePerformanceClassGetIopsAttributeType, val VolumePerformanceClassGetIopsRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetLabelsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetLabelsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetLabelsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumePerformanceClassGetLabelsAttributeTypeOk(arg VolumePerformanceClassGetLabelsAttributeType) (ret VolumePerformanceClassGetLabelsRetType, 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 setVolumePerformanceClassGetLabelsAttributeType(arg *VolumePerformanceClassGetLabelsAttributeType, val VolumePerformanceClassGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumePerformanceClassGetNameAttributeTypeOk(arg VolumePerformanceClassGetNameAttributeType) (ret VolumePerformanceClassGetNameRetType, 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 setVolumePerformanceClassGetNameAttributeType(arg *VolumePerformanceClassGetNameAttributeType, val VolumePerformanceClassGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetNameRetType = string - -/* - types and functions for throughput -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetThroughputAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetThroughputArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassGetThroughputRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumePerformanceClassGetThroughputAttributeTypeOk(arg VolumePerformanceClassGetThroughputAttributeType) (ret VolumePerformanceClassGetThroughputRetType, 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 setVolumePerformanceClassGetThroughputAttributeType(arg *VolumePerformanceClassGetThroughputAttributeType, val VolumePerformanceClassGetThroughputRetType) { - *arg = &val -} - -// VolumePerformanceClass Object that represents a Volume performance class. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClass struct { - // Description Object. Allows string up to 255 Characters. - 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. - Labels VolumePerformanceClassGetLabelsAttributeType `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. - // REQUIRED - Name VolumePerformanceClassGetNameAttributeType `json:"name" required:"true"` - // Throughput in Megabyte per second. - Throughput VolumePerformanceClassGetThroughputAttributeType `json:"throughput,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _VolumePerformanceClass VolumePerformanceClass - -// NewVolumePerformanceClass instantiates a new VolumePerformanceClass 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumePerformanceClass(name VolumePerformanceClassGetNameArgType) *VolumePerformanceClass { - this := VolumePerformanceClass{} - setVolumePerformanceClassGetNameAttributeType(&this.Name, name) - return &this -} - -// NewVolumePerformanceClassWithDefaults instantiates a new VolumePerformanceClass 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumePerformanceClassWithDefaults() *VolumePerformanceClass { - this := VolumePerformanceClass{} - 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 *VolumePerformanceClass) GetDescription() (res VolumePerformanceClassGetDescriptionRetType) { - 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 *VolumePerformanceClass) GetDescriptionOk() (ret VolumePerformanceClassGetDescriptionRetType, ok bool) { - return getVolumePerformanceClassGetDescriptionAttributeTypeOk(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 *VolumePerformanceClass) 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 *VolumePerformanceClass) SetDescription(v VolumePerformanceClassGetDescriptionRetType) { - setVolumePerformanceClassGetDescriptionAttributeType(&o.Description, v) -} - -// GetIops returns the Iops 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 *VolumePerformanceClass) GetIops() (res VolumePerformanceClassGetIopsRetType) { - res, _ = o.GetIopsOk() - return -} - -// GetIopsOk returns a tuple with the Iops 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 *VolumePerformanceClass) GetIopsOk() (ret VolumePerformanceClassGetIopsRetType, ok bool) { - return getVolumePerformanceClassGetIopsAttributeTypeOk(o.Iops) -} - -// HasIops 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 *VolumePerformanceClass) HasIops() bool { - _, ok := o.GetIopsOk() - return ok -} - -// SetIops gets a reference to the given int64 and assigns it to the Iops field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClass) SetIops(v VolumePerformanceClassGetIopsRetType) { - setVolumePerformanceClassGetIopsAttributeType(&o.Iops, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClass) GetLabels() (res VolumePerformanceClassGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClass) GetLabelsOk() (ret VolumePerformanceClassGetLabelsRetType, ok bool) { - return getVolumePerformanceClassGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClass) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClass) SetLabels(v VolumePerformanceClassGetLabelsRetType) { - setVolumePerformanceClassGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClass) GetName() (ret VolumePerformanceClassGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// 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 *VolumePerformanceClass) GetNameOk() (ret VolumePerformanceClassGetNameRetType, ok bool) { - return getVolumePerformanceClassGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClass) SetName(v VolumePerformanceClassGetNameRetType) { - setVolumePerformanceClassGetNameAttributeType(&o.Name, v) -} - -// GetThroughput returns the Throughput 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 *VolumePerformanceClass) GetThroughput() (res VolumePerformanceClassGetThroughputRetType) { - res, _ = o.GetThroughputOk() - return -} - -// GetThroughputOk returns a tuple with the Throughput 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 *VolumePerformanceClass) GetThroughputOk() (ret VolumePerformanceClassGetThroughputRetType, ok bool) { - return getVolumePerformanceClassGetThroughputAttributeTypeOk(o.Throughput) -} - -// HasThroughput 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 *VolumePerformanceClass) HasThroughput() bool { - _, ok := o.GetThroughputOk() - return ok -} - -// SetThroughput gets a reference to the given int64 and assigns it to the Throughput field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClass) SetThroughput(v VolumePerformanceClassGetThroughputRetType) { - setVolumePerformanceClassGetThroughputAttributeType(&o.Throughput, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o VolumePerformanceClass) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVolumePerformanceClassGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getVolumePerformanceClassGetIopsAttributeTypeOk(o.Iops); ok { - toSerialize["Iops"] = val - } - if val, ok := getVolumePerformanceClassGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getVolumePerformanceClassGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getVolumePerformanceClassGetThroughputAttributeTypeOk(o.Throughput); ok { - toSerialize["Throughput"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableVolumePerformanceClass struct { - value *VolumePerformanceClass - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableVolumePerformanceClass) Get() *VolumePerformanceClass { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableVolumePerformanceClass) Set(val *VolumePerformanceClass) { - 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 NullableVolumePerformanceClass) 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 *NullableVolumePerformanceClass) 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 NewNullableVolumePerformanceClass(val *VolumePerformanceClass) *NullableVolumePerformanceClass { - return &NullableVolumePerformanceClass{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 NullableVolumePerformanceClass) 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 *NullableVolumePerformanceClass) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_volume_performance_class_list_response.go b/services/iaas/model_volume_performance_class_list_response.go deleted file mode 100644 index 168e392f57..0000000000 --- a/services/iaas/model_volume_performance_class_list_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the VolumePerformanceClassListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VolumePerformanceClassListResponse{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassListResponseGetItemsAttributeType = *[]VolumePerformanceClass - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassListResponseGetItemsArgType = []VolumePerformanceClass - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassListResponseGetItemsRetType = []VolumePerformanceClass - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumePerformanceClassListResponseGetItemsAttributeTypeOk(arg VolumePerformanceClassListResponseGetItemsAttributeType) (ret VolumePerformanceClassListResponseGetItemsRetType, 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 setVolumePerformanceClassListResponseGetItemsAttributeType(arg *VolumePerformanceClassListResponseGetItemsAttributeType, val VolumePerformanceClassListResponseGetItemsRetType) { - *arg = &val -} - -// VolumePerformanceClassListResponse Volume performance class list response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumePerformanceClassListResponse struct { - // A list containing Volume performance classes. - // REQUIRED - Items VolumePerformanceClassListResponseGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _VolumePerformanceClassListResponse VolumePerformanceClassListResponse - -// NewVolumePerformanceClassListResponse instantiates a new VolumePerformanceClassListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumePerformanceClassListResponse(items VolumePerformanceClassListResponseGetItemsArgType) *VolumePerformanceClassListResponse { - this := VolumePerformanceClassListResponse{} - setVolumePerformanceClassListResponseGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewVolumePerformanceClassListResponseWithDefaults instantiates a new VolumePerformanceClassListResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumePerformanceClassListResponseWithDefaults() *VolumePerformanceClassListResponse { - this := VolumePerformanceClassListResponse{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClassListResponse) GetItems() (ret VolumePerformanceClassListResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// 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 *VolumePerformanceClassListResponse) GetItemsOk() (ret VolumePerformanceClassListResponseGetItemsRetType, ok bool) { - return getVolumePerformanceClassListResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumePerformanceClassListResponse) SetItems(v VolumePerformanceClassListResponseGetItemsRetType) { - setVolumePerformanceClassListResponseGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o VolumePerformanceClassListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVolumePerformanceClassListResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableVolumePerformanceClassListResponse struct { - value *VolumePerformanceClassListResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableVolumePerformanceClassListResponse) Get() *VolumePerformanceClassListResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableVolumePerformanceClassListResponse) Set(val *VolumePerformanceClassListResponse) { - 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 NullableVolumePerformanceClassListResponse) 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 *NullableVolumePerformanceClassListResponse) 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 NewNullableVolumePerformanceClassListResponse(val *VolumePerformanceClassListResponse) *NullableVolumePerformanceClassListResponse { - return &NullableVolumePerformanceClassListResponse{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 NullableVolumePerformanceClassListResponse) 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 *NullableVolumePerformanceClassListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_volume_performance_class_list_response_test.go b/services/iaas/model_volume_performance_class_list_response_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_volume_performance_class_list_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_volume_performance_class_test.go b/services/iaas/model_volume_performance_class_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_volume_performance_class_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_volume_source.go b/services/iaas/model_volume_source.go deleted file mode 100644 index f9d8e42555..0000000000 --- a/services/iaas/model_volume_source.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package iaas - -import ( - "encoding/json" -) - -// checks if the VolumeSource type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VolumeSource{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeSourceGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeSourceGetIdAttributeTypeOk(arg VolumeSourceGetIdAttributeType) (ret VolumeSourceGetIdRetType, 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 setVolumeSourceGetIdAttributeType(arg *VolumeSourceGetIdAttributeType, val VolumeSourceGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeSourceGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeSourceGetIdRetType = string - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeSourceGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getVolumeSourceGetTypeAttributeTypeOk(arg VolumeSourceGetTypeAttributeType) (ret VolumeSourceGetTypeRetType, 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 setVolumeSourceGetTypeAttributeType(arg *VolumeSourceGetTypeAttributeType, val VolumeSourceGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeSourceGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeSourceGetTypeRetType = string - -// VolumeSource The source object of a volume. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type VolumeSource struct { - // Universally Unique Identifier (UUID). - // REQUIRED - Id VolumeSourceGetIdAttributeType `json:"id" required:"true"` - // The source types of a volume. Possible values: `image`, `volume`, `snapshot`, `backup`. - // REQUIRED - Type VolumeSourceGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _VolumeSource VolumeSource - -// NewVolumeSource instantiates a new VolumeSource 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeSource(id VolumeSourceGetIdArgType, types VolumeSourceGetTypeArgType) *VolumeSource { - this := VolumeSource{} - setVolumeSourceGetIdAttributeType(&this.Id, id) - setVolumeSourceGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewVolumeSourceWithDefaults instantiates a new VolumeSource 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewVolumeSourceWithDefaults() *VolumeSource { - this := VolumeSource{} - return &this -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeSource) GetId() (ret VolumeSourceGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// 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 *VolumeSource) GetIdOk() (ret VolumeSourceGetIdRetType, ok bool) { - return getVolumeSourceGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeSource) SetId(v VolumeSourceGetIdRetType) { - setVolumeSourceGetIdAttributeType(&o.Id, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeSource) GetType() (ret VolumeSourceGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// 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 *VolumeSource) GetTypeOk() (ret VolumeSourceGetTypeRetType, ok bool) { - return getVolumeSourceGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *VolumeSource) SetType(v VolumeSourceGetTypeRetType) { - setVolumeSourceGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o VolumeSource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVolumeSourceGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getVolumeSourceGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableVolumeSource struct { - value *VolumeSource - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableVolumeSource) Get() *VolumeSource { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableVolumeSource) Set(val *VolumeSource) { - 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 NullableVolumeSource) 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 *NullableVolumeSource) 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 NewNullableVolumeSource(val *VolumeSource) *NullableVolumeSource { - return &NullableVolumeSource{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 NullableVolumeSource) 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 *NullableVolumeSource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_volume_source_test.go b/services/iaas/model_volume_source_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_volume_source_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/model_volume_test.go b/services/iaas/model_volume_test.go deleted file mode 100644 index 603b159888..0000000000 --- a/services/iaas/model_volume_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas 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/package.go b/services/iaas/package.go new file mode 100644 index 0000000000..f59aec4f67 --- /dev/null +++ b/services/iaas/package.go @@ -0,0 +1 @@ +package iaas diff --git a/services/iaas/utils.go b/services/iaas/utils.go deleted file mode 100644 index 8779e69e6b..0000000000 --- a/services/iaas/utils.go +++ /dev/null @@ -1,466 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas - -import ( - "encoding/json" - "math/rand" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrTime(v time.Time) *time.Time { return &v } - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableValue[T any] struct { - value *T - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableValue[T]) Get() *T { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableValue[T]) Set(val *T) { - 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 NullableValue[T]) 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 *NullableValue[T]) 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 -type NullableBool struct { - value *bool - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBool) Get() *bool { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBool) Set(val *bool) { - 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 NullableBool) 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 *NullableBool) 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 NewNullableBool(val *bool) *NullableBool { - return &NullableBool{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 NullableBool) 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 *NullableBool) 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 NullableInt struct { - value *int - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt) Get() *int { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt) Set(val *int) { - 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 NullableInt) 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 *NullableInt) 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 NewNullableInt(val *int) *NullableInt { - return &NullableInt{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 NullableInt) 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 *NullableInt) 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 NullableInt32 struct { - value *int32 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt32) Get() *int32 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt32) Set(val *int32) { - 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 NullableInt32) 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 *NullableInt32) 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 NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{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 NullableInt32) 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 *NullableInt32) 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 NullableInt64 struct { - value *int64 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt64) Get() *int64 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt64) Set(val *int64) { - 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 NullableInt64) 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 *NullableInt64) 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 NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{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 NullableInt64) 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 *NullableInt64) 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 NullableFloat32 struct { - value *float32 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFloat32) Get() *float32 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFloat32) Set(val *float32) { - 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 NullableFloat32) 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 *NullableFloat32) 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 NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{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 NullableFloat32) 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 *NullableFloat32) 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 NullableFloat64 struct { - value *float64 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFloat64) Get() *float64 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFloat64) Set(val *float64) { - 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 NullableFloat64) 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 *NullableFloat64) 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 NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{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 NullableFloat64) 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 *NullableFloat64) 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 NullableString struct { - value *string - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableString) Get() *string { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableString) Set(val *string) { - 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 NullableString) 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 *NullableString) 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 NewNullableString(val *string) *NullableString { - return &NullableString{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 NullableString) 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 *NullableString) 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 NullableTime struct { - value *time.Time - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTime) Get() *time.Time { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTime) Set(val *time.Time) { - 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 NullableTime) 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 *NullableTime) 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 NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{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 NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func IsNil(i interface{}) bool { - if i == nil { - return true - } - if t, ok := i.(interface{ IsSet() bool }); ok { - return !t.IsSet() - } - 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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - -// randString returns a random string with a specified length. It panics if n <= 0. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func randString(n int) string { - b := make([]byte, n) - for i := range b { - b[i] = letterRunes[rand.Intn(len(letterRunes))] - } - return string(b) -} 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/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]+)*$"` diff --git a/services/iaas/wait/deprecation.go b/services/iaas/wait/deprecation.go deleted file mode 100644 index 58f184c093..0000000000 --- a/services/iaas/wait/deprecation.go +++ /dev/null @@ -1,2 +0,0 @@ -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package wait diff --git a/services/iaas/wait/wait.go b/services/iaas/wait/wait.go deleted file mode 100644 index 7ca34512f0..0000000000 --- a/services/iaas/wait/wait.go +++ /dev/null @@ -1,852 +0,0 @@ -package wait - -import ( - "context" - "errors" - "fmt" - "net/http" - "strings" - "time" - - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" - "github.com/stackitcloud/stackit-sdk-go/core/wait" - "github.com/stackitcloud/stackit-sdk-go/services/iaas" - "github.com/stackitcloud/stackit-sdk-go/services/resourcemanager" -) - -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateSuccess = "CREATED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - VolumeAvailableStatus = "AVAILABLE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DeleteSuccess = "DELETED" - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ErrorStatus = "ERROR" - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ServerActiveStatus = "ACTIVE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ServerResizingStatus = "RESIZING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ServerInactiveStatus = "INACTIVE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ServerDeallocatedStatus = "DEALLOCATED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ServerRescueStatus = "RESCUE" - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ImageAvailableStatus = "AVAILABLE" - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RequestCreateAction = "CREATE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RequestUpdateAction = "UPDATE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RequestDeleteAction = "DELETE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RequestCreatedStatus = "CREATED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RequestUpdatedStatus = "UPDATED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RequestDeletedStatus = "DELETED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RequestFailedStatus = "FAILED" - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - XRequestIDHeader = "X-Request-Id" - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - BackupAvailableStatus = "AVAILABLE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - BackupRestoringStatus = "RESTORING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - BackupDeletingStatus = "DELETING" - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - SnapshotAvailableStatus = "AVAILABLE" -) - -// Interfaces needed for tests -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type APIClientInterface interface { - GetNetworkAreaExecute(ctx context.Context, organizationId, areaId string) (*iaas.NetworkArea, error) - GetNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) (*iaas.RegionalArea, error) - ListNetworkAreaProjectsExecute(ctx context.Context, organizationId, areaId string) (*iaas.ProjectListResponse, error) - GetProjectRequestExecute(ctx context.Context, projectId, region, requestId string) (*iaas.Request, error) - GetNetworkExecute(ctx context.Context, projectId, region, networkId string) (*iaas.Network, error) - GetVolumeExecute(ctx context.Context, projectId, region, volumeId string) (*iaas.Volume, error) - GetServerExecute(ctx context.Context, projectId, region, serverId string) (*iaas.Server, error) - GetAttachedVolumeExecute(ctx context.Context, projectId, region, serverId, volumeId string) (*iaas.VolumeAttachment, error) - GetImageExecute(ctx context.Context, projectId, region, imageId string) (*iaas.Image, error) - GetBackupExecute(ctx context.Context, projectId, region, backupId string) (*iaas.Backup, error) - GetSnapshotExecute(ctx context.Context, projectId, region, snapshotId string) (*iaas.Snapshot, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResourceManagerAPIClientInterface interface { - GetProjectExecute(ctx context.Context, id string) (*resourcemanager.GetProjectResponse, error) -} - -// CreateNetworkAreaRegionWaitHandler will wait for network area region creation -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateNetworkAreaRegionWaitHandler(ctx context.Context, a APIClientInterface, organizationId, areaId, region string) *wait.AsyncActionHandler[iaas.RegionalArea] { - handler := wait.New(func() (waitFinished bool, response *iaas.RegionalArea, err error) { - area, err := a.GetNetworkAreaRegionExecute(ctx, organizationId, areaId, region) - if err != nil { - return false, area, err - } - if area.Status == nil { - return false, nil, fmt.Errorf("configuring failed for network area with id %s, the response is not valid: the status are missing", areaId) - } - // The state returns to "CREATED" after a successful update is completed - if *area.Status == CreateSuccess { - return true, area, nil - } - return false, area, nil - }) - handler.SetSleepBeforeWait(2 * time.Second) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// DeleteNetworkAreaRegionWaitHandler will wait for network area region deletion -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteNetworkAreaRegionWaitHandler(ctx context.Context, a APIClientInterface, organizationId, areaId, region string) *wait.AsyncActionHandler[iaas.RegionalArea] { - handler := wait.New(func() (waitFinished bool, response *iaas.RegionalArea, err error) { - area, err := a.GetNetworkAreaRegionExecute(ctx, organizationId, areaId, region) - if err == nil { - return false, nil, nil - } - var oapiErr *oapierror.GenericOpenAPIError - ok := errors.As(err, &oapiErr) - if !ok { - return false, area, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err) - } - // The IaaS API response with a 400 if the regional network area configuration doesn't exist because of some compatible - // issue to v1. When v1 is deleted, they may, will respond with 404. - if oapiErr.StatusCode == http.StatusBadRequest || oapiErr.StatusCode == http.StatusNotFound { - return true, area, nil - } - return false, nil, err - }) - handler.SetSleepBeforeWait(2 * time.Second) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// ReadyForNetworkAreaDeletionWaitHandler will wait until a deletion of network area is possible -// Workaround for https://github.com/stackitcloud/terraform-provider-stackit/issues/907. -// When the deletion for a project is triggered, the backend starts a workflow in the background which cleans up all resources -// within a project and deletes the project in each service. When the project is attached to an SNA, the SNA can't be -// deleted until the workflow inform the IaaS-API that the project is deleted. -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func ReadyForNetworkAreaDeletionWaitHandler(ctx context.Context, a APIClientInterface, r ResourceManagerAPIClientInterface, organizationId, areaId string) *wait.AsyncActionHandler[iaas.ProjectListResponse] { - handler := wait.New(func() (waitFinished bool, response *iaas.ProjectListResponse, err error) { - projectList, err := a.ListNetworkAreaProjectsExecute(ctx, organizationId, areaId) - if err != nil { - return false, projectList, err - } - if projectList == nil || projectList.Items == nil { - return false, nil, fmt.Errorf("read failed for projects in network area with id %s, the response is not valid: the items are missing", areaId) - } - if len(*projectList.Items) == 0 { - return true, projectList, nil - } - var activeProjects, forbiddenProjects []string - for _, projectId := range *projectList.Items { - _, err := r.GetProjectExecute(ctx, projectId) - if err == nil { - activeProjects = append(activeProjects, projectId) - continue - } - var oapiErr *oapierror.GenericOpenAPIError - ok := errors.As(err, &oapiErr) - if !ok { - return false, nil, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError") - } - // The resource manager api responds with StatusForbidden(=403) when a project is deleted or if the project does not exist - if oapiErr.StatusCode == http.StatusNotFound || oapiErr.StatusCode == http.StatusForbidden { - forbiddenProjects = append(forbiddenProjects, projectId) - } - } - if len(activeProjects) > 0 { - return false, nil, fmt.Errorf("network area with id %s has still active projects: %s", areaId, strings.Join(activeProjects, ",")) - } - if len(forbiddenProjects) > 0 { - return false, nil, nil - } - return true, projectList, nil - }) - handler.SetTimeout(1 * time.Minute) - return handler -} - -// CreateNetworkWaitHandler will wait for network creation using network id -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateNetworkWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, networkId string) *wait.AsyncActionHandler[iaas.Network] { - handler := wait.New(func() (waitFinished bool, response *iaas.Network, err error) { - network, err := a.GetNetworkExecute(ctx, projectId, region, networkId) - if err != nil { - return false, network, err - } - if network.Id == nil || network.Status == nil { - return false, network, fmt.Errorf("crate failed for network with id %s, the response is not valid: the id or the state are missing", networkId) - } - // The state returns to "CREATED" after a successful creation is completed - if *network.Id == networkId && *network.Status == CreateSuccess { - return true, network, nil - } - return false, network, nil - }) - handler.SetSleepBeforeWait(2 * time.Second) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// UpdateNetworkWaitHandler will wait for network update -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func UpdateNetworkWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, networkId string) *wait.AsyncActionHandler[iaas.Network] { - handler := wait.New(func() (waitFinished bool, response *iaas.Network, err error) { - network, err := a.GetNetworkExecute(ctx, projectId, region, networkId) - if err != nil { - return false, network, err - } - if network.Id == nil || network.Status == nil { - return false, network, fmt.Errorf("update failed for network with id %s, the response is not valid: the id or the state are missing", networkId) - } - // The state returns to "CREATED" after a successful update is completed - if *network.Id == networkId && *network.Status == CreateSuccess { - return true, network, nil - } - return false, network, nil - }) - handler.SetSleepBeforeWait(2 * time.Second) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// DeleteNetworkWaitHandler will wait for network deletion -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteNetworkWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, networkId string) *wait.AsyncActionHandler[iaas.Network] { - handler := wait.New(func() (waitFinished bool, response *iaas.Network, err error) { - network, err := a.GetNetworkExecute(ctx, projectId, region, networkId) - if err == nil { - return false, nil, nil - } - oapiErr, ok := err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped - if !ok { - return false, network, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err) - } - if oapiErr.StatusCode != http.StatusNotFound { - return false, network, err - } - return true, nil, nil - }) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// CreateVolumeWaitHandler will wait for volume creation -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateVolumeWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, volumeId string) *wait.AsyncActionHandler[iaas.Volume] { - handler := wait.New(func() (waitFinished bool, response *iaas.Volume, err error) { - volume, err := a.GetVolumeExecute(ctx, projectId, region, volumeId) - if err != nil { - return false, volume, err - } - if volume.Id == nil || volume.Status == nil { - return false, volume, fmt.Errorf("create failed for volume with id %s, the response is not valid: the id or the status are missing", volumeId) - } - if *volume.Id == volumeId && *volume.Status == VolumeAvailableStatus { - return true, volume, nil - } - if *volume.Id == volumeId && *volume.Status == ErrorStatus { - return true, volume, fmt.Errorf("create failed for volume with id %s", volumeId) - } - return false, volume, nil - }) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// DeleteVolumeWaitHandler will wait for volume deletion -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteVolumeWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, volumeId string) *wait.AsyncActionHandler[iaas.Volume] { - handler := wait.New(func() (waitFinished bool, response *iaas.Volume, err error) { - volume, err := a.GetVolumeExecute(ctx, projectId, region, volumeId) - if err == nil { - if volume != nil { - if volume.Id == nil || volume.Status == nil { - return false, volume, fmt.Errorf("delete failed for volume with id %s, the response is not valid: the id or the status are missing", volumeId) - } - if *volume.Id == volumeId && *volume.Status == DeleteSuccess { - return true, volume, nil - } - } - return false, nil, nil - } - oapiErr, ok := err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped - if !ok { - return false, volume, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err) - } - if oapiErr.StatusCode != http.StatusNotFound { - return false, volume, err - } - return true, nil, nil - }) - handler.SetTimeout(30 * time.Minute) - return handler -} - -// CreateServerWaitHandler will wait for server creation -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server] { - handler := wait.New(func() (waitFinished bool, response *iaas.Server, err error) { - server, err := a.GetServerExecute(ctx, projectId, region, serverId) - if err != nil { - return false, server, err - } - if server.Id == nil || server.Status == nil { - return false, server, fmt.Errorf("create failed for server with id %s, the response is not valid: the id or the status are missing", serverId) - } - if *server.Id == serverId && *server.Status == ServerActiveStatus { - return true, server, nil - } - if *server.Id == serverId && *server.Status == ErrorStatus { - if server.ErrorMessage != nil { - return true, server, fmt.Errorf("create failed for server with id %s: %s", serverId, *server.ErrorMessage) - } - return true, server, fmt.Errorf("create failed for server with id %s", serverId) - } - return false, server, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// ResizeServerWaitHandler will wait for server resize -// It checks for an intermediate resizing status and only then waits for the server to become active -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func ResizeServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) (h *wait.AsyncActionHandler[iaas.Server]) { - handler := wait.New(func() (waitFinished bool, response *iaas.Server, err error) { - server, err := a.GetServerExecute(ctx, projectId, region, serverId) - if err != nil { - return false, server, err - } - - if server.Id == nil || server.Status == nil { - return false, server, fmt.Errorf("resizing failed for server with id %s, the response is not valid: the id or the status are missing", serverId) - } - - if *server.Id == serverId && *server.Status == ErrorStatus { - if server.ErrorMessage != nil { - return true, server, fmt.Errorf("resizing failed for server with id %s: %s", serverId, *server.ErrorMessage) - } - return true, server, fmt.Errorf("resizing failed for server with id %s", serverId) - } - - if !h.IntermediateStateReached { - if *server.Id == serverId && *server.Status == ServerResizingStatus { - h.IntermediateStateReached = true - return false, server, nil - } - return false, server, nil - } - - if *server.Id == serverId && *server.Status == ServerActiveStatus { - return true, server, nil - } - - return false, server, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// DeleteServerWaitHandler will wait for volume deletion -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server] { - handler := wait.New(func() (waitFinished bool, response *iaas.Server, err error) { - server, err := a.GetServerExecute(ctx, projectId, region, serverId) - if err == nil { - if server != nil { - if server.Id == nil || server.Status == nil { - return false, server, fmt.Errorf("delete failed for server with id %s, the response is not valid: the id or the status are missing", serverId) - } - if *server.Id == serverId && *server.Status == DeleteSuccess { - return true, server, nil - } - } - return false, nil, nil - } - oapiErr, ok := err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped - if !ok { - return false, server, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err) - } - if oapiErr.StatusCode != http.StatusNotFound { - return false, server, err - } - return true, nil, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// StartServerWaitHandler will wait for server start -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func StartServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server] { - handler := wait.New(func() (waitFinished bool, response *iaas.Server, err error) { - server, err := a.GetServerExecute(ctx, projectId, region, serverId) - if err != nil { - return false, server, err - } - if server.Id == nil || server.Status == nil { - return false, server, fmt.Errorf("start failed for server with id %s, the response is not valid: the id or the status are missing", serverId) - } - if *server.Id == serverId && *server.Status == ServerActiveStatus { - return true, server, nil - } - if *server.Id == serverId && *server.Status == ErrorStatus { - if server.ErrorMessage != nil { - return true, server, fmt.Errorf("start failed for server with id %s: %s", serverId, *server.ErrorMessage) - } - return true, server, fmt.Errorf("start failed for server with id %s", serverId) - } - return false, server, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// StopServerWaitHandler will wait for server stop -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func StopServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server] { - handler := wait.New(func() (waitFinished bool, response *iaas.Server, err error) { - server, err := a.GetServerExecute(ctx, projectId, region, serverId) - if err != nil { - return false, server, err - } - if server.Id == nil || server.Status == nil { - return false, server, fmt.Errorf("stop failed for server with id %s, the response is not valid: the id or the status are missing", serverId) - } - if *server.Id == serverId && *server.Status == ServerInactiveStatus { - return true, server, nil - } - if *server.Id == serverId && *server.Status == ErrorStatus { - if server.ErrorMessage != nil { - return true, server, fmt.Errorf("stop failed for server with id %s: %s", serverId, *server.ErrorMessage) - } - return true, server, fmt.Errorf("stop failed for server with id %s", serverId) - } - return false, server, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// DeallocateServerWaitHandler will wait for server deallocation -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeallocateServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server] { - handler := wait.New(func() (waitFinished bool, response *iaas.Server, err error) { - server, err := a.GetServerExecute(ctx, projectId, region, serverId) - if err != nil { - return false, server, err - } - if server.Id == nil || server.Status == nil { - return false, server, fmt.Errorf("deallocate failed for server with id %s, the response is not valid: the id or the status are missing", serverId) - } - if *server.Id == serverId && *server.Status == ServerDeallocatedStatus { - return true, server, nil - } - if *server.Id == serverId && *server.Status == ErrorStatus { - if server.ErrorMessage != nil { - return true, server, fmt.Errorf("deallocate failed for server with id %s: %s", serverId, *server.ErrorMessage) - } - return true, server, fmt.Errorf("deallocate failed for server with id %s", serverId) - } - return false, server, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// RescueServerWaitHandler will wait for server rescue -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func RescueServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server] { - handler := wait.New(func() (waitFinished bool, response *iaas.Server, err error) { - server, err := a.GetServerExecute(ctx, projectId, region, serverId) - if err != nil { - return false, server, err - } - if server.Id == nil || server.Status == nil { - return false, server, fmt.Errorf("rescue failed for server with id %s, the response is not valid: the id or the status are missing", serverId) - } - if *server.Id == serverId && *server.Status == ServerRescueStatus { - return true, server, nil - } - if *server.Id == serverId && *server.Status == ErrorStatus { - if server.ErrorMessage != nil { - return true, server, fmt.Errorf("rescue failed for server with id %s: %s", serverId, *server.ErrorMessage) - } - return true, server, fmt.Errorf("rescue failed for server with id %s", serverId) - } - return false, server, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// UnrescueServerWaitHandler will wait for server unrescue -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func UnrescueServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server] { - handler := wait.New(func() (waitFinished bool, response *iaas.Server, err error) { - server, err := a.GetServerExecute(ctx, projectId, region, serverId) - if err != nil { - return false, server, err - } - if server.Id == nil || server.Status == nil { - return false, server, fmt.Errorf("unrescue failed for server with id %s, the response is not valid: the id or the status are missing", serverId) - } - if *server.Id == serverId && *server.Status == ServerActiveStatus { - return true, server, nil - } - if *server.Id == serverId && *server.Status == ErrorStatus { - if server.ErrorMessage != nil { - return true, server, fmt.Errorf("unrescue failed for server with id %s: %s", serverId, *server.ErrorMessage) - } - return true, server, fmt.Errorf("unrescue failed for server with id %s", serverId) - } - return false, server, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// ProjectRequestWaitHandler will wait for a request to succeed. -// -// It receives a request ID that can be obtained from the "X-Request-Id" header in the HTTP response of any operation in the IaaS API. -// To get this response header, use the "runtime.WithCaptureHTTPResponse" method from the "core" package to get the raw HTTP response of an SDK operation. -// Then, the value of the request ID can be obtained by accessing the header key which is defined in the constant "XRequestIDHeader" of this package. -// -// Example usage: -// -// var httpResp *http.Response -// ctxWithHTTPResp := runtime.WithCaptureHTTPResponse(context.Background(), &httpResp) -// -// err = iaasClient.AddPublicIpToServer(ctxWithHTTPResp, projectId, serverId, publicIpId).Execute() -// -// requestId := httpResp.Header[wait.XRequestIDHeader][0] -// _, err = wait.ProjectRequestWaitHandler(context.Background(), iaasClient, projectId, requestId).WaitWithContext(context.Background()) -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func ProjectRequestWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, requestId string) *wait.AsyncActionHandler[iaas.Request] { - handler := wait.New(func() (waitFinished bool, response *iaas.Request, err error) { - request, err := a.GetProjectRequestExecute(ctx, projectId, region, requestId) - if err != nil { - return false, request, err - } - - if request == nil { - return false, nil, fmt.Errorf("request failed for request with id %s: nil response from GetProjectRequestExecute", requestId) - } - - if request.RequestId == nil || request.RequestAction == nil || request.Status == nil { - return false, request, fmt.Errorf("request failed for request with id %s, the response is not valid: the id, the request action or the status are missing", requestId) - } - - if *request.RequestId != requestId { - return false, request, fmt.Errorf("request failed for request with id %s: the response id doesn't match the request id", requestId) - } - - switch *request.RequestAction { - case RequestCreateAction: - if *request.Status == RequestCreatedStatus { - return true, request, nil - } - case RequestUpdateAction: - if *request.Status == RequestUpdatedStatus { - return true, request, nil - } - case RequestDeleteAction: - if *request.Status == RequestDeletedStatus { - return true, request, nil - } - default: - return false, request, fmt.Errorf("request failed for request with id %s, the request action %s is not supported", requestId, *request.RequestAction) - } - - if *request.Status == RequestFailedStatus { - return true, request, fmt.Errorf("request failed for request with id %s", requestId) - } - - return false, request, nil - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// AddVolumeToServerWaitHandler will wait for a volume to be attached to a server -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func AddVolumeToServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId, volumeId string) *wait.AsyncActionHandler[iaas.VolumeAttachment] { - handler := wait.New(func() (waitFinished bool, response *iaas.VolumeAttachment, err error) { - volumeAttachment, err := a.GetAttachedVolumeExecute(ctx, projectId, region, serverId, volumeId) - if err == nil { - if volumeAttachment != nil { - if volumeAttachment.VolumeId == nil { - return false, volumeAttachment, fmt.Errorf("attachment failed for server with id %s and volume with id %s, the response is not valid: the volume id is missing", serverId, volumeId) - } - if *volumeAttachment.VolumeId == volumeId { - return true, volumeAttachment, nil - } - } - return false, nil, nil - } - oapiErr, ok := err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped - if !ok { - return false, volumeAttachment, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err) - } - if oapiErr.StatusCode != http.StatusNotFound { - return false, volumeAttachment, err - } - return false, nil, nil - }) - handler.SetTimeout(15 * time.Minute) - return handler -} - -// RemoveVolumeFromServerWaitHandler will wait for a volume to be attached to a server -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func RemoveVolumeFromServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId, volumeId string) *wait.AsyncActionHandler[iaas.VolumeAttachment] { - handler := wait.New(func() (waitFinished bool, response *iaas.VolumeAttachment, err error) { - volumeAttachment, err := a.GetAttachedVolumeExecute(ctx, projectId, region, serverId, volumeId) - if err == nil { - if volumeAttachment != nil { - if volumeAttachment.VolumeId == nil { - return false, volumeAttachment, fmt.Errorf("remove volume failed for server with id %s and volume with id %s, the response is not valid: the volume id is missing", serverId, volumeId) - } - } - return false, nil, nil - } - oapiErr, ok := err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped - if !ok { - return false, volumeAttachment, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err) - } - if oapiErr.StatusCode != http.StatusNotFound { - return false, volumeAttachment, err - } - return true, nil, nil - }) - handler.SetTimeout(15 * time.Minute) - return handler -} - -// UploadImageWaitHandler will wait for the status image to become AVAILABLE, which indicates the upload of the image has been completed successfully -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func UploadImageWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, imageId string) *wait.AsyncActionHandler[iaas.Image] { - handler := wait.New(func() (waitFinished bool, response *iaas.Image, err error) { - image, err := a.GetImageExecute(ctx, projectId, region, imageId) - if err != nil { - return false, image, err - } - if image.Id == nil || image.Status == nil { - return false, image, fmt.Errorf("upload failed for image with id %s, the response is not valid: the id or the status are missing", imageId) - } - if *image.Id == imageId && *image.Status == ImageAvailableStatus { - return true, image, nil - } - if *image.Id == imageId && *image.Status == ErrorStatus { - return true, image, fmt.Errorf("upload failed for image with id %s", imageId) - } - return false, image, nil - }) - handler.SetTimeout(45 * time.Minute) - return handler -} - -// DeleteImageWaitHandler will wait for image deletion -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteImageWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, imageId string) *wait.AsyncActionHandler[iaas.Image] { - handler := wait.New(func() (waitFinished bool, response *iaas.Image, err error) { - image, err := a.GetImageExecute(ctx, projectId, region, imageId) - if err == nil { - if image != nil { - if image.Id == nil || image.Status == nil { - return false, image, fmt.Errorf("delete failed for image with id %s, the response is not valid: the id or the status are missing", imageId) - } - if *image.Id == imageId && *image.Status == DeleteSuccess { - return true, image, nil - } - } - return false, nil, nil - } - oapiErr, ok := err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped - if !ok { - return false, image, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err) - } - if oapiErr.StatusCode != http.StatusNotFound { - return false, image, err - } - return true, nil, nil - }) - handler.SetTimeout(15 * time.Minute) - return handler -} - -// CreateBackupWaitHandler will wait for backup creation -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateBackupWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, backupId string) *wait.AsyncActionHandler[iaas.Backup] { - handler := wait.New(func() (waitFinished bool, response *iaas.Backup, err error) { - backup, err := a.GetBackupExecute(ctx, projectId, region, backupId) - if err == nil { - if backup != nil { - if backup.Id == nil || backup.Status == nil { - return false, backup, fmt.Errorf("create failed for backup with id %s, the response is not valid: the id or the status are missing", backupId) - } - if *backup.Id == backupId && *backup.Status == BackupAvailableStatus { - return true, backup, nil - } - if *backup.Id == backupId && *backup.Status == ErrorStatus { - return true, backup, fmt.Errorf("create failed for backup with id %s", backupId) - } - } - return false, nil, nil - } - return false, nil, err - }) - handler.SetTimeout(45 * time.Minute) - return handler -} - -// DeleteBackupWaitHandler will wait for backup deletion -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteBackupWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, backupId string) *wait.AsyncActionHandler[iaas.Backup] { - handler := wait.New(func() (waitFinished bool, response *iaas.Backup, err error) { - backup, err := a.GetBackupExecute(ctx, projectId, region, backupId) - if err == nil { - if backup != nil { - if backup.Id == nil || backup.Status == nil { - return false, backup, fmt.Errorf("delete failed for backup with id %s, the response is not valid: the id or the status are missing", backupId) - } - if *backup.Id == backupId && *backup.Status == DeleteSuccess { - return true, backup, nil - } - } - return false, nil, nil - } - var oapiError *oapierror.GenericOpenAPIError - if errors.As(err, &oapiError) { - if statusCode := oapiError.StatusCode; statusCode == http.StatusNotFound || statusCode == http.StatusGone { - return true, nil, nil - } - } - return false, nil, err - }) - handler.SetTimeout(20 * time.Minute) - return handler -} - -// RestoreBackupWaitHandler will wait for backup restoration -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func RestoreBackupWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, backupId string) *wait.AsyncActionHandler[iaas.Backup] { - handler := wait.New(func() (waitFinished bool, response *iaas.Backup, err error) { - backup, err := a.GetBackupExecute(ctx, projectId, region, backupId) - if err == nil { - if backup != nil { - if backup.Id == nil || backup.Status == nil { - return false, backup, fmt.Errorf("restore failed for backup with id %s, the response is not valid: the id or the status are missing", backupId) - } - if *backup.Id == backupId && *backup.Status == BackupAvailableStatus { - return true, backup, nil - } - if *backup.Id == backupId && *backup.Status == ErrorStatus { - return true, backup, fmt.Errorf("restore failed for backup with id %s", backupId) - } - } - return false, nil, nil - } - return false, nil, err - }) - handler.SetTimeout(45 * time.Minute) - return handler -} - -// CreateSnapshotWaitHandler will wait for snapshot creation -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateSnapshotWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, snapshotId string) *wait.AsyncActionHandler[iaas.Snapshot] { - handler := wait.New(func() (waitFinished bool, response *iaas.Snapshot, err error) { - snapshot, err := a.GetSnapshotExecute(ctx, projectId, region, snapshotId) - if err == nil { - if snapshot != nil { - if snapshot.Id == nil || snapshot.Status == nil { - return false, snapshot, fmt.Errorf("create failed for snapshot with id %s, the response is not valid: the id or the status are missing", snapshotId) - } - if *snapshot.Id == snapshotId && *snapshot.Status == SnapshotAvailableStatus { - return true, snapshot, nil - } - if *snapshot.Id == snapshotId && *snapshot.Status == ErrorStatus { - return true, snapshot, fmt.Errorf("create failed for snapshot with id %s", snapshotId) - } - } - return false, nil, nil - } - return false, nil, err - }) - handler.SetTimeout(45 * time.Minute) - return handler -} - -// DeleteSnapshotWaitHandler will wait for snapshot deletion -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteSnapshotWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, snapshotId string) *wait.AsyncActionHandler[iaas.Snapshot] { - handler := wait.New(func() (waitFinished bool, response *iaas.Snapshot, err error) { - snapshot, err := a.GetSnapshotExecute(ctx, projectId, region, snapshotId) - if err == nil { - if snapshot != nil { - if snapshot.Id == nil || snapshot.Status == nil { - return false, snapshot, fmt.Errorf("delete failed for snapshot with id %s, the response is not valid: the id or the status are missing", snapshotId) - } - if *snapshot.Id == snapshotId && *snapshot.Status == DeleteSuccess { - return true, snapshot, nil - } - } - return false, nil, nil - } - var oapiError *oapierror.GenericOpenAPIError - if errors.As(err, &oapiError) { - if statusCode := oapiError.StatusCode; statusCode == http.StatusNotFound || statusCode == http.StatusGone { - return true, nil, nil - } - } - return false, nil, err - }) - handler.SetTimeout(20 * time.Minute) - return handler -} diff --git a/services/iaas/wait/wait_test.go b/services/iaas/wait/wait_test.go deleted file mode 100644 index 60a71eb812..0000000000 --- a/services/iaas/wait/wait_test.go +++ /dev/null @@ -1,2051 +0,0 @@ -package wait - -import ( - "context" - "net/http" - "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/services/iaas" - "github.com/stackitcloud/stackit-sdk-go/services/resourcemanager" -) - -type apiClientMocked struct { - getNetworkAreaRegionFails bool - getNetworkAreaFails bool - getNetworkFails bool - getProjectRequestFails bool - isDeleted bool - resourceState string - getVolumeFails bool - getServerFails bool - getAttachedVolumeFails bool - getImageFails bool - getBackupFails bool - isAttached bool - requestAction string - returnResizing bool - getSnapshotFails bool - listProjectsResponses []listProjectsResponses - listProjectsResponsesIdx int -} - -type listProjectsResponses struct { - resp *iaas.ProjectListResponse - err error -} - -type resourceManagerClientMocked struct { - getProjectResponses []getProjectResponse - getProjectResponsesIdx int -} - -type getProjectResponse struct { - resp *resourcemanager.GetProjectResponse - err error -} - -func (r *resourceManagerClientMocked) GetProjectExecute(_ context.Context, _ string) (*resourcemanager.GetProjectResponse, error) { - resp := r.getProjectResponses[r.getProjectResponsesIdx].resp - err := r.getProjectResponses[r.getProjectResponsesIdx].err - r.getProjectResponsesIdx = (r.getProjectResponsesIdx + 1) % len(r.getProjectResponses) - return resp, err -} - -func (a *apiClientMocked) ListNetworkAreaProjectsExecute(_ context.Context, _, _ string) (*iaas.ProjectListResponse, error) { - resp := a.listProjectsResponses[a.listProjectsResponsesIdx].resp - err := a.listProjectsResponses[a.listProjectsResponsesIdx].err - a.listProjectsResponsesIdx = (a.listProjectsResponsesIdx + 1) % len(a.listProjectsResponses) - return resp, err -} - -func (a *apiClientMocked) GetNetworkAreaExecute(_ context.Context, _, _ string) (*iaas.NetworkArea, error) { - if a.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if a.getNetworkAreaFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.NetworkArea{ - Id: utils.Ptr("naid"), - }, nil -} - -func (a *apiClientMocked) GetNetworkAreaRegionExecute(_ context.Context, _, _, _ string) (*iaas.RegionalArea, error) { - if a.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if a.getNetworkAreaRegionFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.RegionalArea{ - Status: &a.resourceState, - }, nil -} - -func (a *apiClientMocked) GetNetworkExecute(_ context.Context, _, _, _ string) (*iaas.Network, error) { - if a.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if a.getNetworkFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.Network{ - Id: utils.Ptr("nid"), - Status: &a.resourceState, - }, nil -} - -func (a *apiClientMocked) GetProjectRequestExecute(_ context.Context, _, _, _ string) (*iaas.Request, error) { - if a.getProjectRequestFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.Request{ - RequestId: utils.Ptr("rid"), - RequestAction: &a.requestAction, - Status: &a.resourceState, - }, nil -} - -func (a *apiClientMocked) GetVolumeExecute(_ context.Context, _, _, _ string) (*iaas.Volume, error) { - if a.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if a.getVolumeFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.Volume{ - Id: utils.Ptr("vid"), - Status: &a.resourceState, - }, nil -} - -func (a *apiClientMocked) GetServerExecute(_ context.Context, _, _, _ string) (*iaas.Server, error) { - if a.returnResizing { - a.returnResizing = false - return &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(ServerResizingStatus), - }, nil - } - - if a.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if a.getServerFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.Server{ - Id: utils.Ptr("sid"), - Status: &a.resourceState, - }, nil -} - -func (a *apiClientMocked) GetAttachedVolumeExecute(_ context.Context, _, _, _, _ string) (*iaas.VolumeAttachment, error) { - if a.getAttachedVolumeFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - if !a.isAttached { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - return &iaas.VolumeAttachment{ - ServerId: utils.Ptr("sid"), - VolumeId: utils.Ptr("vid"), - }, nil -} - -func (a *apiClientMocked) GetImageExecute(_ context.Context, _, _, _ string) (*iaas.Image, error) { - if a.getImageFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - if a.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - return &iaas.Image{ - Id: utils.Ptr("iid"), - Status: &a.resourceState, - }, nil -} - -func (a *apiClientMocked) GetBackupExecute(_ context.Context, _, _, _ string) (*iaas.Backup, error) { - if a.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if a.getBackupFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.Backup{ - Id: utils.Ptr("bid"), - Status: &a.resourceState, - }, nil -} - -func (a *apiClientMocked) GetSnapshotExecute(_ context.Context, _, _, _ string) (*iaas.Snapshot, error) { - if a.isDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - if a.getSnapshotFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - return &iaas.Snapshot{ - Id: utils.Ptr("sid"), - Status: &a.resourceState, - }, nil -} - -func TestCreateNetworkWaitHandler(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 := &apiClientMocked{ - getNetworkFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Network - if tt.wantResp { - wantRes = &iaas.Network{ - Id: utils.Ptr("nid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := CreateNetworkWaitHandler(context.Background(), apiClient, "pid", "region", "nid") - - 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 !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestUpdateNetworkWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "update_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 := &apiClientMocked{ - getNetworkFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Network - if tt.wantResp { - wantRes = &iaas.Network{ - Id: utils.Ptr("nid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := UpdateNetworkWaitHandler(context.Background(), apiClient, "pid", "region", "nid") - - 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 !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestDeleteNetworkWaitHandler(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 := &apiClientMocked{ - getNetworkFails: tt.getFails, - isDeleted: tt.isDeleted, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Network - if tt.wantResp { - wantRes = &iaas.Network{ - Id: utils.Ptr("nid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := DeleteNetworkWaitHandler(context.Background(), apiClient, "pid", "region", "nid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestCreateVolumeWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "create_succeeded", - getFails: false, - resourceState: VolumeAvailableStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getVolumeFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Volume - if tt.wantResp { - wantRes = &iaas.Volume{ - Id: utils.Ptr("vid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := CreateVolumeWaitHandler(context.Background(), apiClient, "pid", "region", "vid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestDeleteVolumeWaitHandler(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 Status", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getVolumeFails: tt.getFails, - isDeleted: tt.isDeleted, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Volume - if tt.wantResp { - wantRes = &iaas.Volume{ - Id: utils.Ptr("vid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := DeleteVolumeWaitHandler(context.Background(), apiClient, "pid", "region", "vid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestCreateServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "create_succeeded", - getFails: false, - resourceState: ServerActiveStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getServerFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Server - if tt.wantResp { - wantRes = &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := CreateServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestDeleteServerWaitHandler(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 Status", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getServerFails: tt.getFails, - isDeleted: tt.isDeleted, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Server - if tt.wantResp { - wantRes = &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := DeleteServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestResizeServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - returnResizing bool - finalResourceState string - wantErr bool - wantResp bool - }{ - { - desc: "resize_succeeded", - getFails: false, - returnResizing: true, - finalResourceState: ServerActiveStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "resizing_status_is_never_returned", - getFails: false, - returnResizing: false, - finalResourceState: ServerActiveStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - returnResizing: true, - finalResourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - finalResourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - finalResourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getServerFails: tt.getFails, - resourceState: tt.finalResourceState, - returnResizing: tt.returnResizing, - } - - var wantRes *iaas.Server - if tt.wantResp { - wantRes = &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.finalResourceState), - } - } - - handler := ResizeServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - - gotRes, err := handler.WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestStartServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "start_succeeded", - getFails: false, - resourceState: ServerActiveStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getServerFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Server - if tt.wantResp { - wantRes = &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := StartServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestStopServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "stop_succeeded", - getFails: false, - resourceState: ServerInactiveStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getServerFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Server - if tt.wantResp { - wantRes = &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := StopServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestDeallocateServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "deallocate_succeeded", - getFails: false, - resourceState: ServerDeallocatedStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getServerFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Server - if tt.wantResp { - wantRes = &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := DeallocateServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestRescueServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "rescue_succeeded", - getFails: false, - resourceState: ServerRescueStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getServerFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Server - if tt.wantResp { - wantRes = &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := RescueServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestUnrescueServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "unrescue_succeeded", - getFails: false, - resourceState: ServerActiveStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getServerFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Server - if tt.wantResp { - wantRes = &iaas.Server{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := UnrescueServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestProjectRequestWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - requestState string - requestAction string - wantErr bool - wantResp bool - }{ - { - desc: "create_succeeded", - getFails: false, - requestAction: RequestCreateAction, - requestState: RequestCreatedStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "update_succeeded", - getFails: false, - requestAction: RequestUpdateAction, - requestState: RequestUpdatedStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "delete_succeeded", - getFails: false, - requestAction: RequestDeleteAction, - requestState: RequestDeletedStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "unsupported_action", - getFails: false, - requestAction: "OTHER_ACTION", - wantErr: true, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - requestAction: RequestCreateAction, - requestState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - requestState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - requestAction: RequestCreateAction, - requestState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getProjectRequestFails: tt.getFails, - requestAction: tt.requestAction, - resourceState: tt.requestState, - } - - var wantRes *iaas.Request - if tt.wantResp { - wantRes = &iaas.Request{ - RequestId: utils.Ptr("rid"), - RequestAction: utils.Ptr(tt.requestAction), - Status: utils.Ptr(tt.requestState), - } - } - - handler := ProjectRequestWaitHandler(context.Background(), apiClient, "pid", "region", "rid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestAddVolumeToServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - isAttached bool - wantErr bool - wantResp bool - }{ - { - desc: "attachment_succeeded", - getFails: false, - isAttached: true, - wantErr: false, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - isAttached: false, - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getAttachedVolumeFails: tt.getFails, - isAttached: tt.isAttached, - } - - var wantRes *iaas.VolumeAttachment - if tt.wantResp { - wantRes = &iaas.VolumeAttachment{ - ServerId: utils.Ptr("sid"), - VolumeId: utils.Ptr("vid"), - } - } - - handler := AddVolumeToServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid", "vid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestRemoveVolumeFromServerWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - isAttached bool - wantErr bool - wantResp bool - }{ - { - desc: "removal_succeeded", - getFails: false, - isAttached: false, - wantErr: false, - wantResp: false, - }, - { - desc: "get_fails", - getFails: true, - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - isAttached: true, - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getAttachedVolumeFails: tt.getFails, - isAttached: tt.isAttached, - } - - var wantRes *iaas.VolumeAttachment - if tt.wantResp { - wantRes = &iaas.VolumeAttachment{ - ServerId: utils.Ptr("sid"), - VolumeId: utils.Ptr("vid"), - } - } - - handler := RemoveVolumeFromServerWaitHandler(context.Background(), apiClient, "pid", "region", "sid", "vid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestUploadImageWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "upload_succeeded", - getFails: false, - resourceState: ImageAvailableStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - wantResp: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getImageFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Image - if tt.wantResp { - wantRes = &iaas.Image{ - Id: utils.Ptr("iid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := UploadImageWaitHandler(context.Background(), apiClient, "pid", "region", "iid") - - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestDeleteImageWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - isDeleted bool - resourceState string - wantErr bool - }{ - { - desc: "delete_succeeded", - getFails: false, - isDeleted: true, - wantErr: false, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER Status", - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getImageFails: tt.getFails, - isDeleted: tt.isDeleted, - resourceState: tt.resourceState, - } - - handler := DeleteImageWaitHandler(context.Background(), apiClient, "pid", "region", "iid") - - _, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - }) - }) - } -} - -func TestCreateBackupWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "create_succeeded", - getFails: false, - resourceState: BackupAvailableStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER_STATUS", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getBackupFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Backup - if tt.wantResp { - wantRes = &iaas.Backup{ - Id: utils.Ptr("bid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := CreateBackupWaitHandler(context.Background(), apiClient, "pid", "region", "bid") - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestDeleteBackupWaitHandler(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_STATUS", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getBackupFails: tt.getFails, - isDeleted: tt.isDeleted, - resourceState: tt.resourceState, - } - - handler := DeleteBackupWaitHandler(context.Background(), apiClient, "pid", "region", "bid") - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if gotRes != nil { - t.Fatalf("handler gotRes = %v, want nil", gotRes) - } - }) - }) - } -} - -func TestRestoreBackupWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "restore_succeeded", - getFails: false, - resourceState: BackupAvailableStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER_STATUS", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getBackupFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Backup - if tt.wantResp { - wantRes = &iaas.Backup{ - Id: utils.Ptr("bid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := RestoreBackupWaitHandler(context.Background(), apiClient, "pid", "region", "bid") - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestCreateSnapshotWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "create_succeeded", - getFails: false, - resourceState: SnapshotAvailableStatus, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: true, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER_STATUS", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getSnapshotFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Snapshot - if tt.wantResp { - wantRes = &iaas.Snapshot{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := CreateSnapshotWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestDeleteSnapshotWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - resourceState string - wantErr bool - wantResp bool - }{ - { - desc: "delete_succeeded", - getFails: false, - resourceState: DeleteSuccess, - wantErr: false, - wantResp: true, - }, - { - desc: "error_status", - getFails: false, - resourceState: ErrorStatus, - wantErr: true, - wantResp: false, - }, - { - desc: "get_fails", - getFails: true, - resourceState: "", - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - getFails: false, - resourceState: "ANOTHER_STATUS", - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getSnapshotFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.Snapshot - if tt.wantResp { - wantRes = &iaas.Snapshot{ - Id: utils.Ptr("sid"), - Status: utils.Ptr(tt.resourceState), - } - } - - handler := DeleteSnapshotWaitHandler(context.Background(), apiClient, "pid", "region", "sid") - gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -func TestReadyForNetworkAreaDeletionWaitHandler(t *testing.T) { - tests := []struct { - desc string - listProjectsResponses []listProjectsResponses - getProjectResponses []getProjectResponse - wantErr bool - wantResp bool - }{ - { - desc: "projects still active", - listProjectsResponses: []listProjectsResponses{ - { - resp: &iaas.ProjectListResponse{ - Items: utils.Ptr([]string{"project1", "project2"}), - }, - err: nil, - }, - }, - getProjectResponses: []getProjectResponse{ - {&resourcemanager.GetProjectResponse{}, nil}, - {&resourcemanager.GetProjectResponse{}, nil}, - }, - wantErr: true, - wantResp: false, - }, - { - desc: "no projects - ready for deletion", - listProjectsResponses: []listProjectsResponses{ - { - resp: &iaas.ProjectListResponse{ - Items: utils.Ptr([]string{}), - }, - err: nil, - }, - }, - getProjectResponses: []getProjectResponse{}, - wantErr: false, - wantResp: true, - }, - { - desc: "projects in deletion state", - listProjectsResponses: []listProjectsResponses{ - { - resp: &iaas.ProjectListResponse{ - Items: utils.Ptr([]string{"project1", "project2"}), - }, - err: nil, - }, - { - resp: &iaas.ProjectListResponse{ - Items: utils.Ptr([]string{}), - }, - err: nil, - }, - }, - getProjectResponses: []getProjectResponse{ - {nil, oapierror.NewError(http.StatusForbidden, "")}, - {nil, oapierror.NewError(http.StatusForbidden, "")}, - }, - wantErr: false, - wantResp: true, - }, - { - desc: "network area includes one active project", - listProjectsResponses: []listProjectsResponses{ - { - resp: &iaas.ProjectListResponse{ - Items: utils.Ptr([]string{"project1", "project2", "project3"}), - }, - err: nil, - }, - }, - getProjectResponses: []getProjectResponse{ - {nil, oapierror.NewError(http.StatusForbidden, "")}, - {nil, oapierror.NewError(http.StatusForbidden, "")}, - {&resourcemanager.GetProjectResponse{}, nil}, - }, - wantErr: true, - wantResp: false, - }, - { - desc: "network area not found", - listProjectsResponses: []listProjectsResponses{ - { - resp: nil, - err: oapierror.NewError(http.StatusNotFound, "not found"), - }, - }, - getProjectResponses: []getProjectResponse{}, - wantErr: true, - wantResp: false, - }, - { - desc: "network area items is nil", - listProjectsResponses: []listProjectsResponses{ - { - resp: &iaas.ProjectListResponse{ - Items: nil, - }, - }, - }, - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - listProjectsResponses: []listProjectsResponses{ - { - resp: &iaas.ProjectListResponse{ - Items: utils.Ptr([]string{"project1"}), - }, - err: nil, - }, - }, - getProjectResponses: []getProjectResponse{ - {nil, oapierror.NewError(http.StatusForbidden, "")}, - }, - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - listProjectsResponses: tt.listProjectsResponses, - } - - rmApiClient := &resourceManagerClientMocked{ - getProjectResponses: tt.getProjectResponses, - } - - var wantRes *iaas.ProjectListResponse - if tt.wantResp { - wantRes = tt.listProjectsResponses[len(tt.listProjectsResponses)-1].resp - } - - handler := ReadyForNetworkAreaDeletionWaitHandler(context.Background(), apiClient, rmApiClient, "oid", "aid") - gotRes, err := handler.WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -} - -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 := &apiClientMocked{ - getNetworkAreaRegionFails: tt.getFails, - resourceState: tt.resourceState, - } - - var wantRes *iaas.RegionalArea - if tt.wantResp { - wantRes = &iaas.RegionalArea{ - Status: utils.Ptr(tt.resourceState), - } - } - - handler := CreateNetworkAreaRegionWaitHandler(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 !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 := &apiClientMocked{ - getNetworkAreaRegionFails: tt.getFails, - isDeleted: tt.isDeleted, - resourceState: tt.resourceState, - } - - var wantRes *iaas.RegionalArea - if tt.wantResp { - wantRes = &iaas.RegionalArea{ - Status: utils.Ptr(tt.resourceState), - } - } - - handler := DeleteNetworkAreaRegionWaitHandler(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 !cmp.Equal(gotRes, wantRes) { - t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) - } - }) - }) - } -}