From 7f153493ed3fdbe387a125b2015746037c8f5b0f Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 16 Oct 2026 09:59:52 +0000 Subject: [PATCH] Generate loadbalancer --- .../loadbalancer/.openapi-generator/VERSION | 1 - services/loadbalancer/api_default.go | 2517 ----------------- services/loadbalancer/client.go | 632 ----- services/loadbalancer/configuration.go | 40 - services/loadbalancer/go.mod | 2 +- services/loadbalancer/go.sum | 4 +- .../loadbalancer/model_active_health_check.go | 508 ---- .../model_active_health_check_test.go | 11 - .../model_create_credentials_payload.go | 270 -- .../model_create_credentials_payload_test.go | 11 - .../model_create_credentials_response.go | 151 - .../model_create_credentials_response_test.go | 11 - .../model_create_load_balancer_payload.go | 1163 -------- ...er_payload_load_balancer_security_group.go | 211 -- ...yload_load_balancer_security_group_test.go | 11 - ..._balancer_payload_target_security_group.go | 211 -- ...ncer_payload_target_security_group_test.go | 11 - ...model_create_load_balancer_payload_test.go | 79 - .../model_credentials_response.go | 329 --- .../model_credentials_response_test.go | 11 - .../model_get_credentials_response.go | 151 - .../model_get_credentials_response_test.go | 11 - .../loadbalancer/model_get_quota_response.go | 451 --- .../model_get_quota_response_test.go | 11 - .../loadbalancer/model_google_protobuf_any.go | 161 -- .../model_google_protobuf_any_test.go | 11 - .../loadbalancer/model_http_health_checks.go | 269 -- .../model_http_health_checks_test.go | 11 - .../model_list_credentials_response.go | 151 - .../model_list_credentials_response_test.go | 11 - .../model_list_load_balancers_response.go | 210 -- ...model_list_load_balancers_response_test.go | 11 - .../loadbalancer/model_list_plans_response.go | 151 - .../model_list_plans_response_test.go | 11 - services/loadbalancer/model_listener.go | 693 ----- services/loadbalancer/model_listener_test.go | 79 - services/loadbalancer/model_load_balancer.go | 1163 -------- .../loadbalancer/model_load_balancer_error.go | 365 --- .../model_load_balancer_error_test.go | 135 - .../model_load_balancer_options.go | 326 --- .../model_load_balancer_options_test.go | 11 - .../loadbalancer/model_load_balancer_test.go | 79 - ...odel_loadbalancer_option_access_control.go | 152 - ...loadbalancer_option_access_control_test.go | 11 - .../model_loadbalancer_option_logs.go | 211 -- .../model_loadbalancer_option_logs_test.go | 11 - .../model_loadbalancer_option_metrics.go | 211 -- .../model_loadbalancer_option_metrics_test.go | 11 - ...model_loadbalancer_option_observability.go | 209 -- ..._loadbalancer_option_observability_test.go | 11 - services/loadbalancer/model_network.go | 338 --- services/loadbalancer/model_network_test.go | 72 - services/loadbalancer/model_options_tcp.go | 152 - .../loadbalancer/model_options_tcp_test.go | 11 - services/loadbalancer/model_options_udp.go | 152 - .../loadbalancer/model_options_udp_test.go | 11 - services/loadbalancer/model_plan_details.go | 448 --- .../loadbalancer/model_plan_details_test.go | 11 - services/loadbalancer/model_security_group.go | 211 -- .../loadbalancer/model_security_group_test.go | 11 - .../model_server_name_indicator.go | 152 - .../model_server_name_indicator_test.go | 11 - .../loadbalancer/model_session_persistence.go | 152 - .../model_session_persistence_test.go | 11 - services/loadbalancer/model_status.go | 271 -- services/loadbalancer/model_status_test.go | 11 - services/loadbalancer/model_target.go | 211 -- services/loadbalancer/model_target_pool.go | 387 --- .../loadbalancer/model_target_pool_test.go | 11 - services/loadbalancer/model_target_test.go | 11 - services/loadbalancer/model_tls_config.go | 270 -- .../loadbalancer/model_tls_config_test.go | 11 - .../model_update_credentials_payload.go | 270 -- .../model_update_credentials_payload_test.go | 11 - .../model_update_credentials_response.go | 151 - .../model_update_credentials_response_test.go | 11 - .../model_update_load_balancer_payload.go | 1163 -------- ...model_update_load_balancer_payload_test.go | 79 - .../model_update_target_pool_payload.go | 387 --- .../model_update_target_pool_payload_test.go | 11 - services/loadbalancer/oas_commit | 2 +- services/loadbalancer/package.go | 1 + services/loadbalancer/utils.go | 466 --- services/loadbalancer/wait/deprecation.go | 2 - services/loadbalancer/wait/wait.go | 98 - services/loadbalancer/wait/wait_test.go | 168 -- 86 files changed, 5 insertions(+), 17224 deletions(-) delete mode 100644 services/loadbalancer/.openapi-generator/VERSION delete mode 100644 services/loadbalancer/api_default.go delete mode 100644 services/loadbalancer/client.go delete mode 100644 services/loadbalancer/configuration.go delete mode 100644 services/loadbalancer/model_active_health_check.go delete mode 100644 services/loadbalancer/model_active_health_check_test.go delete mode 100644 services/loadbalancer/model_create_credentials_payload.go delete mode 100644 services/loadbalancer/model_create_credentials_payload_test.go delete mode 100644 services/loadbalancer/model_create_credentials_response.go delete mode 100644 services/loadbalancer/model_create_credentials_response_test.go delete mode 100644 services/loadbalancer/model_create_load_balancer_payload.go delete mode 100644 services/loadbalancer/model_create_load_balancer_payload_load_balancer_security_group.go delete mode 100644 services/loadbalancer/model_create_load_balancer_payload_load_balancer_security_group_test.go delete mode 100644 services/loadbalancer/model_create_load_balancer_payload_target_security_group.go delete mode 100644 services/loadbalancer/model_create_load_balancer_payload_target_security_group_test.go delete mode 100644 services/loadbalancer/model_create_load_balancer_payload_test.go delete mode 100644 services/loadbalancer/model_credentials_response.go delete mode 100644 services/loadbalancer/model_credentials_response_test.go delete mode 100644 services/loadbalancer/model_get_credentials_response.go delete mode 100644 services/loadbalancer/model_get_credentials_response_test.go delete mode 100644 services/loadbalancer/model_get_quota_response.go delete mode 100644 services/loadbalancer/model_get_quota_response_test.go delete mode 100644 services/loadbalancer/model_google_protobuf_any.go delete mode 100644 services/loadbalancer/model_google_protobuf_any_test.go delete mode 100644 services/loadbalancer/model_http_health_checks.go delete mode 100644 services/loadbalancer/model_http_health_checks_test.go delete mode 100644 services/loadbalancer/model_list_credentials_response.go delete mode 100644 services/loadbalancer/model_list_credentials_response_test.go delete mode 100644 services/loadbalancer/model_list_load_balancers_response.go delete mode 100644 services/loadbalancer/model_list_load_balancers_response_test.go delete mode 100644 services/loadbalancer/model_list_plans_response.go delete mode 100644 services/loadbalancer/model_list_plans_response_test.go delete mode 100644 services/loadbalancer/model_listener.go delete mode 100644 services/loadbalancer/model_listener_test.go delete mode 100644 services/loadbalancer/model_load_balancer.go delete mode 100644 services/loadbalancer/model_load_balancer_error.go delete mode 100644 services/loadbalancer/model_load_balancer_error_test.go delete mode 100644 services/loadbalancer/model_load_balancer_options.go delete mode 100644 services/loadbalancer/model_load_balancer_options_test.go delete mode 100644 services/loadbalancer/model_load_balancer_test.go delete mode 100644 services/loadbalancer/model_loadbalancer_option_access_control.go delete mode 100644 services/loadbalancer/model_loadbalancer_option_access_control_test.go delete mode 100644 services/loadbalancer/model_loadbalancer_option_logs.go delete mode 100644 services/loadbalancer/model_loadbalancer_option_logs_test.go delete mode 100644 services/loadbalancer/model_loadbalancer_option_metrics.go delete mode 100644 services/loadbalancer/model_loadbalancer_option_metrics_test.go delete mode 100644 services/loadbalancer/model_loadbalancer_option_observability.go delete mode 100644 services/loadbalancer/model_loadbalancer_option_observability_test.go delete mode 100644 services/loadbalancer/model_network.go delete mode 100644 services/loadbalancer/model_network_test.go delete mode 100644 services/loadbalancer/model_options_tcp.go delete mode 100644 services/loadbalancer/model_options_tcp_test.go delete mode 100644 services/loadbalancer/model_options_udp.go delete mode 100644 services/loadbalancer/model_options_udp_test.go delete mode 100644 services/loadbalancer/model_plan_details.go delete mode 100644 services/loadbalancer/model_plan_details_test.go delete mode 100644 services/loadbalancer/model_security_group.go delete mode 100644 services/loadbalancer/model_security_group_test.go delete mode 100644 services/loadbalancer/model_server_name_indicator.go delete mode 100644 services/loadbalancer/model_server_name_indicator_test.go delete mode 100644 services/loadbalancer/model_session_persistence.go delete mode 100644 services/loadbalancer/model_session_persistence_test.go delete mode 100644 services/loadbalancer/model_status.go delete mode 100644 services/loadbalancer/model_status_test.go delete mode 100644 services/loadbalancer/model_target.go delete mode 100644 services/loadbalancer/model_target_pool.go delete mode 100644 services/loadbalancer/model_target_pool_test.go delete mode 100644 services/loadbalancer/model_target_test.go delete mode 100644 services/loadbalancer/model_tls_config.go delete mode 100644 services/loadbalancer/model_tls_config_test.go delete mode 100644 services/loadbalancer/model_update_credentials_payload.go delete mode 100644 services/loadbalancer/model_update_credentials_payload_test.go delete mode 100644 services/loadbalancer/model_update_credentials_response.go delete mode 100644 services/loadbalancer/model_update_credentials_response_test.go delete mode 100644 services/loadbalancer/model_update_load_balancer_payload.go delete mode 100644 services/loadbalancer/model_update_load_balancer_payload_test.go delete mode 100644 services/loadbalancer/model_update_target_pool_payload.go delete mode 100644 services/loadbalancer/model_update_target_pool_payload_test.go create mode 100644 services/loadbalancer/package.go delete mode 100644 services/loadbalancer/utils.go delete mode 100644 services/loadbalancer/wait/deprecation.go delete mode 100644 services/loadbalancer/wait/wait.go delete mode 100644 services/loadbalancer/wait/wait_test.go diff --git a/services/loadbalancer/.openapi-generator/VERSION b/services/loadbalancer/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/services/loadbalancer/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/services/loadbalancer/api_default.go b/services/loadbalancer/api_default.go deleted file mode 100644 index 4cf049903f..0000000000 --- a/services/loadbalancer/api_default.go +++ /dev/null @@ -1,2517 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -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 { - /* - CreateCredentials Create credentials for observability of the Load Balancer - Created credentials can be stored and used for the load balancer observability. For example, when using STACKIT - Observability, credentials first must be created for that STACKIT Observability instance (by using their API or the - STACKIT Portal) and then can be provided to the load balancer by storing them with this endpoint. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiCreateCredentialsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateCredentials(ctx context.Context, projectId string, region string) ApiCreateCredentialsRequest - /* - CreateCredentialsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return CreateCredentialsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateCredentialsExecute(ctx context.Context, projectId string, region string) (*CreateCredentialsResponse, error) - /* - CreateLoadBalancer Create a load balancer in a project - Create Load Balancer will create a load balancer. - The default load balancing algorithm is round robin unless useSourceIpAddress in session persistence is enabled for a target pool then it is Maglev. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiCreateLoadBalancerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateLoadBalancer(ctx context.Context, projectId string, region string) ApiCreateLoadBalancerRequest - /* - CreateLoadBalancerExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return LoadBalancer - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateLoadBalancerExecute(ctx context.Context, projectId string, region string) (*LoadBalancer, error) - /* - DeleteCredentials Delete a single credential in a project. - Delete Credential - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiDeleteCredentialsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiDeleteCredentialsRequest - /* - DeleteCredentialsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return map[string]interface{} - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteCredentialsExecute(ctx context.Context, projectId string, region string, credentialsRef string) (map[string]interface{}, error) - /* - DeleteLoadBalancer Delete a given load balancer in a project. - DeleteLoadBalancer will delete a given load balancer. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiDeleteLoadBalancerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiDeleteLoadBalancerRequest - /* - DeleteLoadBalancerExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return map[string]interface{} - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteLoadBalancerExecute(ctx context.Context, projectId string, region string, name string) (map[string]interface{}, error) - /* - GetCredentials Get a single credential reference in a project. - Get Credentials - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiGetCredentialsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiGetCredentialsRequest - /* - GetCredentialsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return GetCredentialsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetCredentialsExecute(ctx context.Context, projectId string, region string, credentialsRef string) (*GetCredentialsResponse, error) - /* - GetLoadBalancer Get a single load balancer in a project. - Get Load Balancer will get a single load balancer of a project. This contains all the information set during - creation or updates. Additionally, it will have information about the state of the load balancer in the form - of a status field and error description feedback. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiGetLoadBalancerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiGetLoadBalancerRequest - /* - GetLoadBalancerExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return LoadBalancer - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetLoadBalancerExecute(ctx context.Context, projectId string, region string, name string) (*LoadBalancer, error) - /* - GetQuota Get the quota of Network Load Balancers in a project. - Retrieves the configured Network Load Balancer quota for the project. Limit can be changed via service request. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiGetQuotaRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest - /* - GetQuotaExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return GetQuotaResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetQuotaExecute(ctx context.Context, projectId string, region string) (*GetQuotaResponse, error) - /* - ListCredentials List all credentials in a project. - List Credentials - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiListCredentialsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListCredentials(ctx context.Context, projectId string, region string) ApiListCredentialsRequest - /* - ListCredentialsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ListCredentialsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListCredentialsExecute(ctx context.Context, projectId string, region string) (*ListCredentialsResponse, error) - /* - ListLoadBalancers List load balancers in a project. - ListLoadBalancer will list load balancers of a project. This contains information set during - creation or updates for every load balancer in the project. Additionally, it will have information about - the state of the load balancer in the form of a status field and error description feedback. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiListLoadBalancersRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListLoadBalancers(ctx context.Context, projectId string, region string) ApiListLoadBalancersRequest - /* - ListLoadBalancersExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ListLoadBalancersResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListLoadBalancersExecute(ctx context.Context, projectId string, region string) (*ListLoadBalancersResponse, error) - /* - ListPlans List available service plans. - ListPlans returns for the configured service plans for a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param region - @return ApiListPlansRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListPlans(ctx context.Context, region string) ApiListPlansRequest - /* - ListPlansExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param region - @return ListPlansResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListPlansExecute(ctx context.Context, region string) (*ListPlansResponse, error) - /* - UpdateCredentials Update credentials for observability in a project. - Update Credentials - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiUpdateCredentialsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiUpdateCredentialsRequest - /* - UpdateCredentialsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return UpdateCredentialsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateCredentialsExecute(ctx context.Context, projectId string, region string, credentialsRef string) (*UpdateCredentialsResponse, error) - /* - UpdateLoadBalancer Update a load balancer in a project. - Update Load Balancer allows the change of listeners and target pools of an existing Load Balancer. - The Load balancer resource version needs to be the current version to ensure concurrency safe updates. - The default load balancing algorithm is round robin unless useSourceIpAddress in session persistence is enabled for a target pool then it is Maglev. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiUpdateLoadBalancerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiUpdateLoadBalancerRequest - /* - UpdateLoadBalancerExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return LoadBalancer - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateLoadBalancerExecute(ctx context.Context, projectId string, region string, name string) (*LoadBalancer, error) - /* - UpdateTargetPool Update a single target pool of a load balancer in a project. - ReplaceTargetPool will replace a specific target pool of a load balancer with new content. - Useful to add/remove target servers. will update a load balancer. - Only replaces the mentioned target pools and leaves others unchanged. - Cannot be used to create or rename a target pool. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @param targetPoolName - @return ApiUpdateTargetPoolRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateTargetPool(ctx context.Context, projectId string, region string, name string, targetPoolName string) ApiUpdateTargetPoolRequest - /* - UpdateTargetPoolExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @param targetPoolName - @return TargetPool - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - UpdateTargetPoolExecute(ctx context.Context, projectId string, region string, name string, targetPoolName string) (*TargetPool, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateCredentialsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateCredentialsPayload(createCredentialsPayload CreateCredentialsPayload) ApiCreateCredentialsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - XRequestID(xRequestID string) ApiCreateCredentialsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*CreateCredentialsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateLoadBalancerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateLoadBalancerPayload(createLoadBalancerPayload CreateLoadBalancerPayload) ApiCreateLoadBalancerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - XRequestID(xRequestID string) ApiCreateLoadBalancerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*LoadBalancer, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteCredentialsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (map[string]interface{}, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteLoadBalancerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (map[string]interface{}, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetCredentialsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetCredentialsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetLoadBalancerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*LoadBalancer, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetQuotaRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetQuotaResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListCredentialsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListCredentialsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListLoadBalancersRequest interface { - // page_size specifies how many load balancers should be returned on this page. Must be a positive number <= 1000 - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PageSize(pageSize string) ApiListLoadBalancersRequest - // page_id is a page identifier returned by the previous response and is used to request the next page - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PageId(pageId string) ApiListLoadBalancersRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListLoadBalancersResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListPlansRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListPlansResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateCredentialsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateCredentialsPayload(updateCredentialsPayload UpdateCredentialsPayload) ApiUpdateCredentialsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*UpdateCredentialsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateLoadBalancerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateLoadBalancerPayload(updateLoadBalancerPayload UpdateLoadBalancerPayload) ApiUpdateLoadBalancerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*LoadBalancer, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiUpdateTargetPoolRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UpdateTargetPoolPayload(updateTargetPoolPayload UpdateTargetPoolPayload) ApiUpdateTargetPoolRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*TargetPool, 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 CreateCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createCredentialsPayload *CreateCredentialsPayload - xRequestID *string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateCredentialsRequest) CreateCredentialsPayload(createCredentialsPayload CreateCredentialsPayload) ApiCreateCredentialsRequest { - r.createCredentialsPayload = &createCredentialsPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateCredentialsRequest) XRequestID(xRequestID string) ApiCreateCredentialsRequest { - r.xRequestID = &xRequestID - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateCredentialsRequest) Execute() (*CreateCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateCredentialsResponse - ) - 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.CreateCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/credentials" - 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 r.createCredentialsPayload == nil { - return localVarReturnValue, fmt.Errorf("createCredentialsPayload 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", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xRequestID != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Request-ID", r.xRequestID, "") - } - // body params - localVarPostBody = r.createCredentialsPayload - 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -CreateCredentials: Create credentials for observability of the Load Balancer - -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 - @param region - @return ApiCreateCredentialsRequest -*/ -func (a *APIClient) CreateCredentials(ctx context.Context, projectId string, region string) ApiCreateCredentialsRequest { - return CreateCredentialsRequest{ - 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) CreateCredentialsExecute(ctx context.Context, projectId string, region string) (*CreateCredentialsResponse, error) { - r := CreateCredentialsRequest{ - 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 CreateLoadBalancerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - createLoadBalancerPayload *CreateLoadBalancerPayload - xRequestID *string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateLoadBalancerRequest) CreateLoadBalancerPayload(createLoadBalancerPayload CreateLoadBalancerPayload) ApiCreateLoadBalancerRequest { - r.createLoadBalancerPayload = &createLoadBalancerPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateLoadBalancerRequest) XRequestID(xRequestID string) ApiCreateLoadBalancerRequest { - r.xRequestID = &xRequestID - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateLoadBalancerRequest) Execute() (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - 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.CreateLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/load-balancers" - 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 r.createLoadBalancerPayload == nil { - return localVarReturnValue, fmt.Errorf("createLoadBalancerPayload 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", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xRequestID != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Request-ID", r.xRequestID, "") - } - // body params - localVarPostBody = r.createLoadBalancerPayload - 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -CreateLoadBalancer: Create a load balancer 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 - @param region - @return ApiCreateLoadBalancerRequest -*/ -func (a *APIClient) CreateLoadBalancer(ctx context.Context, projectId string, region string) ApiCreateLoadBalancerRequest { - return CreateLoadBalancerRequest{ - 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) CreateLoadBalancerExecute(ctx context.Context, projectId string, region string) (*LoadBalancer, error) { - r := CreateLoadBalancerRequest{ - 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 DeleteCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - credentialsRef string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteCredentialsRequest) Execute() (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - 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.DeleteCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}" - 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, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(r.credentialsRef, "credentialsRef")), -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", "text/plain"} - - // 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -DeleteCredentials: Delete a single credential 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 - @param region - @param credentialsRef - @return ApiDeleteCredentialsRequest -*/ -func (a *APIClient) DeleteCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiDeleteCredentialsRequest { - return DeleteCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteCredentialsExecute(ctx context.Context, projectId string, region string, credentialsRef string) (map[string]interface{}, error) { - r := DeleteCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteLoadBalancerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - name string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteLoadBalancerRequest) Execute() (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - 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.DeleteLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/load-balancers/{name}" - 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, "{"+"name"+"}", url.PathEscape(ParameterValueToString(r.name, "name")), -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", "text/plain"} - - // 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -DeleteLoadBalancer: Delete a given load balancer 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 - @param region - @param name - @return ApiDeleteLoadBalancerRequest -*/ -func (a *APIClient) DeleteLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiDeleteLoadBalancerRequest { - return DeleteLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteLoadBalancerExecute(ctx context.Context, projectId string, region string, name string) (map[string]interface{}, error) { - r := DeleteLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - credentialsRef string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetCredentialsRequest) Execute() (*GetCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetCredentialsResponse - ) - 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.GetCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}" - 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, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(r.credentialsRef, "credentialsRef")), -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", "text/plain"} - - // 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -GetCredentials: Get a single credential reference 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 - @param region - @param credentialsRef - @return ApiGetCredentialsRequest -*/ -func (a *APIClient) GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiGetCredentialsRequest { - return GetCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetCredentialsExecute(ctx context.Context, projectId string, region string, credentialsRef string) (*GetCredentialsResponse, error) { - r := GetCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLoadBalancerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - name string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLoadBalancerRequest) Execute() (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - 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.GetLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/load-balancers/{name}" - 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, "{"+"name"+"}", url.PathEscape(ParameterValueToString(r.name, "name")), -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", "text/plain"} - - // 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -GetLoadBalancer: Get a single load balancer 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 - @param region - @param name - @return ApiGetLoadBalancerRequest -*/ -func (a *APIClient) GetLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiGetLoadBalancerRequest { - return GetLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetLoadBalancerExecute(ctx context.Context, projectId string, region string, name string) (*LoadBalancer, error) { - r := GetLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaRequest 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 GetQuotaRequest) Execute() (*GetQuotaResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetQuotaResponse - ) - 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.GetQuota") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/quota" - 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{} - - // 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", "text/plain"} - - // 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -GetQuota: Get the quota of Network Load Balancers 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 - @param region - @return ApiGetQuotaRequest -*/ -func (a *APIClient) GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest { - return GetQuotaRequest{ - 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) GetQuotaExecute(ctx context.Context, projectId string, region string) (*GetQuotaResponse, error) { - r := GetQuotaRequest{ - 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 ListCredentialsRequest 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 ListCredentialsRequest) Execute() (*ListCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListCredentialsResponse - ) - 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.ListCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/credentials" - 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{} - - // 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", "text/plain"} - - // 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -ListCredentials: List all credentials 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 - @param region - @return ApiListCredentialsRequest -*/ -func (a *APIClient) ListCredentials(ctx context.Context, projectId string, region string) ApiListCredentialsRequest { - return ListCredentialsRequest{ - 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) ListCredentialsExecute(ctx context.Context, projectId string, region string) (*ListCredentialsResponse, error) { - r := ListCredentialsRequest{ - 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 ListLoadBalancersRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - pageSize *string - pageId *string -} - -// page_size specifies how many load balancers should be returned on this page. Must be a positive number <= 1000 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListLoadBalancersRequest) PageSize(pageSize string) ApiListLoadBalancersRequest { - r.pageSize = &pageSize - return r -} - -// page_id is a page identifier returned by the previous response and is used to request the next page -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListLoadBalancersRequest) PageId(pageId string) ApiListLoadBalancersRequest { - r.pageId = &pageId - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListLoadBalancersRequest) Execute() (*ListLoadBalancersResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListLoadBalancersResponse - ) - 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.ListLoadBalancers") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/load-balancers" - 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 r.pageSize != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") - } - if r.pageId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageId", r.pageId, "") - } - // 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", "text/plain"} - - // 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -ListLoadBalancers: List load balancers 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 - @param region - @return ApiListLoadBalancersRequest -*/ -func (a *APIClient) ListLoadBalancers(ctx context.Context, projectId string, region string) ApiListLoadBalancersRequest { - return ListLoadBalancersRequest{ - 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) ListLoadBalancersExecute(ctx context.Context, projectId string, region string) (*ListLoadBalancersResponse, error) { - r := ListLoadBalancersRequest{ - 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 ListPlansRequest 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 ListPlansRequest) Execute() (*ListPlansResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListPlansResponse - ) - 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.ListPlans") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/regions/{region}/plans" - 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", "text/plain"} - - // 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -ListPlans: List available service plans. - -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 - @return ApiListPlansRequest -*/ -func (a *APIClient) ListPlans(ctx context.Context, region string) ApiListPlansRequest { - return ListPlansRequest{ - 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) ListPlansExecute(ctx context.Context, region string) (*ListPlansResponse, error) { - r := ListPlansRequest{ - 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 UpdateCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - credentialsRef string - updateCredentialsPayload *UpdateCredentialsPayload -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateCredentialsRequest) UpdateCredentialsPayload(updateCredentialsPayload UpdateCredentialsPayload) ApiUpdateCredentialsRequest { - r.updateCredentialsPayload = &updateCredentialsPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateCredentialsRequest) Execute() (*UpdateCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UpdateCredentialsResponse - ) - 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.UpdateCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}" - 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, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(r.credentialsRef, "credentialsRef")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateCredentialsPayload == nil { - return localVarReturnValue, fmt.Errorf("updateCredentialsPayload 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", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateCredentialsPayload - 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -UpdateCredentials: Update credentials for observability 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 - @param region - @param credentialsRef - @return ApiUpdateCredentialsRequest -*/ -func (a *APIClient) UpdateCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiUpdateCredentialsRequest { - return UpdateCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateCredentialsExecute(ctx context.Context, projectId string, region string, credentialsRef string) (*UpdateCredentialsResponse, error) { - r := UpdateCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - name string - updateLoadBalancerPayload *UpdateLoadBalancerPayload -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateLoadBalancerRequest) UpdateLoadBalancerPayload(updateLoadBalancerPayload UpdateLoadBalancerPayload) ApiUpdateLoadBalancerRequest { - r.updateLoadBalancerPayload = &updateLoadBalancerPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateLoadBalancerRequest) Execute() (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - 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.UpdateLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/load-balancers/{name}" - 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, "{"+"name"+"}", url.PathEscape(ParameterValueToString(r.name, "name")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateLoadBalancerPayload == nil { - return localVarReturnValue, fmt.Errorf("updateLoadBalancerPayload 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", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateLoadBalancerPayload - 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -UpdateLoadBalancer: Update a load balancer 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 - @param region - @param name - @return ApiUpdateLoadBalancerRequest -*/ -func (a *APIClient) UpdateLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiUpdateLoadBalancerRequest { - return UpdateLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateLoadBalancerExecute(ctx context.Context, projectId string, region string, name string) (*LoadBalancer, error) { - r := UpdateLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - name string - targetPoolName string - updateTargetPoolPayload *UpdateTargetPoolPayload -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateTargetPoolRequest) UpdateTargetPoolPayload(updateTargetPoolPayload UpdateTargetPoolPayload) ApiUpdateTargetPoolRequest { - r.updateTargetPoolPayload = &updateTargetPoolPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateTargetPoolRequest) Execute() (*TargetPool, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *TargetPool - ) - 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.UpdateTargetPool") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/load-balancers/{name}/target-pools/{targetPoolName}" - 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, "{"+"name"+"}", url.PathEscape(ParameterValueToString(r.name, "name")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"targetPoolName"+"}", url.PathEscape(ParameterValueToString(r.targetPoolName, "targetPoolName")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateTargetPoolPayload == nil { - return localVarReturnValue, fmt.Errorf("updateTargetPoolPayload 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", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateTargetPoolPayload - 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 == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-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 -} - -/* -UpdateTargetPool: Update a single target pool of a load balancer 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 - @param region - @param name - @param targetPoolName - @return ApiUpdateTargetPoolRequest -*/ -func (a *APIClient) UpdateTargetPool(ctx context.Context, projectId string, region string, name string, targetPoolName string) ApiUpdateTargetPoolRequest { - return UpdateTargetPoolRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - targetPoolName: targetPoolName, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateTargetPoolExecute(ctx context.Context, projectId string, region string, name string, targetPoolName string) (*TargetPool, error) { - r := UpdateTargetPoolRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - targetPoolName: targetPoolName, - } - return r.Execute() -} diff --git a/services/loadbalancer/client.go b/services/loadbalancer/client.go deleted file mode 100644 index 38ed4cc976..0000000000 --- a/services/loadbalancer/client.go +++ /dev/null @@ -1,632 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -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 Network Load Balancer API API v2.0.0 -// 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) - } - } - - // using new regional api, so no region is set here - - 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/loadbalancer/configuration.go b/services/loadbalancer/configuration.go deleted file mode 100644 index 8c12f18225..0000000000 --- a/services/loadbalancer/configuration.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -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/loadbalancer", - Debug: false, - Servers: config.ServerConfigurations{ - { - URL: "https://load-balancer.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/loadbalancer/go.mod b/services/loadbalancer/go.mod index ddc832b8b6..dfdf8191ae 100644 --- a/services/loadbalancer/go.mod +++ b/services/loadbalancer/go.mod @@ -4,7 +4,7 @@ go 1.25 require ( github.com/google/go-cmp v0.7.0 - github.com/stackitcloud/stackit-sdk-go/core v0.27.0 + github.com/stackitcloud/stackit-sdk-go/core v0.27.1 ) require ( diff --git a/services/loadbalancer/go.sum b/services/loadbalancer/go.sum index 042f4a71a5..5bae1d1250 100644 --- a/services/loadbalancer/go.sum +++ b/services/loadbalancer/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= 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.0 h1:7lc6qStcFDFf8zHP4ORPa9joybw+Sa2LtB6BVjKQ+ek= -github.com/stackitcloud/stackit-sdk-go/core v0.27.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= +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= diff --git a/services/loadbalancer/model_active_health_check.go b/services/loadbalancer/model_active_health_check.go deleted file mode 100644 index 691371b93f..0000000000 --- a/services/loadbalancer/model_active_health_check.go +++ /dev/null @@ -1,508 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the ActiveHealthCheck type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ActiveHealthCheck{} - -/* - types and functions for altPort -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetAltPortAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetAltPortArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetAltPortRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getActiveHealthCheckGetAltPortAttributeTypeOk(arg ActiveHealthCheckGetAltPortAttributeType) (ret ActiveHealthCheckGetAltPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setActiveHealthCheckGetAltPortAttributeType(arg *ActiveHealthCheckGetAltPortAttributeType, val ActiveHealthCheckGetAltPortRetType) { - *arg = &val -} - -/* - types and functions for healthyThreshold -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetHealthyThresholdAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetHealthyThresholdArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetHealthyThresholdRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(arg ActiveHealthCheckGetHealthyThresholdAttributeType) (ret ActiveHealthCheckGetHealthyThresholdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setActiveHealthCheckGetHealthyThresholdAttributeType(arg *ActiveHealthCheckGetHealthyThresholdAttributeType, val ActiveHealthCheckGetHealthyThresholdRetType) { - *arg = &val -} - -/* - types and functions for httpHealthChecks -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetHttpHealthChecksAttributeType = *HttpHealthChecks - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetHttpHealthChecksArgType = HttpHealthChecks - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetHttpHealthChecksRetType = HttpHealthChecks - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(arg ActiveHealthCheckGetHttpHealthChecksAttributeType) (ret ActiveHealthCheckGetHttpHealthChecksRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setActiveHealthCheckGetHttpHealthChecksAttributeType(arg *ActiveHealthCheckGetHttpHealthChecksAttributeType, val ActiveHealthCheckGetHttpHealthChecksRetType) { - *arg = &val -} - -/* - types and functions for interval -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetIntervalAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getActiveHealthCheckGetIntervalAttributeTypeOk(arg ActiveHealthCheckGetIntervalAttributeType) (ret ActiveHealthCheckGetIntervalRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setActiveHealthCheckGetIntervalAttributeType(arg *ActiveHealthCheckGetIntervalAttributeType, val ActiveHealthCheckGetIntervalRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetIntervalArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetIntervalRetType = string - -/* - types and functions for intervalJitter -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetIntervalJitterAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getActiveHealthCheckGetIntervalJitterAttributeTypeOk(arg ActiveHealthCheckGetIntervalJitterAttributeType) (ret ActiveHealthCheckGetIntervalJitterRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setActiveHealthCheckGetIntervalJitterAttributeType(arg *ActiveHealthCheckGetIntervalJitterAttributeType, val ActiveHealthCheckGetIntervalJitterRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetIntervalJitterArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetIntervalJitterRetType = string - -/* - types and functions for timeout -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetTimeoutAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getActiveHealthCheckGetTimeoutAttributeTypeOk(arg ActiveHealthCheckGetTimeoutAttributeType) (ret ActiveHealthCheckGetTimeoutRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setActiveHealthCheckGetTimeoutAttributeType(arg *ActiveHealthCheckGetTimeoutAttributeType, val ActiveHealthCheckGetTimeoutRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetTimeoutArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetTimeoutRetType = string - -/* - types and functions for unhealthyThreshold -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetUnhealthyThresholdAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetUnhealthyThresholdArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheckGetUnhealthyThresholdRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(arg ActiveHealthCheckGetUnhealthyThresholdAttributeType) (ret ActiveHealthCheckGetUnhealthyThresholdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setActiveHealthCheckGetUnhealthyThresholdAttributeType(arg *ActiveHealthCheckGetUnhealthyThresholdAttributeType, val ActiveHealthCheckGetUnhealthyThresholdRetType) { - *arg = &val -} - -// ActiveHealthCheck struct for ActiveHealthCheck -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ActiveHealthCheck struct { - // Overrides the default port used for health check probes. - // Can be cast to int32 without loss of precision. - AltPort ActiveHealthCheckGetAltPortAttributeType `json:"altPort,omitempty"` - // Healthy threshold of the health checking - // Can be cast to int32 without loss of precision. - HealthyThreshold ActiveHealthCheckGetHealthyThresholdAttributeType `json:"healthyThreshold,omitempty"` - HttpHealthChecks ActiveHealthCheckGetHttpHealthChecksAttributeType `json:"httpHealthChecks,omitempty"` - // Interval duration of health checking in seconds - Interval ActiveHealthCheckGetIntervalAttributeType `json:"interval,omitempty"` - // Interval duration threshold of the health checking in seconds - IntervalJitter ActiveHealthCheckGetIntervalJitterAttributeType `json:"intervalJitter,omitempty"` - // Active health checking timeout duration in seconds - Timeout ActiveHealthCheckGetTimeoutAttributeType `json:"timeout,omitempty"` - // Unhealthy threshold of the health checking - // Can be cast to int32 without loss of precision. - UnhealthyThreshold ActiveHealthCheckGetUnhealthyThresholdAttributeType `json:"unhealthyThreshold,omitempty"` -} - -// NewActiveHealthCheck instantiates a new ActiveHealthCheck 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 NewActiveHealthCheck() *ActiveHealthCheck { - this := ActiveHealthCheck{} - return &this -} - -// NewActiveHealthCheckWithDefaults instantiates a new ActiveHealthCheck 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 NewActiveHealthCheckWithDefaults() *ActiveHealthCheck { - this := ActiveHealthCheck{} - return &this -} - -// GetAltPort returns the AltPort field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetAltPort() (res ActiveHealthCheckGetAltPortRetType) { - res, _ = o.GetAltPortOk() - return -} - -// GetAltPortOk returns a tuple with the AltPort field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetAltPortOk() (ret ActiveHealthCheckGetAltPortRetType, ok bool) { - return getActiveHealthCheckGetAltPortAttributeTypeOk(o.AltPort) -} - -// HasAltPort returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) HasAltPort() bool { - _, ok := o.GetAltPortOk() - return ok -} - -// SetAltPort gets a reference to the given int64 and assigns it to the AltPort field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) SetAltPort(v ActiveHealthCheckGetAltPortRetType) { - setActiveHealthCheckGetAltPortAttributeType(&o.AltPort, v) -} - -// GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetHealthyThreshold() (res ActiveHealthCheckGetHealthyThresholdRetType) { - res, _ = o.GetHealthyThresholdOk() - return -} - -// GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetHealthyThresholdOk() (ret ActiveHealthCheckGetHealthyThresholdRetType, ok bool) { - return getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(o.HealthyThreshold) -} - -// HasHealthyThreshold returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) HasHealthyThreshold() bool { - _, ok := o.GetHealthyThresholdOk() - return ok -} - -// SetHealthyThreshold gets a reference to the given int64 and assigns it to the HealthyThreshold field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) SetHealthyThreshold(v ActiveHealthCheckGetHealthyThresholdRetType) { - setActiveHealthCheckGetHealthyThresholdAttributeType(&o.HealthyThreshold, v) -} - -// GetHttpHealthChecks returns the HttpHealthChecks field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetHttpHealthChecks() (res ActiveHealthCheckGetHttpHealthChecksRetType) { - res, _ = o.GetHttpHealthChecksOk() - return -} - -// GetHttpHealthChecksOk returns a tuple with the HttpHealthChecks field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetHttpHealthChecksOk() (ret ActiveHealthCheckGetHttpHealthChecksRetType, ok bool) { - return getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(o.HttpHealthChecks) -} - -// HasHttpHealthChecks returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) HasHttpHealthChecks() bool { - _, ok := o.GetHttpHealthChecksOk() - return ok -} - -// SetHttpHealthChecks gets a reference to the given HttpHealthChecks and assigns it to the HttpHealthChecks field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) SetHttpHealthChecks(v ActiveHealthCheckGetHttpHealthChecksRetType) { - setActiveHealthCheckGetHttpHealthChecksAttributeType(&o.HttpHealthChecks, v) -} - -// GetInterval returns the Interval field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetInterval() (res ActiveHealthCheckGetIntervalRetType) { - res, _ = o.GetIntervalOk() - return -} - -// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetIntervalOk() (ret ActiveHealthCheckGetIntervalRetType, ok bool) { - return getActiveHealthCheckGetIntervalAttributeTypeOk(o.Interval) -} - -// HasInterval returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) HasInterval() bool { - _, ok := o.GetIntervalOk() - return ok -} - -// SetInterval gets a reference to the given string and assigns it to the Interval field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) SetInterval(v ActiveHealthCheckGetIntervalRetType) { - setActiveHealthCheckGetIntervalAttributeType(&o.Interval, v) -} - -// GetIntervalJitter returns the IntervalJitter field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetIntervalJitter() (res ActiveHealthCheckGetIntervalJitterRetType) { - res, _ = o.GetIntervalJitterOk() - return -} - -// GetIntervalJitterOk returns a tuple with the IntervalJitter field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetIntervalJitterOk() (ret ActiveHealthCheckGetIntervalJitterRetType, ok bool) { - return getActiveHealthCheckGetIntervalJitterAttributeTypeOk(o.IntervalJitter) -} - -// HasIntervalJitter returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) HasIntervalJitter() bool { - _, ok := o.GetIntervalJitterOk() - return ok -} - -// SetIntervalJitter gets a reference to the given string and assigns it to the IntervalJitter field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) SetIntervalJitter(v ActiveHealthCheckGetIntervalJitterRetType) { - setActiveHealthCheckGetIntervalJitterAttributeType(&o.IntervalJitter, v) -} - -// GetTimeout returns the Timeout field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetTimeout() (res ActiveHealthCheckGetTimeoutRetType) { - res, _ = o.GetTimeoutOk() - return -} - -// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetTimeoutOk() (ret ActiveHealthCheckGetTimeoutRetType, ok bool) { - return getActiveHealthCheckGetTimeoutAttributeTypeOk(o.Timeout) -} - -// HasTimeout returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) HasTimeout() bool { - _, ok := o.GetTimeoutOk() - return ok -} - -// SetTimeout gets a reference to the given string and assigns it to the Timeout field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) SetTimeout(v ActiveHealthCheckGetTimeoutRetType) { - setActiveHealthCheckGetTimeoutAttributeType(&o.Timeout, v) -} - -// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetUnhealthyThreshold() (res ActiveHealthCheckGetUnhealthyThresholdRetType) { - res, _ = o.GetUnhealthyThresholdOk() - return -} - -// GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (ret ActiveHealthCheckGetUnhealthyThresholdRetType, ok bool) { - return getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(o.UnhealthyThreshold) -} - -// HasUnhealthyThreshold returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) HasUnhealthyThreshold() bool { - _, ok := o.GetUnhealthyThresholdOk() - return ok -} - -// SetUnhealthyThreshold gets a reference to the given int64 and assigns it to the UnhealthyThreshold field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ActiveHealthCheck) SetUnhealthyThreshold(v ActiveHealthCheckGetUnhealthyThresholdRetType) { - setActiveHealthCheckGetUnhealthyThresholdAttributeType(&o.UnhealthyThreshold, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getActiveHealthCheckGetAltPortAttributeTypeOk(o.AltPort); ok { - toSerialize["AltPort"] = val - } - if val, ok := getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(o.HealthyThreshold); ok { - toSerialize["HealthyThreshold"] = val - } - if val, ok := getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(o.HttpHealthChecks); ok { - toSerialize["HttpHealthChecks"] = val - } - if val, ok := getActiveHealthCheckGetIntervalAttributeTypeOk(o.Interval); ok { - toSerialize["Interval"] = val - } - if val, ok := getActiveHealthCheckGetIntervalJitterAttributeTypeOk(o.IntervalJitter); ok { - toSerialize["IntervalJitter"] = val - } - if val, ok := getActiveHealthCheckGetTimeoutAttributeTypeOk(o.Timeout); ok { - toSerialize["Timeout"] = val - } - if val, ok := getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(o.UnhealthyThreshold); ok { - toSerialize["UnhealthyThreshold"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableActiveHealthCheck struct { - value *ActiveHealthCheck - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableActiveHealthCheck) Get() *ActiveHealthCheck { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableActiveHealthCheck) Set(val *ActiveHealthCheck) { - 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 NullableActiveHealthCheck) 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 *NullableActiveHealthCheck) 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 NewNullableActiveHealthCheck(val *ActiveHealthCheck) *NullableActiveHealthCheck { - return &NullableActiveHealthCheck{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 NullableActiveHealthCheck) 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 *NullableActiveHealthCheck) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_active_health_check_test.go b/services/loadbalancer/model_active_health_check_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_active_health_check_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_create_credentials_payload.go b/services/loadbalancer/model_create_credentials_payload.go deleted file mode 100644 index 9667f98e7e..0000000000 --- a/services/loadbalancer/model_create_credentials_payload.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the CreateCredentialsPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateCredentialsPayload{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetDisplayNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg CreateCredentialsPayloadGetDisplayNameAttributeType) (ret CreateCredentialsPayloadGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateCredentialsPayloadGetDisplayNameAttributeType(arg *CreateCredentialsPayloadGetDisplayNameAttributeType, val CreateCredentialsPayloadGetDisplayNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetDisplayNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetDisplayNameRetType = string - -/* - types and functions for password -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetPasswordAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateCredentialsPayloadGetPasswordAttributeTypeOk(arg CreateCredentialsPayloadGetPasswordAttributeType) (ret CreateCredentialsPayloadGetPasswordRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateCredentialsPayloadGetPasswordAttributeType(arg *CreateCredentialsPayloadGetPasswordAttributeType, val CreateCredentialsPayloadGetPasswordRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetPasswordArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetPasswordRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetUsernameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateCredentialsPayloadGetUsernameAttributeTypeOk(arg CreateCredentialsPayloadGetUsernameAttributeType) (ret CreateCredentialsPayloadGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateCredentialsPayloadGetUsernameAttributeType(arg *CreateCredentialsPayloadGetUsernameAttributeType, val CreateCredentialsPayloadGetUsernameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetUsernameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayloadGetUsernameRetType = string - -// CreateCredentialsPayload struct for CreateCredentialsPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsPayload struct { - // Credential name - DisplayName CreateCredentialsPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"` - // A valid password used for an existing STACKIT Observability instance, which is used during basic auth. - Password CreateCredentialsPayloadGetPasswordAttributeType `json:"password,omitempty"` - // A valid username used for an existing STACKIT Observability instance, which is used during basic auth. - Username CreateCredentialsPayloadGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewCreateCredentialsPayload instantiates a new CreateCredentialsPayload 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 NewCreateCredentialsPayload() *CreateCredentialsPayload { - this := CreateCredentialsPayload{} - return &this -} - -// NewCreateCredentialsPayloadWithDefaults instantiates a new CreateCredentialsPayload 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 NewCreateCredentialsPayloadWithDefaults() *CreateCredentialsPayload { - this := CreateCredentialsPayload{} - return &this -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) GetDisplayName() (res CreateCredentialsPayloadGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) GetDisplayNameOk() (ret CreateCredentialsPayloadGetDisplayNameRetType, ok bool) { - return getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) HasDisplayName() bool { - _, ok := o.GetDisplayNameOk() - return ok -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) SetDisplayName(v CreateCredentialsPayloadGetDisplayNameRetType) { - setCreateCredentialsPayloadGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetPassword returns the Password field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) GetPassword() (res CreateCredentialsPayloadGetPasswordRetType) { - res, _ = o.GetPasswordOk() - return -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) GetPasswordOk() (ret CreateCredentialsPayloadGetPasswordRetType, ok bool) { - return getCreateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password) -} - -// HasPassword returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) HasPassword() bool { - _, ok := o.GetPasswordOk() - return ok -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) SetPassword(v CreateCredentialsPayloadGetPasswordRetType) { - setCreateCredentialsPayloadGetPasswordAttributeType(&o.Password, v) -} - -// GetUsername returns the Username field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) GetUsername() (res CreateCredentialsPayloadGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) GetUsernameOk() (ret CreateCredentialsPayloadGetUsernameRetType, ok bool) { - return getCreateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) HasUsername() bool { - _, ok := o.GetUsernameOk() - return ok -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsPayload) SetUsername(v CreateCredentialsPayloadGetUsernameRetType) { - setCreateCredentialsPayloadGetUsernameAttributeType(&o.Username, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getCreateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password); ok { - toSerialize["Password"] = val - } - if val, ok := getCreateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateCredentialsPayload struct { - value *CreateCredentialsPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateCredentialsPayload) Get() *CreateCredentialsPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateCredentialsPayload) Set(val *CreateCredentialsPayload) { - 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 NullableCreateCredentialsPayload) 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 *NullableCreateCredentialsPayload) 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 NewNullableCreateCredentialsPayload(val *CreateCredentialsPayload) *NullableCreateCredentialsPayload { - return &NullableCreateCredentialsPayload{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 NullableCreateCredentialsPayload) 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 *NullableCreateCredentialsPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_create_credentials_payload_test.go b/services/loadbalancer/model_create_credentials_payload_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_create_credentials_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_create_credentials_response.go b/services/loadbalancer/model_create_credentials_response.go deleted file mode 100644 index 63c7e20589..0000000000 --- a/services/loadbalancer/model_create_credentials_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateCredentialsResponse{} - -/* - types and functions for credential -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsResponseGetCredentialAttributeType = *CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsResponseGetCredentialArgType = CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsResponseGetCredentialRetType = CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateCredentialsResponseGetCredentialAttributeTypeOk(arg CreateCredentialsResponseGetCredentialAttributeType) (ret CreateCredentialsResponseGetCredentialRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateCredentialsResponseGetCredentialAttributeType(arg *CreateCredentialsResponseGetCredentialAttributeType, val CreateCredentialsResponseGetCredentialRetType) { - *arg = &val -} - -// CreateCredentialsResponse struct for CreateCredentialsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateCredentialsResponse struct { - Credential CreateCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` -} - -// NewCreateCredentialsResponse instantiates a new CreateCredentialsResponse 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 NewCreateCredentialsResponse() *CreateCredentialsResponse { - this := CreateCredentialsResponse{} - return &this -} - -// NewCreateCredentialsResponseWithDefaults instantiates a new CreateCredentialsResponse 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 NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse { - this := CreateCredentialsResponse{} - return &this -} - -// GetCredential returns the Credential field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsResponse) GetCredential() (res CreateCredentialsResponseGetCredentialRetType) { - res, _ = o.GetCredentialOk() - return -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsResponse) GetCredentialOk() (ret CreateCredentialsResponseGetCredentialRetType, ok bool) { - return getCreateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) -} - -// HasCredential returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsResponse) HasCredential() bool { - _, ok := o.GetCredentialOk() - return ok -} - -// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateCredentialsResponse) SetCredential(v CreateCredentialsResponseGetCredentialRetType) { - setCreateCredentialsResponseGetCredentialAttributeType(&o.Credential, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { - toSerialize["Credential"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateCredentialsResponse struct { - value *CreateCredentialsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateCredentialsResponse) Get() *CreateCredentialsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateCredentialsResponse) Set(val *CreateCredentialsResponse) { - 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 NullableCreateCredentialsResponse) 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 *NullableCreateCredentialsResponse) 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 NewNullableCreateCredentialsResponse(val *CreateCredentialsResponse) *NullableCreateCredentialsResponse { - return &NullableCreateCredentialsResponse{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 NullableCreateCredentialsResponse) 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 *NullableCreateCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_create_credentials_response_test.go b/services/loadbalancer/model_create_credentials_response_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_create_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_create_load_balancer_payload.go b/services/loadbalancer/model_create_load_balancer_payload.go deleted file mode 100644 index ce87b86e2f..0000000000 --- a/services/loadbalancer/model_create_load_balancer_payload.go +++ /dev/null @@ -1,1163 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateLoadBalancerPayload{} - -/* - types and functions for disableTargetSecurityGroupAssignment -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType) (ret CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(arg *CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType, val CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { - *arg = &val -} - -/* - types and functions for errors -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg CreateLoadBalancerPayloadGetErrorsAttributeType) (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetErrorsAttributeType(arg *CreateLoadBalancerPayloadGetErrorsAttributeType, val CreateLoadBalancerPayloadGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for externalAddress -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetExternalAddressAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetExternalAddressAttributeType) (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetExternalAddressAttributeType(arg *CreateLoadBalancerPayloadGetExternalAddressAttributeType, val CreateLoadBalancerPayloadGetExternalAddressRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetExternalAddressArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetExternalAddressRetType = string - -/* - types and functions for labels -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetLabelsAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetLabelsArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetLabelsRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(arg CreateLoadBalancerPayloadGetLabelsAttributeType) (ret CreateLoadBalancerPayloadGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetLabelsAttributeType(arg *CreateLoadBalancerPayloadGetLabelsAttributeType, val CreateLoadBalancerPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for listeners -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetListenersAttributeType = *[]Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetListenersArgType = []Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetListenersRetType = []Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(arg CreateLoadBalancerPayloadGetListenersAttributeType) (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetListenersAttributeType(arg *CreateLoadBalancerPayloadGetListenersAttributeType, val CreateLoadBalancerPayloadGetListenersRetType) { - *arg = &val -} - -/* - types and functions for loadBalancerSecurityGroup -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType = *CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupArgType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(arg CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType) (ret CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(arg *CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType, val CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { - *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 CreateLoadBalancerPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadGetNameAttributeType) (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetNameAttributeType(arg *CreateLoadBalancerPayloadGetNameAttributeType, val CreateLoadBalancerPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetNameRetType = string - -/* - types and functions for networks -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetNetworksAttributeType = *[]Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetNetworksArgType = []Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetNetworksRetType = []Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg CreateLoadBalancerPayloadGetNetworksAttributeType) (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetNetworksAttributeType(arg *CreateLoadBalancerPayloadGetNetworksAttributeType, val CreateLoadBalancerPayloadGetNetworksRetType) { - *arg = &val -} - -/* - types and functions for options -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg CreateLoadBalancerPayloadGetOptionsAttributeType) (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetOptionsAttributeType(arg *CreateLoadBalancerPayloadGetOptionsAttributeType, val CreateLoadBalancerPayloadGetOptionsRetType) { - *arg = &val -} - -/* - types and functions for planId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetPlanIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg CreateLoadBalancerPayloadGetPlanIdAttributeType) (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetPlanIdAttributeType(arg *CreateLoadBalancerPayloadGetPlanIdAttributeType, val CreateLoadBalancerPayloadGetPlanIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetPlanIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetPlanIdRetType = string - -/* - types and functions for privateAddress -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetPrivateAddressAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *CreateLoadBalancerPayloadGetPrivateAddressAttributeType, val CreateLoadBalancerPayloadGetPrivateAddressRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetPrivateAddressArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetPrivateAddressRetType = 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 CreateLoadBalancerPayloadGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(arg CreateLoadBalancerPayloadGetRegionAttributeType) (ret CreateLoadBalancerPayloadGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetRegionAttributeType(arg *CreateLoadBalancerPayloadGetRegionAttributeType, val CreateLoadBalancerPayloadGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetRegionRetType = string - -/* - types and functions for status -*/ - -// isEnum - -// CreateLoadBalancerPayloadStatus the model 'CreateLoadBalancerPayload' -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadStatus string - -// List of Status -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CREATELOADBALANCERPAYLOADSTATUS_UNSPECIFIED CreateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CREATELOADBALANCERPAYLOADSTATUS_PENDING CreateLoadBalancerPayloadStatus = "STATUS_PENDING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CREATELOADBALANCERPAYLOADSTATUS_READY CreateLoadBalancerPayloadStatus = "STATUS_READY" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CREATELOADBALANCERPAYLOADSTATUS_ERROR CreateLoadBalancerPayloadStatus = "STATUS_ERROR" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CREATELOADBALANCERPAYLOADSTATUS_TERMINATING CreateLoadBalancerPayloadStatus = "STATUS_TERMINATING" -) - -// All allowed values of CreateLoadBalancerPayload enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedCreateLoadBalancerPayloadStatusEnumValues = []CreateLoadBalancerPayloadStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *CreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson CreateLoadBalancerPayloadStatus - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := CreateLoadBalancerPayloadStatus(value) - for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid CreateLoadBalancerPayload", value) -} - -// NewCreateLoadBalancerPayloadStatusFromValue returns a pointer to a valid CreateLoadBalancerPayloadStatus -// 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 NewCreateLoadBalancerPayloadStatusFromValue(v CreateLoadBalancerPayloadStatus) (*CreateLoadBalancerPayloadStatus, error) { - ev := CreateLoadBalancerPayloadStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for CreateLoadBalancerPayloadStatus: valid values are %v", v, AllowedCreateLoadBalancerPayloadStatusEnumValues) - } -} - -// 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 CreateLoadBalancerPayloadStatus) IsValid() bool { - for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusStatus value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v CreateLoadBalancerPayloadStatus) Ptr() *CreateLoadBalancerPayloadStatus { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateLoadBalancerPayloadStatus struct { - value *CreateLoadBalancerPayloadStatus - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateLoadBalancerPayloadStatus) Get() *CreateLoadBalancerPayloadStatus { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateLoadBalancerPayloadStatus) Set(val *CreateLoadBalancerPayloadStatus) { - 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 NullableCreateLoadBalancerPayloadStatus) 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 *NullableCreateLoadBalancerPayloadStatus) 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 NewNullableCreateLoadBalancerPayloadStatus(val *CreateLoadBalancerPayloadStatus) *NullableCreateLoadBalancerPayloadStatus { - return &NullableCreateLoadBalancerPayloadStatus{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 NullableCreateLoadBalancerPayloadStatus) 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 *NullableCreateLoadBalancerPayloadStatus) 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 CreateLoadBalancerPayloadGetStatusAttributeType = *CreateLoadBalancerPayloadStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetStatusArgType = CreateLoadBalancerPayloadStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetStatusRetType = CreateLoadBalancerPayloadStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(arg CreateLoadBalancerPayloadGetStatusAttributeType) (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetStatusAttributeType(arg *CreateLoadBalancerPayloadGetStatusAttributeType, val CreateLoadBalancerPayloadGetStatusRetType) { - *arg = &val -} - -/* - types and functions for targetPools -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg CreateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *CreateLoadBalancerPayloadGetTargetPoolsAttributeType, val CreateLoadBalancerPayloadGetTargetPoolsRetType) { - *arg = &val -} - -/* - types and functions for targetSecurityGroup -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType = *CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetTargetSecurityGroupArgType = CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetTargetSecurityGroupRetType = CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(arg CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType) (ret CreateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(arg *CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType, val CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) { - *arg = &val -} - -/* - types and functions for version -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetVersionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(arg CreateLoadBalancerPayloadGetVersionAttributeType) (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadGetVersionAttributeType(arg *CreateLoadBalancerPayloadGetVersionAttributeType, val CreateLoadBalancerPayloadGetVersionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetVersionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadGetVersionRetType = string - -// CreateLoadBalancerPayload struct for CreateLoadBalancerPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayload struct { - // Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation. - DisableTargetSecurityGroupAssignment CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"` - // Reports all errors a load balancer has. - Errors CreateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` - // External load balancer IP address where this load balancer is exposed. Not changeable after creation. - ExternalAddress CreateLoadBalancerPayloadGetExternalAddressAttributeType `json:"externalAddress,omitempty"` - // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per LB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. - Labels CreateLoadBalancerPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // There is a maximum listener count of 20. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. - Listeners CreateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` - LoadBalancerSecurityGroup CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"` - // Load balancer name. Not changeable after creation. - Name CreateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks CreateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"` - Options CreateLoadBalancerPayloadGetOptionsAttributeType `json:"options,omitempty"` - // Service Plan configures the size of the Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId CreateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"` - // Transient private load balancer IP address that can change any time. - PrivateAddress CreateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` - // Region of the LoadBalancer - Region CreateLoadBalancerPayloadGetRegionAttributeType `json:"region,omitempty"` - Status CreateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"` - // List of all target pools which will be used in the load balancer. Limited to 20. - TargetPools CreateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"` - TargetSecurityGroup CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType `json:"targetSecurityGroup,omitempty"` - // Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version CreateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"` -} - -// NewCreateLoadBalancerPayload instantiates a new CreateLoadBalancerPayload 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 NewCreateLoadBalancerPayload() *CreateLoadBalancerPayload { - this := CreateLoadBalancerPayload{} - return &this -} - -// NewCreateLoadBalancerPayloadWithDefaults instantiates a new CreateLoadBalancerPayload 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 NewCreateLoadBalancerPayloadWithDefaults() *CreateLoadBalancerPayload { - this := CreateLoadBalancerPayload{} - return &this -} - -// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() (res CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { - res, _ = o.GetDisableTargetSecurityGroupAssignmentOk() - return -} - -// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (ret CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) { - return getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment) -} - -// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool { - _, ok := o.GetDisableTargetSecurityGroupAssignmentOk() - return ok -} - -// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { - setCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v) -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetErrors() (res CreateLoadBalancerPayloadGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetErrorsOk() (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) { - return getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasErrors() bool { - _, ok := o.GetErrorsOk() - return ok -} - -// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetErrors(v CreateLoadBalancerPayloadGetErrorsRetType) { - setCreateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v) -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetExternalAddress() (res CreateLoadBalancerPayloadGetExternalAddressRetType) { - res, _ = o.GetExternalAddressOk() - return -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetExternalAddressOk() (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { - return getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress) -} - -// HasExternalAddress returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasExternalAddress() bool { - _, ok := o.GetExternalAddressOk() - return ok -} - -// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetExternalAddress(v CreateLoadBalancerPayloadGetExternalAddressRetType) { - setCreateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, 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 *CreateLoadBalancerPayload) GetLabels() (res CreateLoadBalancerPayloadGetLabelsRetType) { - 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 *CreateLoadBalancerPayload) GetLabelsOk() (ret CreateLoadBalancerPayloadGetLabelsRetType, ok bool) { - return getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(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 *CreateLoadBalancerPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetLabels(v CreateLoadBalancerPayloadGetLabelsRetType) { - setCreateLoadBalancerPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetListeners() (res CreateLoadBalancerPayloadGetListenersRetType) { - res, _ = o.GetListenersOk() - return -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetListenersOk() (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) { - return getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners) -} - -// HasListeners returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasListeners() bool { - _, ok := o.GetListenersOk() - return ok -} - -// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetListeners(v CreateLoadBalancerPayloadGetListenersRetType) { - setCreateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v) -} - -// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroup() (res CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { - res, _ = o.GetLoadBalancerSecurityGroupOk() - return -} - -// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (ret CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) { - return getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup) -} - -// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool { - _, ok := o.GetLoadBalancerSecurityGroupOk() - return ok -} - -// SetLoadBalancerSecurityGroup gets a reference to the given CreateLoadBalancerPayloadLoadBalancerSecurityGroup and assigns it to the LoadBalancerSecurityGroup field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { - setCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(&o.LoadBalancerSecurityGroup, 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 *CreateLoadBalancerPayload) GetName() (res CreateLoadBalancerPayloadGetNameRetType) { - 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 *CreateLoadBalancerPayload) GetNameOk() (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) { - return getCreateLoadBalancerPayloadGetNameAttributeTypeOk(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 *CreateLoadBalancerPayload) 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 *CreateLoadBalancerPayload) SetName(v CreateLoadBalancerPayloadGetNameRetType) { - setCreateLoadBalancerPayloadGetNameAttributeType(&o.Name, v) -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetNetworks() (res CreateLoadBalancerPayloadGetNetworksRetType) { - res, _ = o.GetNetworksOk() - return -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetNetworksOk() (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) { - return getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks) -} - -// HasNetworks returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasNetworks() bool { - _, ok := o.GetNetworksOk() - return ok -} - -// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetNetworks(v CreateLoadBalancerPayloadGetNetworksRetType) { - setCreateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v) -} - -// GetOptions returns the Options field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetOptions() (res CreateLoadBalancerPayloadGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetOptionsOk() (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) { - return getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok -} - -// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetOptions(v CreateLoadBalancerPayloadGetOptionsRetType) { - setCreateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v) -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetPlanId() (res CreateLoadBalancerPayloadGetPlanIdRetType) { - res, _ = o.GetPlanIdOk() - return -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetPlanIdOk() (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) { - return getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId) -} - -// HasPlanId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasPlanId() bool { - _, ok := o.GetPlanIdOk() - return ok -} - -// SetPlanId gets a reference to the given string and assigns it to the PlanId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetPlanId(v CreateLoadBalancerPayloadGetPlanIdRetType) { - setCreateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetPrivateAddress() (res CreateLoadBalancerPayloadGetPrivateAddressRetType) { - res, _ = o.GetPrivateAddressOk() - return -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetPrivateAddressOk() (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { - return getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress) -} - -// HasPrivateAddress returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasPrivateAddress() bool { - _, ok := o.GetPrivateAddressOk() - return ok -} - -// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetPrivateAddress(v CreateLoadBalancerPayloadGetPrivateAddressRetType) { - setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v) -} - -// GetRegion returns the Region field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetRegion() (res CreateLoadBalancerPayloadGetRegionRetType) { - res, _ = o.GetRegionOk() - return -} - -// GetRegionOk returns a tuple with the Region field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetRegionOk() (ret CreateLoadBalancerPayloadGetRegionRetType, ok bool) { - return getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region) -} - -// HasRegion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasRegion() bool { - _, ok := o.GetRegionOk() - return ok -} - -// SetRegion gets a reference to the given string and assigns it to the Region field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetRegion(v CreateLoadBalancerPayloadGetRegionRetType) { - setCreateLoadBalancerPayloadGetRegionAttributeType(&o.Region, 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 *CreateLoadBalancerPayload) GetStatus() (res CreateLoadBalancerPayloadGetStatusRetType) { - 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 *CreateLoadBalancerPayload) GetStatusOk() (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) { - return getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(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 *CreateLoadBalancerPayload) 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 *CreateLoadBalancerPayload) SetStatus(v CreateLoadBalancerPayloadGetStatusRetType) { - setCreateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v) -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetTargetPools() (res CreateLoadBalancerPayloadGetTargetPoolsRetType) { - res, _ = o.GetTargetPoolsOk() - return -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetTargetPoolsOk() (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { - return getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools) -} - -// HasTargetPools returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasTargetPools() bool { - _, ok := o.GetTargetPoolsOk() - return ok -} - -// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetTargetPools(v CreateLoadBalancerPayloadGetTargetPoolsRetType) { - setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v) -} - -// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetTargetSecurityGroup() (res CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) { - res, _ = o.GetTargetSecurityGroupOk() - return -} - -// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetTargetSecurityGroupOk() (ret CreateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) { - return getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup) -} - -// HasTargetSecurityGroup returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasTargetSecurityGroup() bool { - _, ok := o.GetTargetSecurityGroupOk() - return ok -} - -// SetTargetSecurityGroup gets a reference to the given CreateLoadBalancerPayloadTargetSecurityGroup and assigns it to the TargetSecurityGroup field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetTargetSecurityGroup(v CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) { - setCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(&o.TargetSecurityGroup, v) -} - -// GetVersion returns the Version field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetVersion() (res CreateLoadBalancerPayloadGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) GetVersionOk() (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) { - return getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLoadBalancerPayload) SetVersion(v CreateLoadBalancerPayloadGetVersionRetType) { - setCreateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok { - toSerialize["DisableTargetSecurityGroupAssignment"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { - toSerialize["ExternalAddress"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok { - toSerialize["Listeners"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup); ok { - toSerialize["LoadBalancerSecurityGroup"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok { - toSerialize["Networks"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { - toSerialize["PrivateAddress"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region); ok { - toSerialize["Region"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { - toSerialize["TargetPools"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup); ok { - toSerialize["TargetSecurityGroup"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateLoadBalancerPayload struct { - value *CreateLoadBalancerPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateLoadBalancerPayload) Get() *CreateLoadBalancerPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateLoadBalancerPayload) Set(val *CreateLoadBalancerPayload) { - 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 NullableCreateLoadBalancerPayload) 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 *NullableCreateLoadBalancerPayload) 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 NewNullableCreateLoadBalancerPayload(val *CreateLoadBalancerPayload) *NullableCreateLoadBalancerPayload { - return &NullableCreateLoadBalancerPayload{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 NullableCreateLoadBalancerPayload) 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 *NullableCreateLoadBalancerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_create_load_balancer_payload_load_balancer_security_group.go b/services/loadbalancer/model_create_load_balancer_payload_load_balancer_security_group.go deleted file mode 100644 index 806af962e8..0000000000 --- a/services/loadbalancer/model_create_load_balancer_payload_load_balancer_security_group.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the CreateLoadBalancerPayloadLoadBalancerSecurityGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateLoadBalancerPayloadLoadBalancerSecurityGroup{} - -/* - 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 CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeTypeOk(arg CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType) (ret CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType(arg *CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType, val CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType = 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 CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType) (ret CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType(arg *CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType, val CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType = string - -// CreateLoadBalancerPayloadLoadBalancerSecurityGroup Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadLoadBalancerSecurityGroup struct { - // ID of the security Group - Id CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType `json:"id,omitempty"` - // Name of the security Group - Name CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType `json:"name,omitempty"` -} - -// NewCreateLoadBalancerPayloadLoadBalancerSecurityGroup instantiates a new CreateLoadBalancerPayloadLoadBalancerSecurityGroup 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 NewCreateLoadBalancerPayloadLoadBalancerSecurityGroup() *CreateLoadBalancerPayloadLoadBalancerSecurityGroup { - this := CreateLoadBalancerPayloadLoadBalancerSecurityGroup{} - return &this -} - -// NewCreateLoadBalancerPayloadLoadBalancerSecurityGroupWithDefaults instantiates a new CreateLoadBalancerPayloadLoadBalancerSecurityGroup 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 NewCreateLoadBalancerPayloadLoadBalancerSecurityGroupWithDefaults() *CreateLoadBalancerPayloadLoadBalancerSecurityGroup { - this := CreateLoadBalancerPayloadLoadBalancerSecurityGroup{} - 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 *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetId() (res CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType) { - 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 *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetIdOk() (ret CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType, ok bool) { - return getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeTypeOk(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 *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) 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 *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) SetId(v CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType) { - setCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType(&o.Id, 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 *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetName() (res CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType) { - 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 *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetNameOk() (ret CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType, ok bool) { - return getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeTypeOk(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 *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) 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 *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) SetName(v CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType) { - setCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateLoadBalancerPayloadLoadBalancerSecurityGroup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeTypeOk(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 NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup struct { - value *CreateLoadBalancerPayloadLoadBalancerSecurityGroup - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) Get() *CreateLoadBalancerPayloadLoadBalancerSecurityGroup { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) Set(val *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) { - 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 NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) 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 *NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) 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 NewNullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup(val *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) *NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup { - return &NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup{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 NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) 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 *NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_create_load_balancer_payload_load_balancer_security_group_test.go b/services/loadbalancer/model_create_load_balancer_payload_load_balancer_security_group_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_create_load_balancer_payload_load_balancer_security_group_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go b/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go deleted file mode 100644 index 35622fc49a..0000000000 --- a/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the CreateLoadBalancerPayloadTargetSecurityGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateLoadBalancerPayloadTargetSecurityGroup{} - -/* - 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 CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeTypeOk(arg CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType) (ret CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType(arg *CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType, val CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadTargetSecurityGroupGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType = 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 CreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType) (ret CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType(arg *CreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType, val CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadTargetSecurityGroupGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType = string - -// CreateLoadBalancerPayloadTargetSecurityGroup Security Group that allows the targets to receive traffic from the LoadBalancer. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateLoadBalancerPayloadTargetSecurityGroup struct { - // ID of the security Group - Id CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType `json:"id,omitempty"` - // Name of the security Group - Name CreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType `json:"name,omitempty"` -} - -// NewCreateLoadBalancerPayloadTargetSecurityGroup instantiates a new CreateLoadBalancerPayloadTargetSecurityGroup 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 NewCreateLoadBalancerPayloadTargetSecurityGroup() *CreateLoadBalancerPayloadTargetSecurityGroup { - this := CreateLoadBalancerPayloadTargetSecurityGroup{} - return &this -} - -// NewCreateLoadBalancerPayloadTargetSecurityGroupWithDefaults instantiates a new CreateLoadBalancerPayloadTargetSecurityGroup 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 NewCreateLoadBalancerPayloadTargetSecurityGroupWithDefaults() *CreateLoadBalancerPayloadTargetSecurityGroup { - this := CreateLoadBalancerPayloadTargetSecurityGroup{} - 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 *CreateLoadBalancerPayloadTargetSecurityGroup) GetId() (res CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType) { - 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 *CreateLoadBalancerPayloadTargetSecurityGroup) GetIdOk() (ret CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType, ok bool) { - return getCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeTypeOk(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 *CreateLoadBalancerPayloadTargetSecurityGroup) 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 *CreateLoadBalancerPayloadTargetSecurityGroup) SetId(v CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType) { - setCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType(&o.Id, 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 *CreateLoadBalancerPayloadTargetSecurityGroup) GetName() (res CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType) { - 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 *CreateLoadBalancerPayloadTargetSecurityGroup) GetNameOk() (ret CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType, ok bool) { - return getCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeTypeOk(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 *CreateLoadBalancerPayloadTargetSecurityGroup) 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 *CreateLoadBalancerPayloadTargetSecurityGroup) SetName(v CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType) { - setCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateLoadBalancerPayloadTargetSecurityGroup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeTypeOk(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 NullableCreateLoadBalancerPayloadTargetSecurityGroup struct { - value *CreateLoadBalancerPayloadTargetSecurityGroup - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateLoadBalancerPayloadTargetSecurityGroup) Get() *CreateLoadBalancerPayloadTargetSecurityGroup { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateLoadBalancerPayloadTargetSecurityGroup) Set(val *CreateLoadBalancerPayloadTargetSecurityGroup) { - 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 NullableCreateLoadBalancerPayloadTargetSecurityGroup) 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 *NullableCreateLoadBalancerPayloadTargetSecurityGroup) 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 NewNullableCreateLoadBalancerPayloadTargetSecurityGroup(val *CreateLoadBalancerPayloadTargetSecurityGroup) *NullableCreateLoadBalancerPayloadTargetSecurityGroup { - return &NullableCreateLoadBalancerPayloadTargetSecurityGroup{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 NullableCreateLoadBalancerPayloadTargetSecurityGroup) 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 *NullableCreateLoadBalancerPayloadTargetSecurityGroup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_create_load_balancer_payload_target_security_group_test.go b/services/loadbalancer/model_create_load_balancer_payload_target_security_group_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_create_load_balancer_payload_target_security_group_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_create_load_balancer_payload_test.go b/services/loadbalancer/model_create_load_balancer_payload_test.go deleted file mode 100644 index 6d278d2886..0000000000 --- a/services/loadbalancer/model_create_load_balancer_payload_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer - -import ( - "testing" -) - -// isEnum - -func TestCreateLoadBalancerPayloadStatus_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"STATUS_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"STATUS_PENDING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"STATUS_READY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"STATUS_ERROR"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"STATUS_TERMINATING"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := CreateLoadBalancerPayloadStatus("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/loadbalancer/model_credentials_response.go b/services/loadbalancer/model_credentials_response.go deleted file mode 100644 index d3dc597290..0000000000 --- a/services/loadbalancer/model_credentials_response.go +++ /dev/null @@ -1,329 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CredentialsResponse{} - -/* - types and functions for credentialsRef -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetCredentialsRefAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCredentialsResponseGetCredentialsRefAttributeTypeOk(arg CredentialsResponseGetCredentialsRefAttributeType) (ret CredentialsResponseGetCredentialsRefRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCredentialsResponseGetCredentialsRefAttributeType(arg *CredentialsResponseGetCredentialsRefAttributeType, val CredentialsResponseGetCredentialsRefRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetCredentialsRefArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetCredentialsRefRetType = string - -/* - types and functions for displayName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetDisplayNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCredentialsResponseGetDisplayNameAttributeTypeOk(arg CredentialsResponseGetDisplayNameAttributeType) (ret CredentialsResponseGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCredentialsResponseGetDisplayNameAttributeType(arg *CredentialsResponseGetDisplayNameAttributeType, val CredentialsResponseGetDisplayNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetDisplayNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetDisplayNameRetType = 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 CredentialsResponseGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCredentialsResponseGetRegionAttributeTypeOk(arg CredentialsResponseGetRegionAttributeType) (ret CredentialsResponseGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCredentialsResponseGetRegionAttributeType(arg *CredentialsResponseGetRegionAttributeType, val CredentialsResponseGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetRegionRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetUsernameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCredentialsResponseGetUsernameAttributeTypeOk(arg CredentialsResponseGetUsernameAttributeType) (ret CredentialsResponseGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCredentialsResponseGetUsernameAttributeType(arg *CredentialsResponseGetUsernameAttributeType, val CredentialsResponseGetUsernameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetUsernameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponseGetUsernameRetType = string - -// CredentialsResponse struct for CredentialsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CredentialsResponse struct { - // The credentials reference can be used for observability of the Load Balancer. - CredentialsRef CredentialsResponseGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` - // Credential name - DisplayName CredentialsResponseGetDisplayNameAttributeType `json:"displayName,omitempty"` - // Region of the Credential - Region CredentialsResponseGetRegionAttributeType `json:"region,omitempty"` - // The username used for the STACKIT Observability instance - Username CredentialsResponseGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewCredentialsResponse instantiates a new CredentialsResponse 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 NewCredentialsResponse() *CredentialsResponse { - this := CredentialsResponse{} - return &this -} - -// NewCredentialsResponseWithDefaults instantiates a new CredentialsResponse 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 NewCredentialsResponseWithDefaults() *CredentialsResponse { - this := CredentialsResponse{} - return &this -} - -// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) GetCredentialsRef() (res CredentialsResponseGetCredentialsRefRetType) { - res, _ = o.GetCredentialsRefOk() - return -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) GetCredentialsRefOk() (ret CredentialsResponseGetCredentialsRefRetType, ok bool) { - return getCredentialsResponseGetCredentialsRefAttributeTypeOk(o.CredentialsRef) -} - -// HasCredentialsRef returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) HasCredentialsRef() bool { - _, ok := o.GetCredentialsRefOk() - return ok -} - -// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) SetCredentialsRef(v CredentialsResponseGetCredentialsRefRetType) { - setCredentialsResponseGetCredentialsRefAttributeType(&o.CredentialsRef, v) -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) GetDisplayName() (res CredentialsResponseGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) GetDisplayNameOk() (ret CredentialsResponseGetDisplayNameRetType, ok bool) { - return getCredentialsResponseGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) HasDisplayName() bool { - _, ok := o.GetDisplayNameOk() - return ok -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) SetDisplayName(v CredentialsResponseGetDisplayNameRetType) { - setCredentialsResponseGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetRegion returns the Region field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) GetRegion() (res CredentialsResponseGetRegionRetType) { - res, _ = o.GetRegionOk() - return -} - -// GetRegionOk returns a tuple with the Region field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) GetRegionOk() (ret CredentialsResponseGetRegionRetType, ok bool) { - return getCredentialsResponseGetRegionAttributeTypeOk(o.Region) -} - -// HasRegion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) HasRegion() bool { - _, ok := o.GetRegionOk() - return ok -} - -// SetRegion gets a reference to the given string and assigns it to the Region field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) SetRegion(v CredentialsResponseGetRegionRetType) { - setCredentialsResponseGetRegionAttributeType(&o.Region, v) -} - -// GetUsername returns the Username field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) GetUsername() (res CredentialsResponseGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) GetUsernameOk() (ret CredentialsResponseGetUsernameRetType, ok bool) { - return getCredentialsResponseGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) HasUsername() bool { - _, ok := o.GetUsernameOk() - return ok -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CredentialsResponse) SetUsername(v CredentialsResponseGetUsernameRetType) { - setCredentialsResponseGetUsernameAttributeType(&o.Username, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCredentialsResponseGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { - toSerialize["CredentialsRef"] = val - } - if val, ok := getCredentialsResponseGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getCredentialsResponseGetRegionAttributeTypeOk(o.Region); ok { - toSerialize["Region"] = val - } - if val, ok := getCredentialsResponseGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCredentialsResponse struct { - value *CredentialsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCredentialsResponse) Get() *CredentialsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCredentialsResponse) Set(val *CredentialsResponse) { - 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 NullableCredentialsResponse) 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 *NullableCredentialsResponse) 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 NewNullableCredentialsResponse(val *CredentialsResponse) *NullableCredentialsResponse { - return &NullableCredentialsResponse{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 NullableCredentialsResponse) 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 *NullableCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_credentials_response_test.go b/services/loadbalancer/model_credentials_response_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_get_credentials_response.go b/services/loadbalancer/model_get_credentials_response.go deleted file mode 100644 index a932460e12..0000000000 --- a/services/loadbalancer/model_get_credentials_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCredentialsResponse{} - -/* - types and functions for credential -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCredentialsResponseGetCredentialAttributeType = *CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCredentialsResponseGetCredentialArgType = CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCredentialsResponseGetCredentialRetType = CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCredentialsResponseGetCredentialAttributeTypeOk(arg GetCredentialsResponseGetCredentialAttributeType) (ret GetCredentialsResponseGetCredentialRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCredentialsResponseGetCredentialAttributeType(arg *GetCredentialsResponseGetCredentialAttributeType, val GetCredentialsResponseGetCredentialRetType) { - *arg = &val -} - -// GetCredentialsResponse struct for GetCredentialsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCredentialsResponse struct { - Credential GetCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` -} - -// NewGetCredentialsResponse instantiates a new GetCredentialsResponse 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 NewGetCredentialsResponse() *GetCredentialsResponse { - this := GetCredentialsResponse{} - return &this -} - -// NewGetCredentialsResponseWithDefaults instantiates a new GetCredentialsResponse 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 NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse { - this := GetCredentialsResponse{} - return &this -} - -// GetCredential returns the Credential field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCredentialsResponse) GetCredential() (res GetCredentialsResponseGetCredentialRetType) { - res, _ = o.GetCredentialOk() - return -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCredentialsResponse) GetCredentialOk() (ret GetCredentialsResponseGetCredentialRetType, ok bool) { - return getGetCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) -} - -// HasCredential returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCredentialsResponse) HasCredential() bool { - _, ok := o.GetCredentialOk() - return ok -} - -// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCredentialsResponse) SetCredential(v GetCredentialsResponseGetCredentialRetType) { - setGetCredentialsResponseGetCredentialAttributeType(&o.Credential, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { - toSerialize["Credential"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetCredentialsResponse struct { - value *GetCredentialsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCredentialsResponse) Get() *GetCredentialsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCredentialsResponse) Set(val *GetCredentialsResponse) { - 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 NullableGetCredentialsResponse) 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 *NullableGetCredentialsResponse) 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 NewNullableGetCredentialsResponse(val *GetCredentialsResponse) *NullableGetCredentialsResponse { - return &NullableGetCredentialsResponse{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 NullableGetCredentialsResponse) 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 *NullableGetCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_get_credentials_response_test.go b/services/loadbalancer/model_get_credentials_response_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_get_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_get_quota_response.go b/services/loadbalancer/model_get_quota_response.go deleted file mode 100644 index 5d2b544ee8..0000000000 --- a/services/loadbalancer/model_get_quota_response.go +++ /dev/null @@ -1,451 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the GetQuotaResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetQuotaResponse{} - -/* - types and functions for maxCredentials -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetMaxCredentialsAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetMaxCredentialsArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetMaxCredentialsRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetQuotaResponseGetMaxCredentialsAttributeTypeOk(arg GetQuotaResponseGetMaxCredentialsAttributeType) (ret GetQuotaResponseGetMaxCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetQuotaResponseGetMaxCredentialsAttributeType(arg *GetQuotaResponseGetMaxCredentialsAttributeType, val GetQuotaResponseGetMaxCredentialsRetType) { - *arg = &val -} - -/* - types and functions for maxLoadBalancers -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetMaxLoadBalancersAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetMaxLoadBalancersArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetMaxLoadBalancersRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(arg GetQuotaResponseGetMaxLoadBalancersAttributeType) (ret GetQuotaResponseGetMaxLoadBalancersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetQuotaResponseGetMaxLoadBalancersAttributeType(arg *GetQuotaResponseGetMaxLoadBalancersAttributeType, val GetQuotaResponseGetMaxLoadBalancersRetType) { - *arg = &val -} - -/* - types and functions for projectId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetProjectIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetQuotaResponseGetProjectIdAttributeTypeOk(arg GetQuotaResponseGetProjectIdAttributeType) (ret GetQuotaResponseGetProjectIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetQuotaResponseGetProjectIdAttributeType(arg *GetQuotaResponseGetProjectIdAttributeType, val GetQuotaResponseGetProjectIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetProjectIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetProjectIdRetType = 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 GetQuotaResponseGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetQuotaResponseGetRegionAttributeTypeOk(arg GetQuotaResponseGetRegionAttributeType) (ret GetQuotaResponseGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetQuotaResponseGetRegionAttributeType(arg *GetQuotaResponseGetRegionAttributeType, val GetQuotaResponseGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetRegionRetType = string - -/* - types and functions for usedCredentials -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetUsedCredentialsAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetUsedCredentialsArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetUsedCredentialsRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetQuotaResponseGetUsedCredentialsAttributeTypeOk(arg GetQuotaResponseGetUsedCredentialsAttributeType) (ret GetQuotaResponseGetUsedCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetQuotaResponseGetUsedCredentialsAttributeType(arg *GetQuotaResponseGetUsedCredentialsAttributeType, val GetQuotaResponseGetUsedCredentialsRetType) { - *arg = &val -} - -/* - types and functions for usedLoadBalancers -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetUsedLoadBalancersAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetUsedLoadBalancersArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponseGetUsedLoadBalancersRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetQuotaResponseGetUsedLoadBalancersAttributeTypeOk(arg GetQuotaResponseGetUsedLoadBalancersAttributeType) (ret GetQuotaResponseGetUsedLoadBalancersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetQuotaResponseGetUsedLoadBalancersAttributeType(arg *GetQuotaResponseGetUsedLoadBalancersAttributeType, val GetQuotaResponseGetUsedLoadBalancersRetType) { - *arg = &val -} - -// GetQuotaResponse struct for GetQuotaResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetQuotaResponse struct { - // The maximum number of observability credentials that can be stored in this project. - // Can be cast to int32 without loss of precision. - MaxCredentials GetQuotaResponseGetMaxCredentialsAttributeType `json:"maxCredentials,omitempty"` - // The maximum number of load balancing servers in this project. - // Can be cast to int32 without loss of precision. - MaxLoadBalancers GetQuotaResponseGetMaxLoadBalancersAttributeType `json:"maxLoadBalancers,omitempty"` - // Project identifier - ProjectId GetQuotaResponseGetProjectIdAttributeType `json:"projectId,omitempty"` - // Region - Region GetQuotaResponseGetRegionAttributeType `json:"region,omitempty"` - // The number of observability credentials that are currently existing in this project. - // Can be cast to int32 without loss of precision. - UsedCredentials GetQuotaResponseGetUsedCredentialsAttributeType `json:"usedCredentials,omitempty"` - // The number of load balancing servers that are currently existing in this project. - // Can be cast to int32 without loss of precision. - UsedLoadBalancers GetQuotaResponseGetUsedLoadBalancersAttributeType `json:"usedLoadBalancers,omitempty"` -} - -// NewGetQuotaResponse instantiates a new GetQuotaResponse 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 NewGetQuotaResponse() *GetQuotaResponse { - this := GetQuotaResponse{} - return &this -} - -// NewGetQuotaResponseWithDefaults instantiates a new GetQuotaResponse 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 NewGetQuotaResponseWithDefaults() *GetQuotaResponse { - this := GetQuotaResponse{} - return &this -} - -// GetMaxCredentials returns the MaxCredentials field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetMaxCredentials() (res GetQuotaResponseGetMaxCredentialsRetType) { - res, _ = o.GetMaxCredentialsOk() - return -} - -// GetMaxCredentialsOk returns a tuple with the MaxCredentials field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetMaxCredentialsOk() (ret GetQuotaResponseGetMaxCredentialsRetType, ok bool) { - return getGetQuotaResponseGetMaxCredentialsAttributeTypeOk(o.MaxCredentials) -} - -// HasMaxCredentials returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) HasMaxCredentials() bool { - _, ok := o.GetMaxCredentialsOk() - return ok -} - -// SetMaxCredentials gets a reference to the given int64 and assigns it to the MaxCredentials field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) SetMaxCredentials(v GetQuotaResponseGetMaxCredentialsRetType) { - setGetQuotaResponseGetMaxCredentialsAttributeType(&o.MaxCredentials, v) -} - -// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetMaxLoadBalancers() (res GetQuotaResponseGetMaxLoadBalancersRetType) { - res, _ = o.GetMaxLoadBalancersOk() - return -} - -// GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (ret GetQuotaResponseGetMaxLoadBalancersRetType, ok bool) { - return getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(o.MaxLoadBalancers) -} - -// HasMaxLoadBalancers returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) HasMaxLoadBalancers() bool { - _, ok := o.GetMaxLoadBalancersOk() - return ok -} - -// SetMaxLoadBalancers gets a reference to the given int64 and assigns it to the MaxLoadBalancers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) SetMaxLoadBalancers(v GetQuotaResponseGetMaxLoadBalancersRetType) { - setGetQuotaResponseGetMaxLoadBalancersAttributeType(&o.MaxLoadBalancers, v) -} - -// GetProjectId returns the ProjectId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetProjectId() (res GetQuotaResponseGetProjectIdRetType) { - res, _ = o.GetProjectIdOk() - return -} - -// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetProjectIdOk() (ret GetQuotaResponseGetProjectIdRetType, ok bool) { - return getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId) -} - -// HasProjectId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) HasProjectId() bool { - _, ok := o.GetProjectIdOk() - return ok -} - -// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) SetProjectId(v GetQuotaResponseGetProjectIdRetType) { - setGetQuotaResponseGetProjectIdAttributeType(&o.ProjectId, v) -} - -// GetRegion returns the Region field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetRegion() (res GetQuotaResponseGetRegionRetType) { - res, _ = o.GetRegionOk() - return -} - -// GetRegionOk returns a tuple with the Region field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetRegionOk() (ret GetQuotaResponseGetRegionRetType, ok bool) { - return getGetQuotaResponseGetRegionAttributeTypeOk(o.Region) -} - -// HasRegion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) HasRegion() bool { - _, ok := o.GetRegionOk() - return ok -} - -// SetRegion gets a reference to the given string and assigns it to the Region field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) SetRegion(v GetQuotaResponseGetRegionRetType) { - setGetQuotaResponseGetRegionAttributeType(&o.Region, v) -} - -// GetUsedCredentials returns the UsedCredentials field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetUsedCredentials() (res GetQuotaResponseGetUsedCredentialsRetType) { - res, _ = o.GetUsedCredentialsOk() - return -} - -// GetUsedCredentialsOk returns a tuple with the UsedCredentials field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetUsedCredentialsOk() (ret GetQuotaResponseGetUsedCredentialsRetType, ok bool) { - return getGetQuotaResponseGetUsedCredentialsAttributeTypeOk(o.UsedCredentials) -} - -// HasUsedCredentials returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) HasUsedCredentials() bool { - _, ok := o.GetUsedCredentialsOk() - return ok -} - -// SetUsedCredentials gets a reference to the given int64 and assigns it to the UsedCredentials field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) SetUsedCredentials(v GetQuotaResponseGetUsedCredentialsRetType) { - setGetQuotaResponseGetUsedCredentialsAttributeType(&o.UsedCredentials, v) -} - -// GetUsedLoadBalancers returns the UsedLoadBalancers field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetUsedLoadBalancers() (res GetQuotaResponseGetUsedLoadBalancersRetType) { - res, _ = o.GetUsedLoadBalancersOk() - return -} - -// GetUsedLoadBalancersOk returns a tuple with the UsedLoadBalancers field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) GetUsedLoadBalancersOk() (ret GetQuotaResponseGetUsedLoadBalancersRetType, ok bool) { - return getGetQuotaResponseGetUsedLoadBalancersAttributeTypeOk(o.UsedLoadBalancers) -} - -// HasUsedLoadBalancers returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) HasUsedLoadBalancers() bool { - _, ok := o.GetUsedLoadBalancersOk() - return ok -} - -// SetUsedLoadBalancers gets a reference to the given int64 and assigns it to the UsedLoadBalancers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetQuotaResponse) SetUsedLoadBalancers(v GetQuotaResponseGetUsedLoadBalancersRetType) { - setGetQuotaResponseGetUsedLoadBalancersAttributeType(&o.UsedLoadBalancers, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetQuotaResponseGetMaxCredentialsAttributeTypeOk(o.MaxCredentials); ok { - toSerialize["MaxCredentials"] = val - } - if val, ok := getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(o.MaxLoadBalancers); ok { - toSerialize["MaxLoadBalancers"] = val - } - if val, ok := getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { - toSerialize["ProjectId"] = val - } - if val, ok := getGetQuotaResponseGetRegionAttributeTypeOk(o.Region); ok { - toSerialize["Region"] = val - } - if val, ok := getGetQuotaResponseGetUsedCredentialsAttributeTypeOk(o.UsedCredentials); ok { - toSerialize["UsedCredentials"] = val - } - if val, ok := getGetQuotaResponseGetUsedLoadBalancersAttributeTypeOk(o.UsedLoadBalancers); ok { - toSerialize["UsedLoadBalancers"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetQuotaResponse struct { - value *GetQuotaResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetQuotaResponse) Get() *GetQuotaResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetQuotaResponse) Set(val *GetQuotaResponse) { - 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 NullableGetQuotaResponse) 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 *NullableGetQuotaResponse) 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 NewNullableGetQuotaResponse(val *GetQuotaResponse) *NullableGetQuotaResponse { - return &NullableGetQuotaResponse{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 NullableGetQuotaResponse) 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 *NullableGetQuotaResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_get_quota_response_test.go b/services/loadbalancer/model_get_quota_response_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_get_quota_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_google_protobuf_any.go b/services/loadbalancer/model_google_protobuf_any.go deleted file mode 100644 index 11fb6a77a4..0000000000 --- a/services/loadbalancer/model_google_protobuf_any.go +++ /dev/null @@ -1,161 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GoogleProtobufAny{} - -/* - 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 GoogleProtobufAnyGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGoogleProtobufAnyGetTypeAttributeTypeOk(arg GoogleProtobufAnyGetTypeAttributeType) (ret GoogleProtobufAnyGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGoogleProtobufAnyGetTypeAttributeType(arg *GoogleProtobufAnyGetTypeAttributeType, val GoogleProtobufAnyGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GoogleProtobufAnyGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GoogleProtobufAnyGetTypeRetType = string - -// GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GoogleProtobufAny struct { - // The type of the serialized message. - Type GoogleProtobufAnyGetTypeAttributeType `json:"@type,omitempty"` - AdditionalProperties map[string]interface{} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GoogleProtobufAny GoogleProtobufAny - -// NewGoogleProtobufAny instantiates a new GoogleProtobufAny 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 NewGoogleProtobufAny() *GoogleProtobufAny { - this := GoogleProtobufAny{} - return &this -} - -// NewGoogleProtobufAnyWithDefaults instantiates a new GoogleProtobufAny 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 NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny { - this := GoogleProtobufAny{} - return &this -} - -// 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 *GoogleProtobufAny) GetType() (res GoogleProtobufAnyGetTypeRetType) { - 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 *GoogleProtobufAny) GetTypeOk() (ret GoogleProtobufAnyGetTypeRetType, ok bool) { - return getGoogleProtobufAnyGetTypeAttributeTypeOk(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 *GoogleProtobufAny) 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 *GoogleProtobufAny) SetType(v GoogleProtobufAnyGetTypeRetType) { - setGoogleProtobufAnyGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGoogleProtobufAny struct { - value *GoogleProtobufAny - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGoogleProtobufAny) Get() *GoogleProtobufAny { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGoogleProtobufAny) Set(val *GoogleProtobufAny) { - 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 NullableGoogleProtobufAny) 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 *NullableGoogleProtobufAny) 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 NewNullableGoogleProtobufAny(val *GoogleProtobufAny) *NullableGoogleProtobufAny { - return &NullableGoogleProtobufAny{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 NullableGoogleProtobufAny) 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 *NullableGoogleProtobufAny) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_google_protobuf_any_test.go b/services/loadbalancer/model_google_protobuf_any_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_google_protobuf_any_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_http_health_checks.go b/services/loadbalancer/model_http_health_checks.go deleted file mode 100644 index ca297e25db..0000000000 --- a/services/loadbalancer/model_http_health_checks.go +++ /dev/null @@ -1,269 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the HttpHealthChecks type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HttpHealthChecks{} - -/* - types and functions for okStatuses -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetOkStatusesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetOkStatusesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetOkStatusesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpHealthChecksGetOkStatusesAttributeTypeOk(arg HttpHealthChecksGetOkStatusesAttributeType) (ret HttpHealthChecksGetOkStatusesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpHealthChecksGetOkStatusesAttributeType(arg *HttpHealthChecksGetOkStatusesAttributeType, val HttpHealthChecksGetOkStatusesRetType) { - *arg = &val -} - -/* - types and functions for path -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetPathAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpHealthChecksGetPathAttributeTypeOk(arg HttpHealthChecksGetPathAttributeType) (ret HttpHealthChecksGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpHealthChecksGetPathAttributeType(arg *HttpHealthChecksGetPathAttributeType, val HttpHealthChecksGetPathRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetPathArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetPathRetType = string - -/* - types and functions for tls -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetTlsAttributeType = *TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetTlsArgType = TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecksGetTlsRetType = TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpHealthChecksGetTlsAttributeTypeOk(arg HttpHealthChecksGetTlsAttributeType) (ret HttpHealthChecksGetTlsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpHealthChecksGetTlsAttributeType(arg *HttpHealthChecksGetTlsAttributeType, val HttpHealthChecksGetTlsRetType) { - *arg = &val -} - -// HttpHealthChecks Options for the HTTP health checking. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpHealthChecks struct { - // List of HTTP status codes that indicate a healthy response - OkStatuses HttpHealthChecksGetOkStatusesAttributeType `json:"okStatuses,omitempty"` - // Path to send the health check request to - Path HttpHealthChecksGetPathAttributeType `json:"path,omitempty"` - Tls HttpHealthChecksGetTlsAttributeType `json:"tls,omitempty"` -} - -// NewHttpHealthChecks instantiates a new HttpHealthChecks 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 NewHttpHealthChecks() *HttpHealthChecks { - this := HttpHealthChecks{} - return &this -} - -// NewHttpHealthChecksWithDefaults instantiates a new HttpHealthChecks 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 NewHttpHealthChecksWithDefaults() *HttpHealthChecks { - this := HttpHealthChecks{} - return &this -} - -// GetOkStatuses returns the OkStatuses field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) GetOkStatuses() (res HttpHealthChecksGetOkStatusesRetType) { - res, _ = o.GetOkStatusesOk() - return -} - -// GetOkStatusesOk returns a tuple with the OkStatuses field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) GetOkStatusesOk() (ret HttpHealthChecksGetOkStatusesRetType, ok bool) { - return getHttpHealthChecksGetOkStatusesAttributeTypeOk(o.OkStatuses) -} - -// HasOkStatuses returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) HasOkStatuses() bool { - _, ok := o.GetOkStatusesOk() - return ok -} - -// SetOkStatuses gets a reference to the given []string and assigns it to the OkStatuses field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) SetOkStatuses(v HttpHealthChecksGetOkStatusesRetType) { - setHttpHealthChecksGetOkStatusesAttributeType(&o.OkStatuses, v) -} - -// GetPath returns the Path field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) GetPath() (res HttpHealthChecksGetPathRetType) { - res, _ = o.GetPathOk() - return -} - -// GetPathOk returns a tuple with the Path field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) GetPathOk() (ret HttpHealthChecksGetPathRetType, ok bool) { - return getHttpHealthChecksGetPathAttributeTypeOk(o.Path) -} - -// HasPath returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) HasPath() bool { - _, ok := o.GetPathOk() - return ok -} - -// SetPath gets a reference to the given string and assigns it to the Path field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) SetPath(v HttpHealthChecksGetPathRetType) { - setHttpHealthChecksGetPathAttributeType(&o.Path, v) -} - -// GetTls returns the Tls field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) GetTls() (res HttpHealthChecksGetTlsRetType) { - res, _ = o.GetTlsOk() - return -} - -// GetTlsOk returns a tuple with the Tls field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) GetTlsOk() (ret HttpHealthChecksGetTlsRetType, ok bool) { - return getHttpHealthChecksGetTlsAttributeTypeOk(o.Tls) -} - -// HasTls returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) HasTls() bool { - _, ok := o.GetTlsOk() - return ok -} - -// SetTls gets a reference to the given TlsConfig and assigns it to the Tls field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpHealthChecks) SetTls(v HttpHealthChecksGetTlsRetType) { - setHttpHealthChecksGetTlsAttributeType(&o.Tls, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o HttpHealthChecks) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHttpHealthChecksGetOkStatusesAttributeTypeOk(o.OkStatuses); ok { - toSerialize["OkStatuses"] = val - } - if val, ok := getHttpHealthChecksGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - if val, ok := getHttpHealthChecksGetTlsAttributeTypeOk(o.Tls); ok { - toSerialize["Tls"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHttpHealthChecks struct { - value *HttpHealthChecks - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpHealthChecks) Get() *HttpHealthChecks { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpHealthChecks) Set(val *HttpHealthChecks) { - 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 NullableHttpHealthChecks) 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 *NullableHttpHealthChecks) 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 NewNullableHttpHealthChecks(val *HttpHealthChecks) *NullableHttpHealthChecks { - return &NullableHttpHealthChecks{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 NullableHttpHealthChecks) 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 *NullableHttpHealthChecks) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_http_health_checks_test.go b/services/loadbalancer/model_http_health_checks_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_http_health_checks_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_list_credentials_response.go b/services/loadbalancer/model_list_credentials_response.go deleted file mode 100644 index cf3f514e6b..0000000000 --- a/services/loadbalancer/model_list_credentials_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListCredentialsResponse{} - -/* - types and functions for credentials -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCredentialsResponseGetCredentialsAttributeType = *[]CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCredentialsResponseGetCredentialsArgType = []CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCredentialsResponseGetCredentialsRetType = []CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListCredentialsResponseGetCredentialsAttributeTypeOk(arg ListCredentialsResponseGetCredentialsAttributeType) (ret ListCredentialsResponseGetCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListCredentialsResponseGetCredentialsAttributeType(arg *ListCredentialsResponseGetCredentialsAttributeType, val ListCredentialsResponseGetCredentialsRetType) { - *arg = &val -} - -// ListCredentialsResponse struct for ListCredentialsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCredentialsResponse struct { - Credentials ListCredentialsResponseGetCredentialsAttributeType `json:"credentials,omitempty"` -} - -// NewListCredentialsResponse instantiates a new ListCredentialsResponse 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 NewListCredentialsResponse() *ListCredentialsResponse { - this := ListCredentialsResponse{} - return &this -} - -// NewListCredentialsResponseWithDefaults instantiates a new ListCredentialsResponse 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 NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { - this := ListCredentialsResponse{} - return &this -} - -// GetCredentials returns the Credentials field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListCredentialsResponse) GetCredentials() (res ListCredentialsResponseGetCredentialsRetType) { - res, _ = o.GetCredentialsOk() - return -} - -// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListCredentialsResponse) GetCredentialsOk() (ret ListCredentialsResponseGetCredentialsRetType, ok bool) { - return getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials) -} - -// HasCredentials returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListCredentialsResponse) HasCredentials() bool { - _, ok := o.GetCredentialsOk() - return ok -} - -// SetCredentials gets a reference to the given []CredentialsResponse and assigns it to the Credentials field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListCredentialsResponse) SetCredentials(v ListCredentialsResponseGetCredentialsRetType) { - setListCredentialsResponseGetCredentialsAttributeType(&o.Credentials, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials); ok { - toSerialize["Credentials"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListCredentialsResponse struct { - value *ListCredentialsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListCredentialsResponse) Get() *ListCredentialsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListCredentialsResponse) Set(val *ListCredentialsResponse) { - 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 NullableListCredentialsResponse) 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 *NullableListCredentialsResponse) 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 NewNullableListCredentialsResponse(val *ListCredentialsResponse) *NullableListCredentialsResponse { - return &NullableListCredentialsResponse{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 NullableListCredentialsResponse) 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 *NullableListCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_list_credentials_response_test.go b/services/loadbalancer/model_list_credentials_response_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_list_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_list_load_balancers_response.go b/services/loadbalancer/model_list_load_balancers_response.go deleted file mode 100644 index d74609937f..0000000000 --- a/services/loadbalancer/model_list_load_balancers_response.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the ListLoadBalancersResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListLoadBalancersResponse{} - -/* - types and functions for loadBalancers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListLoadBalancersResponseGetLoadBalancersAttributeType = *[]LoadBalancer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListLoadBalancersResponseGetLoadBalancersArgType = []LoadBalancer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListLoadBalancersResponseGetLoadBalancersRetType = []LoadBalancer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(arg ListLoadBalancersResponseGetLoadBalancersAttributeType) (ret ListLoadBalancersResponseGetLoadBalancersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListLoadBalancersResponseGetLoadBalancersAttributeType(arg *ListLoadBalancersResponseGetLoadBalancersAttributeType, val ListLoadBalancersResponseGetLoadBalancersRetType) { - *arg = &val -} - -/* - types and functions for nextPageId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListLoadBalancersResponseGetNextPageIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(arg ListLoadBalancersResponseGetNextPageIdAttributeType) (ret ListLoadBalancersResponseGetNextPageIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListLoadBalancersResponseGetNextPageIdAttributeType(arg *ListLoadBalancersResponseGetNextPageIdAttributeType, val ListLoadBalancersResponseGetNextPageIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListLoadBalancersResponseGetNextPageIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListLoadBalancersResponseGetNextPageIdRetType = string - -// ListLoadBalancersResponse struct for ListLoadBalancersResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListLoadBalancersResponse struct { - LoadBalancers ListLoadBalancersResponseGetLoadBalancersAttributeType `json:"loadBalancers,omitempty"` - // Continue token from the ListLoadBalancerResponse with Limit option - NextPageId ListLoadBalancersResponseGetNextPageIdAttributeType `json:"nextPageId,omitempty"` -} - -// NewListLoadBalancersResponse instantiates a new ListLoadBalancersResponse 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 NewListLoadBalancersResponse() *ListLoadBalancersResponse { - this := ListLoadBalancersResponse{} - return &this -} - -// NewListLoadBalancersResponseWithDefaults instantiates a new ListLoadBalancersResponse 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 NewListLoadBalancersResponseWithDefaults() *ListLoadBalancersResponse { - this := ListLoadBalancersResponse{} - return &this -} - -// GetLoadBalancers returns the LoadBalancers field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListLoadBalancersResponse) GetLoadBalancers() (res ListLoadBalancersResponseGetLoadBalancersRetType) { - res, _ = o.GetLoadBalancersOk() - return -} - -// GetLoadBalancersOk returns a tuple with the LoadBalancers field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListLoadBalancersResponse) GetLoadBalancersOk() (ret ListLoadBalancersResponseGetLoadBalancersRetType, ok bool) { - return getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(o.LoadBalancers) -} - -// HasLoadBalancers returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListLoadBalancersResponse) HasLoadBalancers() bool { - _, ok := o.GetLoadBalancersOk() - return ok -} - -// SetLoadBalancers gets a reference to the given []LoadBalancer and assigns it to the LoadBalancers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListLoadBalancersResponse) SetLoadBalancers(v ListLoadBalancersResponseGetLoadBalancersRetType) { - setListLoadBalancersResponseGetLoadBalancersAttributeType(&o.LoadBalancers, v) -} - -// GetNextPageId returns the NextPageId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListLoadBalancersResponse) GetNextPageId() (res ListLoadBalancersResponseGetNextPageIdRetType) { - res, _ = o.GetNextPageIdOk() - return -} - -// GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListLoadBalancersResponse) GetNextPageIdOk() (ret ListLoadBalancersResponseGetNextPageIdRetType, ok bool) { - return getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(o.NextPageId) -} - -// HasNextPageId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListLoadBalancersResponse) HasNextPageId() bool { - _, ok := o.GetNextPageIdOk() - return ok -} - -// SetNextPageId gets a reference to the given string and assigns it to the NextPageId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListLoadBalancersResponse) SetNextPageId(v ListLoadBalancersResponseGetNextPageIdRetType) { - setListLoadBalancersResponseGetNextPageIdAttributeType(&o.NextPageId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(o.LoadBalancers); ok { - toSerialize["LoadBalancers"] = val - } - if val, ok := getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(o.NextPageId); ok { - toSerialize["NextPageId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListLoadBalancersResponse struct { - value *ListLoadBalancersResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListLoadBalancersResponse) Get() *ListLoadBalancersResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListLoadBalancersResponse) Set(val *ListLoadBalancersResponse) { - 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 NullableListLoadBalancersResponse) 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 *NullableListLoadBalancersResponse) 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 NewNullableListLoadBalancersResponse(val *ListLoadBalancersResponse) *NullableListLoadBalancersResponse { - return &NullableListLoadBalancersResponse{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 NullableListLoadBalancersResponse) 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 *NullableListLoadBalancersResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_list_load_balancers_response_test.go b/services/loadbalancer/model_list_load_balancers_response_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_list_load_balancers_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_list_plans_response.go b/services/loadbalancer/model_list_plans_response.go deleted file mode 100644 index ee868057e5..0000000000 --- a/services/loadbalancer/model_list_plans_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the ListPlansResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListPlansResponse{} - -/* - types and functions for validPlans -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListPlansResponseGetValidPlansAttributeType = *[]PlanDetails - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListPlansResponseGetValidPlansArgType = []PlanDetails - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListPlansResponseGetValidPlansRetType = []PlanDetails - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListPlansResponseGetValidPlansAttributeTypeOk(arg ListPlansResponseGetValidPlansAttributeType) (ret ListPlansResponseGetValidPlansRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListPlansResponseGetValidPlansAttributeType(arg *ListPlansResponseGetValidPlansAttributeType, val ListPlansResponseGetValidPlansRetType) { - *arg = &val -} - -// ListPlansResponse struct for ListPlansResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListPlansResponse struct { - ValidPlans ListPlansResponseGetValidPlansAttributeType `json:"validPlans,omitempty"` -} - -// NewListPlansResponse instantiates a new ListPlansResponse 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 NewListPlansResponse() *ListPlansResponse { - this := ListPlansResponse{} - return &this -} - -// NewListPlansResponseWithDefaults instantiates a new ListPlansResponse 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 NewListPlansResponseWithDefaults() *ListPlansResponse { - this := ListPlansResponse{} - return &this -} - -// GetValidPlans returns the ValidPlans field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListPlansResponse) GetValidPlans() (res ListPlansResponseGetValidPlansRetType) { - res, _ = o.GetValidPlansOk() - return -} - -// GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListPlansResponse) GetValidPlansOk() (ret ListPlansResponseGetValidPlansRetType, ok bool) { - return getListPlansResponseGetValidPlansAttributeTypeOk(o.ValidPlans) -} - -// HasValidPlans returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListPlansResponse) HasValidPlans() bool { - _, ok := o.GetValidPlansOk() - return ok -} - -// SetValidPlans gets a reference to the given []PlanDetails and assigns it to the ValidPlans field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListPlansResponse) SetValidPlans(v ListPlansResponseGetValidPlansRetType) { - setListPlansResponseGetValidPlansAttributeType(&o.ValidPlans, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListPlansResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListPlansResponseGetValidPlansAttributeTypeOk(o.ValidPlans); ok { - toSerialize["ValidPlans"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListPlansResponse struct { - value *ListPlansResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListPlansResponse) Get() *ListPlansResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListPlansResponse) Set(val *ListPlansResponse) { - 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 NullableListPlansResponse) 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 *NullableListPlansResponse) 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 NewNullableListPlansResponse(val *ListPlansResponse) *NullableListPlansResponse { - return &NullableListPlansResponse{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 NullableListPlansResponse) 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 *NullableListPlansResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_list_plans_response_test.go b/services/loadbalancer/model_list_plans_response_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_list_plans_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_listener.go b/services/loadbalancer/model_listener.go deleted file mode 100644 index d9dbc70ab9..0000000000 --- a/services/loadbalancer/model_listener.go +++ /dev/null @@ -1,693 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" - "fmt" -) - -// checks if the Listener type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Listener{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetDisplayNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListenerGetDisplayNameAttributeTypeOk(arg ListenerGetDisplayNameAttributeType) (ret ListenerGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListenerGetDisplayNameAttributeType(arg *ListenerGetDisplayNameAttributeType, val ListenerGetDisplayNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetDisplayNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetDisplayNameRetType = 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 ListenerGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListenerGetNameAttributeTypeOk(arg ListenerGetNameAttributeType) (ret ListenerGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListenerGetNameAttributeType(arg *ListenerGetNameAttributeType, val ListenerGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetNameRetType = string - -/* - types and functions for port -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetPortAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetPortArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetPortRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListenerGetPortAttributeTypeOk(arg ListenerGetPortAttributeType) (ret ListenerGetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListenerGetPortAttributeType(arg *ListenerGetPortAttributeType, val ListenerGetPortRetType) { - *arg = &val -} - -/* - types and functions for protocol -*/ - -// isEnum - -// ListenerProtocol Protocol is the highest network protocol we understand to load balance. Currently only PROTOCOL_TCP, PROTOCOL_TCP_PROXY and PROTOCOL_TLS_PASSTHROUGH are supported. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerProtocol string - -// List of Protocol -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LISTENERPROTOCOL_UNSPECIFIED ListenerProtocol = "PROTOCOL_UNSPECIFIED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LISTENERPROTOCOL_TCP ListenerProtocol = "PROTOCOL_TCP" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LISTENERPROTOCOL_UDP ListenerProtocol = "PROTOCOL_UDP" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LISTENERPROTOCOL_TCP_PROXY ListenerProtocol = "PROTOCOL_TCP_PROXY" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LISTENERPROTOCOL_TLS_PASSTHROUGH ListenerProtocol = "PROTOCOL_TLS_PASSTHROUGH" -) - -// All allowed values of Listener enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedListenerProtocolEnumValues = []ListenerProtocol{ - "PROTOCOL_UNSPECIFIED", - "PROTOCOL_TCP", - "PROTOCOL_UDP", - "PROTOCOL_TCP_PROXY", - "PROTOCOL_TLS_PASSTHROUGH", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *ListenerProtocol) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson ListenerProtocol - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := ListenerProtocol(value) - for _, existing := range AllowedListenerProtocolEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Listener", value) -} - -// NewListenerProtocolFromValue returns a pointer to a valid ListenerProtocol -// 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 NewListenerProtocolFromValue(v ListenerProtocol) (*ListenerProtocol, error) { - ev := ListenerProtocol(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ListenerProtocol: valid values are %v", v, AllowedListenerProtocolEnumValues) - } -} - -// 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 ListenerProtocol) IsValid() bool { - for _, existing := range AllowedListenerProtocolEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ProtocolProtocol value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v ListenerProtocol) Ptr() *ListenerProtocol { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListenerProtocol struct { - value *ListenerProtocol - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListenerProtocol) Get() *ListenerProtocol { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListenerProtocol) Set(val *ListenerProtocol) { - 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 NullableListenerProtocol) 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 *NullableListenerProtocol) 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 NewNullableListenerProtocol(val *ListenerProtocol) *NullableListenerProtocol { - return &NullableListenerProtocol{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 NullableListenerProtocol) 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 *NullableListenerProtocol) 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 ListenerGetProtocolAttributeType = *ListenerProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetProtocolArgType = ListenerProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetProtocolRetType = ListenerProtocol - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListenerGetProtocolAttributeTypeOk(arg ListenerGetProtocolAttributeType) (ret ListenerGetProtocolRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListenerGetProtocolAttributeType(arg *ListenerGetProtocolAttributeType, val ListenerGetProtocolRetType) { - *arg = &val -} - -/* - types and functions for serverNameIndicators -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetServerNameIndicatorsAttributeType = *[]ServerNameIndicator - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetServerNameIndicatorsArgType = []ServerNameIndicator - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetServerNameIndicatorsRetType = []ServerNameIndicator - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListenerGetServerNameIndicatorsAttributeTypeOk(arg ListenerGetServerNameIndicatorsAttributeType) (ret ListenerGetServerNameIndicatorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListenerGetServerNameIndicatorsAttributeType(arg *ListenerGetServerNameIndicatorsAttributeType, val ListenerGetServerNameIndicatorsRetType) { - *arg = &val -} - -/* - types and functions for targetPool -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetTargetPoolAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListenerGetTargetPoolAttributeTypeOk(arg ListenerGetTargetPoolAttributeType) (ret ListenerGetTargetPoolRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListenerGetTargetPoolAttributeType(arg *ListenerGetTargetPoolAttributeType, val ListenerGetTargetPoolRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetTargetPoolArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetTargetPoolRetType = string - -/* - types and functions for tcp -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetTcpAttributeType = *OptionsTCP - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetTcpArgType = OptionsTCP - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetTcpRetType = OptionsTCP - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListenerGetTcpAttributeTypeOk(arg ListenerGetTcpAttributeType) (ret ListenerGetTcpRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListenerGetTcpAttributeType(arg *ListenerGetTcpAttributeType, val ListenerGetTcpRetType) { - *arg = &val -} - -/* - types and functions for udp -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetUdpAttributeType = *OptionsUDP - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetUdpArgType = OptionsUDP - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListenerGetUdpRetType = OptionsUDP - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListenerGetUdpAttributeTypeOk(arg ListenerGetUdpAttributeType) (ret ListenerGetUdpRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListenerGetUdpAttributeType(arg *ListenerGetUdpAttributeType, val ListenerGetUdpRetType) { - *arg = &val -} - -// Listener struct for Listener -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Listener struct { - DisplayName ListenerGetDisplayNameAttributeType `json:"displayName,omitempty"` - // Will be used to reference a listener and will replace display name in the future. Currently uses - as the name if no display name is given. - Name ListenerGetNameAttributeType `json:"name,omitempty"` - // Port number where we listen for traffic - // Can be cast to int32 without loss of precision. - Port ListenerGetPortAttributeType `json:"port,omitempty"` - // Protocol is the highest network protocol we understand to load balance. Currently only PROTOCOL_TCP, PROTOCOL_TCP_PROXY and PROTOCOL_TLS_PASSTHROUGH are supported. - Protocol ListenerGetProtocolAttributeType `json:"protocol,omitempty"` - // Deprecated: Server Name Indicators config for domains to be routed to the desired target pool for this listener. - ServerNameIndicators ListenerGetServerNameIndicatorsAttributeType `json:"serverNameIndicators,omitempty"` - // Reference target pool by target pool name. - TargetPool ListenerGetTargetPoolAttributeType `json:"targetPool,omitempty"` - Tcp ListenerGetTcpAttributeType `json:"tcp,omitempty"` - Udp ListenerGetUdpAttributeType `json:"udp,omitempty"` -} - -// NewListener instantiates a new Listener 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 NewListener() *Listener { - this := Listener{} - return &this -} - -// NewListenerWithDefaults instantiates a new Listener 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 NewListenerWithDefaults() *Listener { - this := Listener{} - return &this -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetDisplayName() (res ListenerGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetDisplayNameOk() (ret ListenerGetDisplayNameRetType, ok bool) { - return getListenerGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) HasDisplayName() bool { - _, ok := o.GetDisplayNameOk() - return ok -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) SetDisplayName(v ListenerGetDisplayNameRetType) { - setListenerGetDisplayNameAttributeType(&o.DisplayName, 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 *Listener) GetName() (res ListenerGetNameRetType) { - 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 *Listener) GetNameOk() (ret ListenerGetNameRetType, ok bool) { - return getListenerGetNameAttributeTypeOk(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 *Listener) 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 *Listener) SetName(v ListenerGetNameRetType) { - setListenerGetNameAttributeType(&o.Name, v) -} - -// GetPort returns the Port field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetPort() (res ListenerGetPortRetType) { - res, _ = o.GetPortOk() - return -} - -// GetPortOk returns a tuple with the Port field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetPortOk() (ret ListenerGetPortRetType, ok bool) { - return getListenerGetPortAttributeTypeOk(o.Port) -} - -// HasPort returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) HasPort() bool { - _, ok := o.GetPortOk() - return ok -} - -// SetPort gets a reference to the given int64 and assigns it to the Port field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) SetPort(v ListenerGetPortRetType) { - setListenerGetPortAttributeType(&o.Port, 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 *Listener) GetProtocol() (res ListenerGetProtocolRetType) { - 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 *Listener) GetProtocolOk() (ret ListenerGetProtocolRetType, ok bool) { - return getListenerGetProtocolAttributeTypeOk(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 *Listener) HasProtocol() bool { - _, ok := o.GetProtocolOk() - return ok -} - -// SetProtocol gets a reference to the given string 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 *Listener) SetProtocol(v ListenerGetProtocolRetType) { - setListenerGetProtocolAttributeType(&o.Protocol, v) -} - -// GetServerNameIndicators returns the ServerNameIndicators field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetServerNameIndicators() (res ListenerGetServerNameIndicatorsRetType) { - res, _ = o.GetServerNameIndicatorsOk() - return -} - -// GetServerNameIndicatorsOk returns a tuple with the ServerNameIndicators field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetServerNameIndicatorsOk() (ret ListenerGetServerNameIndicatorsRetType, ok bool) { - return getListenerGetServerNameIndicatorsAttributeTypeOk(o.ServerNameIndicators) -} - -// HasServerNameIndicators returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) HasServerNameIndicators() bool { - _, ok := o.GetServerNameIndicatorsOk() - return ok -} - -// SetServerNameIndicators gets a reference to the given []ServerNameIndicator and assigns it to the ServerNameIndicators field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) SetServerNameIndicators(v ListenerGetServerNameIndicatorsRetType) { - setListenerGetServerNameIndicatorsAttributeType(&o.ServerNameIndicators, v) -} - -// GetTargetPool returns the TargetPool field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetTargetPool() (res ListenerGetTargetPoolRetType) { - res, _ = o.GetTargetPoolOk() - return -} - -// GetTargetPoolOk returns a tuple with the TargetPool field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetTargetPoolOk() (ret ListenerGetTargetPoolRetType, ok bool) { - return getListenerGetTargetPoolAttributeTypeOk(o.TargetPool) -} - -// HasTargetPool returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) HasTargetPool() bool { - _, ok := o.GetTargetPoolOk() - return ok -} - -// SetTargetPool gets a reference to the given string and assigns it to the TargetPool field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) SetTargetPool(v ListenerGetTargetPoolRetType) { - setListenerGetTargetPoolAttributeType(&o.TargetPool, v) -} - -// GetTcp returns the Tcp field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetTcp() (res ListenerGetTcpRetType) { - res, _ = o.GetTcpOk() - return -} - -// GetTcpOk returns a tuple with the Tcp field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetTcpOk() (ret ListenerGetTcpRetType, ok bool) { - return getListenerGetTcpAttributeTypeOk(o.Tcp) -} - -// HasTcp returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) HasTcp() bool { - _, ok := o.GetTcpOk() - return ok -} - -// SetTcp gets a reference to the given OptionsTCP and assigns it to the Tcp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) SetTcp(v ListenerGetTcpRetType) { - setListenerGetTcpAttributeType(&o.Tcp, v) -} - -// GetUdp returns the Udp field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetUdp() (res ListenerGetUdpRetType) { - res, _ = o.GetUdpOk() - return -} - -// GetUdpOk returns a tuple with the Udp field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) GetUdpOk() (ret ListenerGetUdpRetType, ok bool) { - return getListenerGetUdpAttributeTypeOk(o.Udp) -} - -// HasUdp returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) HasUdp() bool { - _, ok := o.GetUdpOk() - return ok -} - -// SetUdp gets a reference to the given OptionsUDP and assigns it to the Udp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Listener) SetUdp(v ListenerGetUdpRetType) { - setListenerGetUdpAttributeType(&o.Udp, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Listener) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListenerGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getListenerGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getListenerGetPortAttributeTypeOk(o.Port); ok { - toSerialize["Port"] = val - } - if val, ok := getListenerGetProtocolAttributeTypeOk(o.Protocol); ok { - toSerialize["Protocol"] = val - } - if val, ok := getListenerGetServerNameIndicatorsAttributeTypeOk(o.ServerNameIndicators); ok { - toSerialize["ServerNameIndicators"] = val - } - if val, ok := getListenerGetTargetPoolAttributeTypeOk(o.TargetPool); ok { - toSerialize["TargetPool"] = val - } - if val, ok := getListenerGetTcpAttributeTypeOk(o.Tcp); ok { - toSerialize["Tcp"] = val - } - if val, ok := getListenerGetUdpAttributeTypeOk(o.Udp); ok { - toSerialize["Udp"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListener struct { - value *Listener - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListener) Get() *Listener { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListener) Set(val *Listener) { - 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 NullableListener) 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 *NullableListener) 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 NewNullableListener(val *Listener) *NullableListener { - return &NullableListener{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 NullableListener) 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 *NullableListener) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_listener_test.go b/services/loadbalancer/model_listener_test.go deleted file mode 100644 index 0b65f9abdb..0000000000 --- a/services/loadbalancer/model_listener_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer - -import ( - "testing" -) - -// isEnum - -func TestListenerProtocol_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"PROTOCOL_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"PROTOCOL_TCP"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"PROTOCOL_UDP"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"PROTOCOL_TCP_PROXY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"PROTOCOL_TLS_PASSTHROUGH"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := ListenerProtocol("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/loadbalancer/model_load_balancer.go b/services/loadbalancer/model_load_balancer.go deleted file mode 100644 index 1e03eaaafd..0000000000 --- a/services/loadbalancer/model_load_balancer.go +++ /dev/null @@ -1,1163 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" - "fmt" -) - -// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancer{} - -/* - types and functions for disableTargetSecurityGroupAssignment -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancergetDisableTargetSecurityGroupAssignmentArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancergetDisableTargetSecurityGroupAssignmentRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType) (ret LoadBalancergetDisableTargetSecurityGroupAssignmentRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(arg *LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType, val LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) { - *arg = &val -} - -/* - types and functions for errors -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetErrorsAttributeType = *[]LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetErrorsArgType = []LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetErrorsRetType = []LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetErrorsAttributeTypeOk(arg LoadBalancerGetErrorsAttributeType) (ret LoadBalancerGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetErrorsAttributeType(arg *LoadBalancerGetErrorsAttributeType, val LoadBalancerGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for externalAddress -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetExternalAddressAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetExternalAddressAttributeTypeOk(arg LoadBalancerGetExternalAddressAttributeType) (ret LoadBalancerGetExternalAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetExternalAddressAttributeType(arg *LoadBalancerGetExternalAddressAttributeType, val LoadBalancerGetExternalAddressRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetExternalAddressArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetExternalAddressRetType = string - -/* - types and functions for labels -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetLabelsAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetLabelsArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetLabelsRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetLabelsAttributeTypeOk(arg LoadBalancerGetLabelsAttributeType) (ret LoadBalancerGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetLabelsAttributeType(arg *LoadBalancerGetLabelsAttributeType, val LoadBalancerGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for listeners -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetListenersAttributeType = *[]Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetListenersArgType = []Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetListenersRetType = []Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetListenersAttributeTypeOk(arg LoadBalancerGetListenersAttributeType) (ret LoadBalancerGetListenersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetListenersAttributeType(arg *LoadBalancerGetListenersAttributeType, val LoadBalancerGetListenersRetType) { - *arg = &val -} - -/* - types and functions for loadBalancerSecurityGroup -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetLoadBalancerSecurityGroupAttributeType = *CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetLoadBalancerSecurityGroupArgType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetLoadBalancerSecurityGroupRetType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(arg LoadBalancerGetLoadBalancerSecurityGroupAttributeType) (ret LoadBalancerGetLoadBalancerSecurityGroupRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetLoadBalancerSecurityGroupAttributeType(arg *LoadBalancerGetLoadBalancerSecurityGroupAttributeType, val LoadBalancerGetLoadBalancerSecurityGroupRetType) { - *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 LoadBalancerGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetNameAttributeTypeOk(arg LoadBalancerGetNameAttributeType) (ret LoadBalancerGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetNameAttributeType(arg *LoadBalancerGetNameAttributeType, val LoadBalancerGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetNameRetType = string - -/* - types and functions for networks -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetNetworksAttributeType = *[]Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetNetworksArgType = []Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetNetworksRetType = []Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetNetworksAttributeTypeOk(arg LoadBalancerGetNetworksAttributeType) (ret LoadBalancerGetNetworksRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetNetworksAttributeType(arg *LoadBalancerGetNetworksAttributeType, val LoadBalancerGetNetworksRetType) { - *arg = &val -} - -/* - types and functions for options -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetOptionsAttributeType = *LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetOptionsArgType = LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetOptionsRetType = LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetOptionsAttributeTypeOk(arg LoadBalancerGetOptionsAttributeType) (ret LoadBalancerGetOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetOptionsAttributeType(arg *LoadBalancerGetOptionsAttributeType, val LoadBalancerGetOptionsRetType) { - *arg = &val -} - -/* - types and functions for planId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetPlanIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetPlanIdAttributeTypeOk(arg LoadBalancerGetPlanIdAttributeType) (ret LoadBalancerGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetPlanIdAttributeType(arg *LoadBalancerGetPlanIdAttributeType, val LoadBalancerGetPlanIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetPlanIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetPlanIdRetType = string - -/* - types and functions for privateAddress -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetPrivateAddressAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetPrivateAddressAttributeTypeOk(arg LoadBalancerGetPrivateAddressAttributeType) (ret LoadBalancerGetPrivateAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetPrivateAddressAttributeType(arg *LoadBalancerGetPrivateAddressAttributeType, val LoadBalancerGetPrivateAddressRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetPrivateAddressArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetPrivateAddressRetType = 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 LoadBalancerGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetRegionAttributeTypeOk(arg LoadBalancerGetRegionAttributeType) (ret LoadBalancerGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetRegionAttributeType(arg *LoadBalancerGetRegionAttributeType, val LoadBalancerGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetRegionRetType = string - -/* - types and functions for status -*/ - -// isEnum - -// LoadBalancerStatus the model 'LoadBalancer' -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerStatus string - -// List of Status -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERSTATUS_UNSPECIFIED LoadBalancerStatus = "STATUS_UNSPECIFIED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERSTATUS_PENDING LoadBalancerStatus = "STATUS_PENDING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERSTATUS_READY LoadBalancerStatus = "STATUS_READY" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERSTATUS_ERROR LoadBalancerStatus = "STATUS_ERROR" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERSTATUS_TERMINATING LoadBalancerStatus = "STATUS_TERMINATING" -) - -// All allowed values of LoadBalancer enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedLoadBalancerStatusEnumValues = []LoadBalancerStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *LoadBalancerStatus) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson LoadBalancerStatus - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := LoadBalancerStatus(value) - for _, existing := range AllowedLoadBalancerStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid LoadBalancer", value) -} - -// NewLoadBalancerStatusFromValue returns a pointer to a valid LoadBalancerStatus -// 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 NewLoadBalancerStatusFromValue(v LoadBalancerStatus) (*LoadBalancerStatus, error) { - ev := LoadBalancerStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LoadBalancerStatus: valid values are %v", v, AllowedLoadBalancerStatusEnumValues) - } -} - -// 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 LoadBalancerStatus) IsValid() bool { - for _, existing := range AllowedLoadBalancerStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusStatus value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v LoadBalancerStatus) Ptr() *LoadBalancerStatus { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLoadBalancerStatus struct { - value *LoadBalancerStatus - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadBalancerStatus) Get() *LoadBalancerStatus { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadBalancerStatus) Set(val *LoadBalancerStatus) { - 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 NullableLoadBalancerStatus) 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 *NullableLoadBalancerStatus) 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 NewNullableLoadBalancerStatus(val *LoadBalancerStatus) *NullableLoadBalancerStatus { - return &NullableLoadBalancerStatus{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 NullableLoadBalancerStatus) 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 *NullableLoadBalancerStatus) 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 LoadBalancerGetStatusAttributeType = *LoadBalancerStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetStatusArgType = LoadBalancerStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetStatusRetType = LoadBalancerStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetStatusAttributeTypeOk(arg LoadBalancerGetStatusAttributeType) (ret LoadBalancerGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetStatusAttributeType(arg *LoadBalancerGetStatusAttributeType, val LoadBalancerGetStatusRetType) { - *arg = &val -} - -/* - types and functions for targetPools -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetTargetPoolsAttributeType = *[]TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetTargetPoolsArgType = []TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetTargetPoolsRetType = []TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetTargetPoolsAttributeTypeOk(arg LoadBalancerGetTargetPoolsAttributeType) (ret LoadBalancerGetTargetPoolsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetTargetPoolsAttributeType(arg *LoadBalancerGetTargetPoolsAttributeType, val LoadBalancerGetTargetPoolsRetType) { - *arg = &val -} - -/* - types and functions for targetSecurityGroup -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetTargetSecurityGroupAttributeType = *CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetTargetSecurityGroupArgType = CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetTargetSecurityGroupRetType = CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(arg LoadBalancerGetTargetSecurityGroupAttributeType) (ret LoadBalancerGetTargetSecurityGroupRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetTargetSecurityGroupAttributeType(arg *LoadBalancerGetTargetSecurityGroupAttributeType, val LoadBalancerGetTargetSecurityGroupRetType) { - *arg = &val -} - -/* - types and functions for version -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetVersionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerGetVersionAttributeTypeOk(arg LoadBalancerGetVersionAttributeType) (ret LoadBalancerGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerGetVersionAttributeType(arg *LoadBalancerGetVersionAttributeType, val LoadBalancerGetVersionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetVersionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerGetVersionRetType = string - -// LoadBalancer struct for LoadBalancer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancer struct { - // Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation. - DisableTargetSecurityGroupAssignment LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"` - // Reports all errors a load balancer has. - Errors LoadBalancerGetErrorsAttributeType `json:"errors,omitempty"` - // External load balancer IP address where this load balancer is exposed. Not changeable after creation. - ExternalAddress LoadBalancerGetExternalAddressAttributeType `json:"externalAddress,omitempty"` - // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per LB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. - Labels LoadBalancerGetLabelsAttributeType `json:"labels,omitempty"` - // There is a maximum listener count of 20. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. - Listeners LoadBalancerGetListenersAttributeType `json:"listeners,omitempty"` - LoadBalancerSecurityGroup LoadBalancerGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"` - // Load balancer name. Not changeable after creation. - Name LoadBalancerGetNameAttributeType `json:"name,omitempty"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks LoadBalancerGetNetworksAttributeType `json:"networks,omitempty"` - Options LoadBalancerGetOptionsAttributeType `json:"options,omitempty"` - // Service Plan configures the size of the Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId LoadBalancerGetPlanIdAttributeType `json:"planId,omitempty"` - // Transient private load balancer IP address that can change any time. - PrivateAddress LoadBalancerGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` - // Region of the LoadBalancer - Region LoadBalancerGetRegionAttributeType `json:"region,omitempty"` - Status LoadBalancerGetStatusAttributeType `json:"status,omitempty"` - // List of all target pools which will be used in the load balancer. Limited to 20. - TargetPools LoadBalancerGetTargetPoolsAttributeType `json:"targetPools,omitempty"` - TargetSecurityGroup LoadBalancerGetTargetSecurityGroupAttributeType `json:"targetSecurityGroup,omitempty"` - // Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version LoadBalancerGetVersionAttributeType `json:"version,omitempty"` -} - -// NewLoadBalancer instantiates a new LoadBalancer 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 NewLoadBalancer() *LoadBalancer { - this := LoadBalancer{} - return &this -} - -// NewLoadBalancerWithDefaults instantiates a new LoadBalancer 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 NewLoadBalancerWithDefaults() *LoadBalancer { - this := LoadBalancer{} - return &this -} - -// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignment() (res LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) { - res, _ = o.GetDisableTargetSecurityGroupAssignmentOk() - return -} - -// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignmentOk() (ret LoadBalancergetDisableTargetSecurityGroupAssignmentRetType, ok bool) { - return getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment) -} - -// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasDisableTargetSecurityGroupAssignment() bool { - _, ok := o.GetDisableTargetSecurityGroupAssignmentOk() - return ok -} - -// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetDisableTargetSecurityGroupAssignment(v LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) { - setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v) -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetErrors() (res LoadBalancerGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetErrorsOk() (ret LoadBalancerGetErrorsRetType, ok bool) { - return getLoadBalancerGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasErrors() bool { - _, ok := o.GetErrorsOk() - return ok -} - -// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetErrors(v LoadBalancerGetErrorsRetType) { - setLoadBalancerGetErrorsAttributeType(&o.Errors, v) -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetExternalAddress() (res LoadBalancerGetExternalAddressRetType) { - res, _ = o.GetExternalAddressOk() - return -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetExternalAddressOk() (ret LoadBalancerGetExternalAddressRetType, ok bool) { - return getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress) -} - -// HasExternalAddress returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasExternalAddress() bool { - _, ok := o.GetExternalAddressOk() - return ok -} - -// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetExternalAddress(v LoadBalancerGetExternalAddressRetType) { - setLoadBalancerGetExternalAddressAttributeType(&o.ExternalAddress, 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 *LoadBalancer) GetLabels() (res LoadBalancerGetLabelsRetType) { - 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 *LoadBalancer) GetLabelsOk() (ret LoadBalancerGetLabelsRetType, ok bool) { - return getLoadBalancerGetLabelsAttributeTypeOk(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 *LoadBalancer) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetLabels(v LoadBalancerGetLabelsRetType) { - setLoadBalancerGetLabelsAttributeType(&o.Labels, v) -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetListeners() (res LoadBalancerGetListenersRetType) { - res, _ = o.GetListenersOk() - return -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetListenersOk() (ret LoadBalancerGetListenersRetType, ok bool) { - return getLoadBalancerGetListenersAttributeTypeOk(o.Listeners) -} - -// HasListeners returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasListeners() bool { - _, ok := o.GetListenersOk() - return ok -} - -// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetListeners(v LoadBalancerGetListenersRetType) { - setLoadBalancerGetListenersAttributeType(&o.Listeners, v) -} - -// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetLoadBalancerSecurityGroup() (res LoadBalancerGetLoadBalancerSecurityGroupRetType) { - res, _ = o.GetLoadBalancerSecurityGroupOk() - return -} - -// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetLoadBalancerSecurityGroupOk() (ret LoadBalancerGetLoadBalancerSecurityGroupRetType, ok bool) { - return getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup) -} - -// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasLoadBalancerSecurityGroup() bool { - _, ok := o.GetLoadBalancerSecurityGroupOk() - return ok -} - -// SetLoadBalancerSecurityGroup gets a reference to the given CreateLoadBalancerPayloadLoadBalancerSecurityGroup and assigns it to the LoadBalancerSecurityGroup field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetLoadBalancerSecurityGroup(v LoadBalancerGetLoadBalancerSecurityGroupRetType) { - setLoadBalancerGetLoadBalancerSecurityGroupAttributeType(&o.LoadBalancerSecurityGroup, 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 *LoadBalancer) GetName() (res LoadBalancerGetNameRetType) { - 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 *LoadBalancer) GetNameOk() (ret LoadBalancerGetNameRetType, ok bool) { - return getLoadBalancerGetNameAttributeTypeOk(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 *LoadBalancer) 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 *LoadBalancer) SetName(v LoadBalancerGetNameRetType) { - setLoadBalancerGetNameAttributeType(&o.Name, v) -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetNetworks() (res LoadBalancerGetNetworksRetType) { - res, _ = o.GetNetworksOk() - return -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetNetworksOk() (ret LoadBalancerGetNetworksRetType, ok bool) { - return getLoadBalancerGetNetworksAttributeTypeOk(o.Networks) -} - -// HasNetworks returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasNetworks() bool { - _, ok := o.GetNetworksOk() - return ok -} - -// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetNetworks(v LoadBalancerGetNetworksRetType) { - setLoadBalancerGetNetworksAttributeType(&o.Networks, v) -} - -// GetOptions returns the Options field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetOptions() (res LoadBalancerGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetOptionsOk() (ret LoadBalancerGetOptionsRetType, ok bool) { - return getLoadBalancerGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok -} - -// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetOptions(v LoadBalancerGetOptionsRetType) { - setLoadBalancerGetOptionsAttributeType(&o.Options, v) -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetPlanId() (res LoadBalancerGetPlanIdRetType) { - res, _ = o.GetPlanIdOk() - return -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetPlanIdOk() (ret LoadBalancerGetPlanIdRetType, ok bool) { - return getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId) -} - -// HasPlanId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasPlanId() bool { - _, ok := o.GetPlanIdOk() - return ok -} - -// SetPlanId gets a reference to the given string and assigns it to the PlanId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetPlanId(v LoadBalancerGetPlanIdRetType) { - setLoadBalancerGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetPrivateAddress() (res LoadBalancerGetPrivateAddressRetType) { - res, _ = o.GetPrivateAddressOk() - return -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetPrivateAddressOk() (ret LoadBalancerGetPrivateAddressRetType, ok bool) { - return getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress) -} - -// HasPrivateAddress returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasPrivateAddress() bool { - _, ok := o.GetPrivateAddressOk() - return ok -} - -// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetPrivateAddress(v LoadBalancerGetPrivateAddressRetType) { - setLoadBalancerGetPrivateAddressAttributeType(&o.PrivateAddress, v) -} - -// GetRegion returns the Region field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetRegion() (res LoadBalancerGetRegionRetType) { - res, _ = o.GetRegionOk() - return -} - -// GetRegionOk returns a tuple with the Region field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetRegionOk() (ret LoadBalancerGetRegionRetType, ok bool) { - return getLoadBalancerGetRegionAttributeTypeOk(o.Region) -} - -// HasRegion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasRegion() bool { - _, ok := o.GetRegionOk() - return ok -} - -// SetRegion gets a reference to the given string and assigns it to the Region field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetRegion(v LoadBalancerGetRegionRetType) { - setLoadBalancerGetRegionAttributeType(&o.Region, 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 *LoadBalancer) GetStatus() (res LoadBalancerGetStatusRetType) { - 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 *LoadBalancer) GetStatusOk() (ret LoadBalancerGetStatusRetType, ok bool) { - return getLoadBalancerGetStatusAttributeTypeOk(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 *LoadBalancer) 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 *LoadBalancer) SetStatus(v LoadBalancerGetStatusRetType) { - setLoadBalancerGetStatusAttributeType(&o.Status, v) -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetTargetPools() (res LoadBalancerGetTargetPoolsRetType) { - res, _ = o.GetTargetPoolsOk() - return -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetTargetPoolsOk() (ret LoadBalancerGetTargetPoolsRetType, ok bool) { - return getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools) -} - -// HasTargetPools returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasTargetPools() bool { - _, ok := o.GetTargetPoolsOk() - return ok -} - -// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetTargetPools(v LoadBalancerGetTargetPoolsRetType) { - setLoadBalancerGetTargetPoolsAttributeType(&o.TargetPools, v) -} - -// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetTargetSecurityGroup() (res LoadBalancerGetTargetSecurityGroupRetType) { - res, _ = o.GetTargetSecurityGroupOk() - return -} - -// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetTargetSecurityGroupOk() (ret LoadBalancerGetTargetSecurityGroupRetType, ok bool) { - return getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup) -} - -// HasTargetSecurityGroup returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasTargetSecurityGroup() bool { - _, ok := o.GetTargetSecurityGroupOk() - return ok -} - -// SetTargetSecurityGroup gets a reference to the given CreateLoadBalancerPayloadTargetSecurityGroup and assigns it to the TargetSecurityGroup field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetTargetSecurityGroup(v LoadBalancerGetTargetSecurityGroupRetType) { - setLoadBalancerGetTargetSecurityGroupAttributeType(&o.TargetSecurityGroup, v) -} - -// GetVersion returns the Version field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetVersion() (res LoadBalancerGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) GetVersionOk() (ret LoadBalancerGetVersionRetType, ok bool) { - return getLoadBalancerGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancer) SetVersion(v LoadBalancerGetVersionRetType) { - setLoadBalancerGetVersionAttributeType(&o.Version, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o LoadBalancer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok { - toSerialize["DisableTargetSecurityGroupAssignment"] = val - } - if val, ok := getLoadBalancerGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { - toSerialize["ExternalAddress"] = val - } - if val, ok := getLoadBalancerGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getLoadBalancerGetListenersAttributeTypeOk(o.Listeners); ok { - toSerialize["Listeners"] = val - } - if val, ok := getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup); ok { - toSerialize["LoadBalancerSecurityGroup"] = val - } - if val, ok := getLoadBalancerGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getLoadBalancerGetNetworksAttributeTypeOk(o.Networks); ok { - toSerialize["Networks"] = val - } - if val, ok := getLoadBalancerGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val - } - if val, ok := getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { - toSerialize["PrivateAddress"] = val - } - if val, ok := getLoadBalancerGetRegionAttributeTypeOk(o.Region); ok { - toSerialize["Region"] = val - } - if val, ok := getLoadBalancerGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { - toSerialize["TargetPools"] = val - } - if val, ok := getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup); ok { - toSerialize["TargetSecurityGroup"] = val - } - if val, ok := getLoadBalancerGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLoadBalancer struct { - value *LoadBalancer - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadBalancer) Get() *LoadBalancer { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadBalancer) Set(val *LoadBalancer) { - 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 NullableLoadBalancer) 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 *NullableLoadBalancer) 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 NewNullableLoadBalancer(val *LoadBalancer) *NullableLoadBalancer { - return &NullableLoadBalancer{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 NullableLoadBalancer) 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 *NullableLoadBalancer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_load_balancer_error.go b/services/loadbalancer/model_load_balancer_error.go deleted file mode 100644 index eb236fc2e3..0000000000 --- a/services/loadbalancer/model_load_balancer_error.go +++ /dev/null @@ -1,365 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" - "fmt" -) - -// checks if the LoadBalancerError type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancerError{} - -/* - 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 LoadBalancerErrorGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerErrorGetDescriptionAttributeTypeOk(arg LoadBalancerErrorGetDescriptionAttributeType) (ret LoadBalancerErrorGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerErrorGetDescriptionAttributeType(arg *LoadBalancerErrorGetDescriptionAttributeType, val LoadBalancerErrorGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerErrorGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerErrorGetDescriptionRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// LoadBalancerErrorTypes The error type specifies which part of the load balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error or TYPE_FIP_NOT_FOUND if the IP was deleted. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerErrorTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_UNSPECIFIED LoadBalancerErrorTypes = "TYPE_UNSPECIFIED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_INTERNAL LoadBalancerErrorTypes = "TYPE_INTERNAL" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_QUOTA_SECGROUP_EXCEEDED LoadBalancerErrorTypes = "TYPE_QUOTA_SECGROUP_EXCEEDED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_QUOTA_SECGROUPRULE_EXCEEDED LoadBalancerErrorTypes = "TYPE_QUOTA_SECGROUPRULE_EXCEEDED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_PORT_NOT_CONFIGURED LoadBalancerErrorTypes = "TYPE_PORT_NOT_CONFIGURED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_FIP_NOT_CONFIGURED LoadBalancerErrorTypes = "TYPE_FIP_NOT_CONFIGURED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_TARGET_NOT_ACTIVE LoadBalancerErrorTypes = "TYPE_TARGET_NOT_ACTIVE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_METRICS_MISCONFIGURED LoadBalancerErrorTypes = "TYPE_METRICS_MISCONFIGURED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_LOGS_MISCONFIGURED LoadBalancerErrorTypes = "TYPE_LOGS_MISCONFIGURED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_FIP_NOT_FOUND LoadBalancerErrorTypes = "TYPE_FIP_NOT_FOUND" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_IP_EXHAUSTED LoadBalancerErrorTypes = "TYPE_IP_EXHAUSTED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_DNS_NOT_CONFIGURED LoadBalancerErrorTypes = "TYPE_DNS_NOT_CONFIGURED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOADBALANCERERRORTYPE_VM_PORT_NOT_CONFIGURED LoadBalancerErrorTypes = "TYPE_VM_PORT_NOT_CONFIGURED" -) - -// All allowed values of LoadBalancerError enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedLoadBalancerErrorTypesEnumValues = []LoadBalancerErrorTypes{ - "TYPE_UNSPECIFIED", - "TYPE_INTERNAL", - "TYPE_QUOTA_SECGROUP_EXCEEDED", - "TYPE_QUOTA_SECGROUPRULE_EXCEEDED", - "TYPE_PORT_NOT_CONFIGURED", - "TYPE_FIP_NOT_CONFIGURED", - "TYPE_TARGET_NOT_ACTIVE", - "TYPE_METRICS_MISCONFIGURED", - "TYPE_LOGS_MISCONFIGURED", - "TYPE_FIP_NOT_FOUND", - "TYPE_IP_EXHAUSTED", - "TYPE_DNS_NOT_CONFIGURED", - "TYPE_VM_PORT_NOT_CONFIGURED", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *LoadBalancerErrorTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson LoadBalancerErrorTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := LoadBalancerErrorTypes(value) - for _, existing := range AllowedLoadBalancerErrorTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid LoadBalancerError", value) -} - -// NewLoadBalancerErrorTypesFromValue returns a pointer to a valid LoadBalancerErrorTypes -// 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 NewLoadBalancerErrorTypesFromValue(v LoadBalancerErrorTypes) (*LoadBalancerErrorTypes, error) { - ev := LoadBalancerErrorTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LoadBalancerErrorTypes: valid values are %v", v, AllowedLoadBalancerErrorTypesEnumValues) - } -} - -// 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 LoadBalancerErrorTypes) IsValid() bool { - for _, existing := range AllowedLoadBalancerErrorTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v LoadBalancerErrorTypes) Ptr() *LoadBalancerErrorTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLoadBalancerErrorTypes struct { - value *LoadBalancerErrorTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadBalancerErrorTypes) Get() *LoadBalancerErrorTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadBalancerErrorTypes) Set(val *LoadBalancerErrorTypes) { - 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 NullableLoadBalancerErrorTypes) 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 *NullableLoadBalancerErrorTypes) 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 NewNullableLoadBalancerErrorTypes(val *LoadBalancerErrorTypes) *NullableLoadBalancerErrorTypes { - return &NullableLoadBalancerErrorTypes{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 NullableLoadBalancerErrorTypes) 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 *NullableLoadBalancerErrorTypes) 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 LoadBalancerErrorGetTypeAttributeType = *LoadBalancerErrorTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerErrorGetTypeArgType = LoadBalancerErrorTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerErrorGetTypeRetType = LoadBalancerErrorTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerErrorGetTypeAttributeTypeOk(arg LoadBalancerErrorGetTypeAttributeType) (ret LoadBalancerErrorGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerErrorGetTypeAttributeType(arg *LoadBalancerErrorGetTypeAttributeType, val LoadBalancerErrorGetTypeRetType) { - *arg = &val -} - -// LoadBalancerError struct for LoadBalancerError -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerError struct { - // The error description contains additional helpful user information to fix the error state of the load balancer. For example the IP 45.135.247.139 does not exist in the project, then the description will report: Floating IP \"45.135.247.139\" could not be found or if the IP was deleted then you will get a proper error message. - Description LoadBalancerErrorGetDescriptionAttributeType `json:"description,omitempty"` - // The error type specifies which part of the load balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error or TYPE_FIP_NOT_FOUND if the IP was deleted. - Type LoadBalancerErrorGetTypeAttributeType `json:"type,omitempty"` -} - -// NewLoadBalancerError instantiates a new LoadBalancerError 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 NewLoadBalancerError() *LoadBalancerError { - this := LoadBalancerError{} - return &this -} - -// NewLoadBalancerErrorWithDefaults instantiates a new LoadBalancerError 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 NewLoadBalancerErrorWithDefaults() *LoadBalancerError { - this := LoadBalancerError{} - 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 *LoadBalancerError) GetDescription() (res LoadBalancerErrorGetDescriptionRetType) { - 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 *LoadBalancerError) GetDescriptionOk() (ret LoadBalancerErrorGetDescriptionRetType, ok bool) { - return getLoadBalancerErrorGetDescriptionAttributeTypeOk(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 *LoadBalancerError) 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 *LoadBalancerError) SetDescription(v LoadBalancerErrorGetDescriptionRetType) { - setLoadBalancerErrorGetDescriptionAttributeType(&o.Description, 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 *LoadBalancerError) GetType() (res LoadBalancerErrorGetTypeRetType) { - 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 *LoadBalancerError) GetTypeOk() (ret LoadBalancerErrorGetTypeRetType, ok bool) { - return getLoadBalancerErrorGetTypeAttributeTypeOk(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 *LoadBalancerError) 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 *LoadBalancerError) SetType(v LoadBalancerErrorGetTypeRetType) { - setLoadBalancerErrorGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o LoadBalancerError) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadBalancerErrorGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getLoadBalancerErrorGetTypeAttributeTypeOk(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 NullableLoadBalancerError struct { - value *LoadBalancerError - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadBalancerError) Get() *LoadBalancerError { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadBalancerError) Set(val *LoadBalancerError) { - 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 NullableLoadBalancerError) 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 *NullableLoadBalancerError) 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 NewNullableLoadBalancerError(val *LoadBalancerError) *NullableLoadBalancerError { - return &NullableLoadBalancerError{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 NullableLoadBalancerError) 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 *NullableLoadBalancerError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_load_balancer_error_test.go b/services/loadbalancer/model_load_balancer_error_test.go deleted file mode 100644 index f82fb6a663..0000000000 --- a/services/loadbalancer/model_load_balancer_error_test.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer - -import ( - "testing" -) - -// isEnum - -func TestLoadBalancerErrorTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"TYPE_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"TYPE_INTERNAL"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"TYPE_QUOTA_SECGROUP_EXCEEDED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"TYPE_QUOTA_SECGROUPRULE_EXCEEDED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"TYPE_PORT_NOT_CONFIGURED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 6`, - args: args{ - src: []byte(`"TYPE_FIP_NOT_CONFIGURED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 7`, - args: args{ - src: []byte(`"TYPE_TARGET_NOT_ACTIVE"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 8`, - args: args{ - src: []byte(`"TYPE_METRICS_MISCONFIGURED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 9`, - args: args{ - src: []byte(`"TYPE_LOGS_MISCONFIGURED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 10`, - args: args{ - src: []byte(`"TYPE_FIP_NOT_FOUND"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 11`, - args: args{ - src: []byte(`"TYPE_IP_EXHAUSTED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 12`, - args: args{ - src: []byte(`"TYPE_DNS_NOT_CONFIGURED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 13`, - args: args{ - src: []byte(`"TYPE_VM_PORT_NOT_CONFIGURED"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := LoadBalancerErrorTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/loadbalancer/model_load_balancer_options.go b/services/loadbalancer/model_load_balancer_options.go deleted file mode 100644 index 49d2a8cda8..0000000000 --- a/services/loadbalancer/model_load_balancer_options.go +++ /dev/null @@ -1,326 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the LoadBalancerOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancerOptions{} - -/* - types and functions for accessControl -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsGetAccessControlAttributeType = *LoadbalancerOptionAccessControl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsGetAccessControlArgType = LoadbalancerOptionAccessControl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsGetAccessControlRetType = LoadbalancerOptionAccessControl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerOptionsGetAccessControlAttributeTypeOk(arg LoadBalancerOptionsGetAccessControlAttributeType) (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerOptionsGetAccessControlAttributeType(arg *LoadBalancerOptionsGetAccessControlAttributeType, val LoadBalancerOptionsGetAccessControlRetType) { - *arg = &val -} - -/* - types and functions for ephemeralAddress -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsgetEphemeralAddressAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsgetEphemeralAddressArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsgetEphemeralAddressRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(arg LoadBalancerOptionsgetEphemeralAddressAttributeType) (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerOptionsgetEphemeralAddressAttributeType(arg *LoadBalancerOptionsgetEphemeralAddressAttributeType, val LoadBalancerOptionsgetEphemeralAddressRetType) { - *arg = &val -} - -/* - types and functions for observability -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsGetObservabilityAttributeType = *LoadbalancerOptionObservability - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsGetObservabilityArgType = LoadbalancerOptionObservability - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsGetObservabilityRetType = LoadbalancerOptionObservability - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerOptionsGetObservabilityAttributeTypeOk(arg LoadBalancerOptionsGetObservabilityAttributeType) (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerOptionsGetObservabilityAttributeType(arg *LoadBalancerOptionsGetObservabilityAttributeType, val LoadBalancerOptionsGetObservabilityRetType) { - *arg = &val -} - -/* - types and functions for privateNetworkOnly -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsgetPrivateNetworkOnlyArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptionsgetPrivateNetworkOnlyRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(arg LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType) (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(arg *LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType, val LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { - *arg = &val -} - -// LoadBalancerOptions Defines any optional functionality you want to have enabled on your load balancer. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadBalancerOptions struct { - AccessControl LoadBalancerOptionsGetAccessControlAttributeType `json:"accessControl,omitempty"` - EphemeralAddress LoadBalancerOptionsgetEphemeralAddressAttributeType `json:"ephemeralAddress,omitempty"` - Observability LoadBalancerOptionsGetObservabilityAttributeType `json:"observability,omitempty"` - // Load Balancer is accessible only via a private network ip address. Not changeable after creation. - PrivateNetworkOnly LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType `json:"privateNetworkOnly,omitempty"` -} - -// NewLoadBalancerOptions instantiates a new LoadBalancerOptions 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 NewLoadBalancerOptions() *LoadBalancerOptions { - this := LoadBalancerOptions{} - return &this -} - -// NewLoadBalancerOptionsWithDefaults instantiates a new LoadBalancerOptions 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 NewLoadBalancerOptionsWithDefaults() *LoadBalancerOptions { - this := LoadBalancerOptions{} - return &this -} - -// GetAccessControl returns the AccessControl field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) GetAccessControl() (res LoadBalancerOptionsGetAccessControlRetType) { - res, _ = o.GetAccessControlOk() - return -} - -// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) GetAccessControlOk() (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) { - return getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl) -} - -// HasAccessControl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) HasAccessControl() bool { - _, ok := o.GetAccessControlOk() - return ok -} - -// SetAccessControl gets a reference to the given LoadbalancerOptionAccessControl and assigns it to the AccessControl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) SetAccessControl(v LoadBalancerOptionsGetAccessControlRetType) { - setLoadBalancerOptionsGetAccessControlAttributeType(&o.AccessControl, v) -} - -// GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) GetEphemeralAddress() (res LoadBalancerOptionsgetEphemeralAddressRetType) { - res, _ = o.GetEphemeralAddressOk() - return -} - -// GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) GetEphemeralAddressOk() (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) { - return getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress) -} - -// HasEphemeralAddress returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) HasEphemeralAddress() bool { - _, ok := o.GetEphemeralAddressOk() - return ok -} - -// SetEphemeralAddress gets a reference to the given bool and assigns it to the EphemeralAddress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) SetEphemeralAddress(v LoadBalancerOptionsgetEphemeralAddressRetType) { - setLoadBalancerOptionsgetEphemeralAddressAttributeType(&o.EphemeralAddress, v) -} - -// GetObservability returns the Observability field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) GetObservability() (res LoadBalancerOptionsGetObservabilityRetType) { - res, _ = o.GetObservabilityOk() - return -} - -// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) GetObservabilityOk() (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) { - return getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability) -} - -// HasObservability returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) HasObservability() bool { - _, ok := o.GetObservabilityOk() - return ok -} - -// SetObservability gets a reference to the given LoadbalancerOptionObservability and assigns it to the Observability field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) SetObservability(v LoadBalancerOptionsGetObservabilityRetType) { - setLoadBalancerOptionsGetObservabilityAttributeType(&o.Observability, v) -} - -// GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) GetPrivateNetworkOnly() (res LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { - res, _ = o.GetPrivateNetworkOnlyOk() - return -} - -// GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) { - return getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly) -} - -// HasPrivateNetworkOnly returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) HasPrivateNetworkOnly() bool { - _, ok := o.GetPrivateNetworkOnlyOk() - return ok -} - -// SetPrivateNetworkOnly gets a reference to the given bool and assigns it to the PrivateNetworkOnly field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { - setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(&o.PrivateNetworkOnly, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl); ok { - toSerialize["AccessControl"] = val - } - if val, ok := getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress); ok { - toSerialize["EphemeralAddress"] = val - } - if val, ok := getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability); ok { - toSerialize["Observability"] = val - } - if val, ok := getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly); ok { - toSerialize["PrivateNetworkOnly"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLoadBalancerOptions struct { - value *LoadBalancerOptions - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadBalancerOptions) Get() *LoadBalancerOptions { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadBalancerOptions) Set(val *LoadBalancerOptions) { - 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 NullableLoadBalancerOptions) 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 *NullableLoadBalancerOptions) 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 NewNullableLoadBalancerOptions(val *LoadBalancerOptions) *NullableLoadBalancerOptions { - return &NullableLoadBalancerOptions{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 NullableLoadBalancerOptions) 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 *NullableLoadBalancerOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_load_balancer_options_test.go b/services/loadbalancer/model_load_balancer_options_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_load_balancer_options_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_load_balancer_test.go b/services/loadbalancer/model_load_balancer_test.go deleted file mode 100644 index 9812c446ee..0000000000 --- a/services/loadbalancer/model_load_balancer_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer - -import ( - "testing" -) - -// isEnum - -func TestLoadBalancerStatus_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"STATUS_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"STATUS_PENDING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"STATUS_READY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"STATUS_ERROR"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"STATUS_TERMINATING"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := LoadBalancerStatus("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/loadbalancer/model_loadbalancer_option_access_control.go b/services/loadbalancer/model_loadbalancer_option_access_control.go deleted file mode 100644 index d4c9588280..0000000000 --- a/services/loadbalancer/model_loadbalancer_option_access_control.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionAccessControl type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionAccessControl{} - -/* - types and functions for allowedSourceRanges -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionAccessControlGetAllowedSourceRangesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(arg LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType) (ret LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType(arg *LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType, val LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { - *arg = &val -} - -// LoadbalancerOptionAccessControl Use this option to limit the IP ranges that can use the load balancer. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionAccessControl struct { - // Load Balancer is accessible only from an IP address in this range - AllowedSourceRanges LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType `json:"allowedSourceRanges,omitempty"` -} - -// NewLoadbalancerOptionAccessControl instantiates a new LoadbalancerOptionAccessControl 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 NewLoadbalancerOptionAccessControl() *LoadbalancerOptionAccessControl { - this := LoadbalancerOptionAccessControl{} - return &this -} - -// NewLoadbalancerOptionAccessControlWithDefaults instantiates a new LoadbalancerOptionAccessControl 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 NewLoadbalancerOptionAccessControlWithDefaults() *LoadbalancerOptionAccessControl { - this := LoadbalancerOptionAccessControl{} - return &this -} - -// GetAllowedSourceRanges returns the AllowedSourceRanges field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() (res LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { - res, _ = o.GetAllowedSourceRangesOk() - return -} - -// GetAllowedSourceRangesOk returns a tuple with the AllowedSourceRanges field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() (ret LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType, ok bool) { - return getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(o.AllowedSourceRanges) -} - -// HasAllowedSourceRanges returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionAccessControl) HasAllowedSourceRanges() bool { - _, ok := o.GetAllowedSourceRangesOk() - return ok -} - -// SetAllowedSourceRanges gets a reference to the given []string and assigns it to the AllowedSourceRanges field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { - setLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType(&o.AllowedSourceRanges, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(o.AllowedSourceRanges); ok { - toSerialize["AllowedSourceRanges"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLoadbalancerOptionAccessControl struct { - value *LoadbalancerOptionAccessControl - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadbalancerOptionAccessControl) Get() *LoadbalancerOptionAccessControl { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadbalancerOptionAccessControl) Set(val *LoadbalancerOptionAccessControl) { - 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 NullableLoadbalancerOptionAccessControl) 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 *NullableLoadbalancerOptionAccessControl) 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 NewNullableLoadbalancerOptionAccessControl(val *LoadbalancerOptionAccessControl) *NullableLoadbalancerOptionAccessControl { - return &NullableLoadbalancerOptionAccessControl{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 NullableLoadbalancerOptionAccessControl) 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 *NullableLoadbalancerOptionAccessControl) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_loadbalancer_option_access_control_test.go b/services/loadbalancer/model_loadbalancer_option_access_control_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_loadbalancer_option_access_control_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_loadbalancer_option_logs.go b/services/loadbalancer/model_loadbalancer_option_logs.go deleted file mode 100644 index ea29305469..0000000000 --- a/services/loadbalancer/model_loadbalancer_option_logs.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionLogs type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionLogs{} - -/* - types and functions for credentialsRef -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionLogsGetCredentialsRefAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionLogsGetCredentialsRefAttributeType) (ret LoadbalancerOptionLogsGetCredentialsRefRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadbalancerOptionLogsGetCredentialsRefAttributeType(arg *LoadbalancerOptionLogsGetCredentialsRefAttributeType, val LoadbalancerOptionLogsGetCredentialsRefRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionLogsGetCredentialsRefArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionLogsGetCredentialsRefRetType = string - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionLogsGetPushUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionLogsGetPushUrlAttributeType) (ret LoadbalancerOptionLogsGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadbalancerOptionLogsGetPushUrlAttributeType(arg *LoadbalancerOptionLogsGetPushUrlAttributeType, val LoadbalancerOptionLogsGetPushUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionLogsGetPushUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionLogsGetPushUrlRetType = string - -// LoadbalancerOptionLogs struct for LoadbalancerOptionLogs -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionLogs struct { - // Credentials reference for logging. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the logging solution the push URL points to. Then this enables monitoring via remote write for the Load Balancer. - CredentialsRef LoadbalancerOptionLogsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` - // The Observability(Logs)/Loki remote write Push URL you want the logs to be shipped to. - PushUrl LoadbalancerOptionLogsGetPushUrlAttributeType `json:"pushUrl,omitempty"` -} - -// NewLoadbalancerOptionLogs instantiates a new LoadbalancerOptionLogs 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 NewLoadbalancerOptionLogs() *LoadbalancerOptionLogs { - this := LoadbalancerOptionLogs{} - return &this -} - -// NewLoadbalancerOptionLogsWithDefaults instantiates a new LoadbalancerOptionLogs 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 NewLoadbalancerOptionLogsWithDefaults() *LoadbalancerOptionLogs { - this := LoadbalancerOptionLogs{} - return &this -} - -// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionLogs) GetCredentialsRef() (res LoadbalancerOptionLogsGetCredentialsRefRetType) { - res, _ = o.GetCredentialsRefOk() - return -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (ret LoadbalancerOptionLogsGetCredentialsRefRetType, ok bool) { - return getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(o.CredentialsRef) -} - -// HasCredentialsRef returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionLogs) HasCredentialsRef() bool { - _, ok := o.GetCredentialsRefOk() - return ok -} - -// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionLogs) SetCredentialsRef(v LoadbalancerOptionLogsGetCredentialsRefRetType) { - setLoadbalancerOptionLogsGetCredentialsRefAttributeType(&o.CredentialsRef, v) -} - -// GetPushUrl returns the PushUrl field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionLogs) GetPushUrl() (res LoadbalancerOptionLogsGetPushUrlRetType) { - res, _ = o.GetPushUrlOk() - return -} - -// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionLogs) GetPushUrlOk() (ret LoadbalancerOptionLogsGetPushUrlRetType, ok bool) { - return getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// HasPushUrl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionLogs) HasPushUrl() bool { - _, ok := o.GetPushUrlOk() - return ok -} - -// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionLogs) SetPushUrl(v LoadbalancerOptionLogsGetPushUrlRetType) { - setLoadbalancerOptionLogsGetPushUrlAttributeType(&o.PushUrl, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { - toSerialize["CredentialsRef"] = val - } - if val, ok := getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(o.PushUrl); ok { - toSerialize["PushUrl"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLoadbalancerOptionLogs struct { - value *LoadbalancerOptionLogs - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadbalancerOptionLogs) Get() *LoadbalancerOptionLogs { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadbalancerOptionLogs) Set(val *LoadbalancerOptionLogs) { - 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 NullableLoadbalancerOptionLogs) 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 *NullableLoadbalancerOptionLogs) 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 NewNullableLoadbalancerOptionLogs(val *LoadbalancerOptionLogs) *NullableLoadbalancerOptionLogs { - return &NullableLoadbalancerOptionLogs{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 NullableLoadbalancerOptionLogs) 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 *NullableLoadbalancerOptionLogs) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_loadbalancer_option_logs_test.go b/services/loadbalancer/model_loadbalancer_option_logs_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_loadbalancer_option_logs_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_loadbalancer_option_metrics.go b/services/loadbalancer/model_loadbalancer_option_metrics.go deleted file mode 100644 index 7781ec06bd..0000000000 --- a/services/loadbalancer/model_loadbalancer_option_metrics.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionMetrics{} - -/* - types and functions for credentialsRef -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionMetricsGetCredentialsRefAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionMetricsGetCredentialsRefAttributeType) (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(arg *LoadbalancerOptionMetricsGetCredentialsRefAttributeType, val LoadbalancerOptionMetricsGetCredentialsRefRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionMetricsGetCredentialsRefArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionMetricsGetCredentialsRefRetType = string - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionMetricsGetPushUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionMetricsGetPushUrlAttributeType) (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadbalancerOptionMetricsGetPushUrlAttributeType(arg *LoadbalancerOptionMetricsGetPushUrlAttributeType, val LoadbalancerOptionMetricsGetPushUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionMetricsGetPushUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionMetricsGetPushUrlRetType = string - -// LoadbalancerOptionMetrics struct for LoadbalancerOptionMetrics -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionMetrics struct { - // Credentials reference for metrics. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the metrics solution the push URL points to. Then this enables monitoring via remote write for the Load Balancer. - CredentialsRef LoadbalancerOptionMetricsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` - // The Observability(Metrics)/Prometheus remote write push URL you want the metrics to be shipped to. - PushUrl LoadbalancerOptionMetricsGetPushUrlAttributeType `json:"pushUrl,omitempty"` -} - -// NewLoadbalancerOptionMetrics instantiates a new LoadbalancerOptionMetrics 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 NewLoadbalancerOptionMetrics() *LoadbalancerOptionMetrics { - this := LoadbalancerOptionMetrics{} - return &this -} - -// NewLoadbalancerOptionMetricsWithDefaults instantiates a new LoadbalancerOptionMetrics 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 NewLoadbalancerOptionMetricsWithDefaults() *LoadbalancerOptionMetrics { - this := LoadbalancerOptionMetrics{} - return &this -} - -// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionMetrics) GetCredentialsRef() (res LoadbalancerOptionMetricsGetCredentialsRefRetType) { - res, _ = o.GetCredentialsRefOk() - return -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) { - return getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef) -} - -// HasCredentialsRef returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionMetrics) HasCredentialsRef() bool { - _, ok := o.GetCredentialsRefOk() - return ok -} - -// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v LoadbalancerOptionMetricsGetCredentialsRefRetType) { - setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(&o.CredentialsRef, v) -} - -// GetPushUrl returns the PushUrl field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionMetrics) GetPushUrl() (res LoadbalancerOptionMetricsGetPushUrlRetType) { - res, _ = o.GetPushUrlOk() - return -} - -// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) { - return getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// HasPushUrl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionMetrics) HasPushUrl() bool { - _, ok := o.GetPushUrlOk() - return ok -} - -// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionMetrics) SetPushUrl(v LoadbalancerOptionMetricsGetPushUrlRetType) { - setLoadbalancerOptionMetricsGetPushUrlAttributeType(&o.PushUrl, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { - toSerialize["CredentialsRef"] = val - } - if val, ok := getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl); ok { - toSerialize["PushUrl"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLoadbalancerOptionMetrics struct { - value *LoadbalancerOptionMetrics - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadbalancerOptionMetrics) Get() *LoadbalancerOptionMetrics { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadbalancerOptionMetrics) Set(val *LoadbalancerOptionMetrics) { - 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 NullableLoadbalancerOptionMetrics) 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 *NullableLoadbalancerOptionMetrics) 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 NewNullableLoadbalancerOptionMetrics(val *LoadbalancerOptionMetrics) *NullableLoadbalancerOptionMetrics { - return &NullableLoadbalancerOptionMetrics{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 NullableLoadbalancerOptionMetrics) 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 *NullableLoadbalancerOptionMetrics) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_loadbalancer_option_metrics_test.go b/services/loadbalancer/model_loadbalancer_option_metrics_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_loadbalancer_option_metrics_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_loadbalancer_option_observability.go b/services/loadbalancer/model_loadbalancer_option_observability.go deleted file mode 100644 index a0b86f147a..0000000000 --- a/services/loadbalancer/model_loadbalancer_option_observability.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionObservability type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionObservability{} - -/* - types and functions for logs -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionObservabilityGetLogsAttributeType = *LoadbalancerOptionLogs - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionObservabilityGetLogsArgType = LoadbalancerOptionLogs - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionObservabilityGetLogsRetType = LoadbalancerOptionLogs - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(arg LoadbalancerOptionObservabilityGetLogsAttributeType) (ret LoadbalancerOptionObservabilityGetLogsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadbalancerOptionObservabilityGetLogsAttributeType(arg *LoadbalancerOptionObservabilityGetLogsAttributeType, val LoadbalancerOptionObservabilityGetLogsRetType) { - *arg = &val -} - -/* - types and functions for metrics -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionObservabilityGetMetricsAttributeType = *LoadbalancerOptionMetrics - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionObservabilityGetMetricsArgType = LoadbalancerOptionMetrics - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionObservabilityGetMetricsRetType = LoadbalancerOptionMetrics - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(arg LoadbalancerOptionObservabilityGetMetricsAttributeType) (ret LoadbalancerOptionObservabilityGetMetricsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLoadbalancerOptionObservabilityGetMetricsAttributeType(arg *LoadbalancerOptionObservabilityGetMetricsAttributeType, val LoadbalancerOptionObservabilityGetMetricsRetType) { - *arg = &val -} - -// LoadbalancerOptionObservability We offer Load Balancer observability via STACKIT Observability or external solutions. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LoadbalancerOptionObservability struct { - Logs LoadbalancerOptionObservabilityGetLogsAttributeType `json:"logs,omitempty"` - Metrics LoadbalancerOptionObservabilityGetMetricsAttributeType `json:"metrics,omitempty"` -} - -// NewLoadbalancerOptionObservability instantiates a new LoadbalancerOptionObservability 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 NewLoadbalancerOptionObservability() *LoadbalancerOptionObservability { - this := LoadbalancerOptionObservability{} - return &this -} - -// NewLoadbalancerOptionObservabilityWithDefaults instantiates a new LoadbalancerOptionObservability 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 NewLoadbalancerOptionObservabilityWithDefaults() *LoadbalancerOptionObservability { - this := LoadbalancerOptionObservability{} - return &this -} - -// GetLogs returns the Logs field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionObservability) GetLogs() (res LoadbalancerOptionObservabilityGetLogsRetType) { - res, _ = o.GetLogsOk() - return -} - -// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionObservability) GetLogsOk() (ret LoadbalancerOptionObservabilityGetLogsRetType, ok bool) { - return getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(o.Logs) -} - -// HasLogs returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionObservability) HasLogs() bool { - _, ok := o.GetLogsOk() - return ok -} - -// SetLogs gets a reference to the given LoadbalancerOptionLogs and assigns it to the Logs field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionObservability) SetLogs(v LoadbalancerOptionObservabilityGetLogsRetType) { - setLoadbalancerOptionObservabilityGetLogsAttributeType(&o.Logs, v) -} - -// GetMetrics returns the Metrics field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionObservability) GetMetrics() (res LoadbalancerOptionObservabilityGetMetricsRetType) { - res, _ = o.GetMetricsOk() - return -} - -// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionObservability) GetMetricsOk() (ret LoadbalancerOptionObservabilityGetMetricsRetType, ok bool) { - return getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(o.Metrics) -} - -// HasMetrics returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionObservability) HasMetrics() bool { - _, ok := o.GetMetricsOk() - return ok -} - -// SetMetrics gets a reference to the given LoadbalancerOptionMetrics and assigns it to the Metrics field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LoadbalancerOptionObservability) SetMetrics(v LoadbalancerOptionObservabilityGetMetricsRetType) { - setLoadbalancerOptionObservabilityGetMetricsAttributeType(&o.Metrics, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(o.Logs); ok { - toSerialize["Logs"] = val - } - if val, ok := getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(o.Metrics); ok { - toSerialize["Metrics"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLoadbalancerOptionObservability struct { - value *LoadbalancerOptionObservability - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLoadbalancerOptionObservability) Get() *LoadbalancerOptionObservability { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLoadbalancerOptionObservability) Set(val *LoadbalancerOptionObservability) { - 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 NullableLoadbalancerOptionObservability) 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 *NullableLoadbalancerOptionObservability) 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 NewNullableLoadbalancerOptionObservability(val *LoadbalancerOptionObservability) *NullableLoadbalancerOptionObservability { - return &NullableLoadbalancerOptionObservability{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 NullableLoadbalancerOptionObservability) 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 *NullableLoadbalancerOptionObservability) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_loadbalancer_option_observability_test.go b/services/loadbalancer/model_loadbalancer_option_observability_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_loadbalancer_option_observability_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_network.go b/services/loadbalancer/model_network.go deleted file mode 100644 index b6157b6966..0000000000 --- a/services/loadbalancer/model_network.go +++ /dev/null @@ -1,338 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" - "fmt" -) - -// checks if the Network type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Network{} - -/* - 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 NetworkGetNetworkIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetNetworkIdAttributeTypeOk(arg NetworkGetNetworkIdAttributeType) (ret NetworkGetNetworkIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setNetworkGetNetworkIdAttributeType(arg *NetworkGetNetworkIdAttributeType, val NetworkGetNetworkIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetNetworkIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetNetworkIdRetType = string - -/* - types and functions for role -*/ - -// isEnum - -// NetworkRole The role defines how the load balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkRole string - -// List of Role -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - NETWORKROLE_UNSPECIFIED NetworkRole = "ROLE_UNSPECIFIED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - NETWORKROLE_LISTENERS_AND_TARGETS NetworkRole = "ROLE_LISTENERS_AND_TARGETS" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - NETWORKROLE_LISTENERS NetworkRole = "ROLE_LISTENERS" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - NETWORKROLE_TARGETS NetworkRole = "ROLE_TARGETS" -) - -// All allowed values of Network enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedNetworkRoleEnumValues = []NetworkRole{ - "ROLE_UNSPECIFIED", - "ROLE_LISTENERS_AND_TARGETS", - "ROLE_LISTENERS", - "ROLE_TARGETS", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NetworkRole) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson NetworkRole - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := NetworkRole(value) - for _, existing := range AllowedNetworkRoleEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Network", value) -} - -// NewNetworkRoleFromValue returns a pointer to a valid NetworkRole -// 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 NewNetworkRoleFromValue(v NetworkRole) (*NetworkRole, error) { - ev := NetworkRole(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for NetworkRole: valid values are %v", v, AllowedNetworkRoleEnumValues) - } -} - -// 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 NetworkRole) IsValid() bool { - for _, existing := range AllowedNetworkRoleEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to RoleRole value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NetworkRole) Ptr() *NetworkRole { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNetworkRole struct { - value *NetworkRole - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNetworkRole) Get() *NetworkRole { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNetworkRole) Set(val *NetworkRole) { - 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 NullableNetworkRole) 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 *NullableNetworkRole) 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 NewNullableNetworkRole(val *NetworkRole) *NullableNetworkRole { - return &NullableNetworkRole{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 NullableNetworkRole) 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 *NullableNetworkRole) 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 NetworkGetRoleAttributeType = *NetworkRole - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetRoleArgType = NetworkRole - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NetworkGetRoleRetType = NetworkRole - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNetworkGetRoleAttributeTypeOk(arg NetworkGetRoleAttributeType) (ret NetworkGetRoleRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setNetworkGetRoleAttributeType(arg *NetworkGetRoleAttributeType, val NetworkGetRoleRetType) { - *arg = &val -} - -// Network struct for Network -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Network struct { - // Openstack network ID - NetworkId NetworkGetNetworkIdAttributeType `json:"networkId,omitempty"` - // The role defines how the load balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. - Role NetworkGetRoleAttributeType `json:"role,omitempty"` -} - -// 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() *Network { - this := Network{} - 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 -} - -// 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 *Network) GetNetworkId() (res NetworkGetNetworkIdRetType) { - 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 *Network) GetNetworkIdOk() (ret NetworkGetNetworkIdRetType, ok bool) { - return getNetworkGetNetworkIdAttributeTypeOk(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 *Network) 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 *Network) SetNetworkId(v NetworkGetNetworkIdRetType) { - setNetworkGetNetworkIdAttributeType(&o.NetworkId, v) -} - -// GetRole returns the Role field value if set, 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) GetRole() (res NetworkGetRoleRetType) { - res, _ = o.GetRoleOk() - return -} - -// GetRoleOk returns a tuple with the Role field value if set, nil otherwise -// and a boolean to check if the value 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) GetRoleOk() (ret NetworkGetRoleRetType, ok bool) { - return getNetworkGetRoleAttributeTypeOk(o.Role) -} - -// HasRole returns a boolean if a field 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) HasRole() bool { - _, ok := o.GetRoleOk() - return ok -} - -// SetRole gets a reference to the given string and assigns it to the Role field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Network) SetRole(v NetworkGetRoleRetType) { - setNetworkGetRoleAttributeType(&o.Role, 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 := getNetworkGetNetworkIdAttributeTypeOk(o.NetworkId); ok { - toSerialize["NetworkId"] = val - } - if val, ok := getNetworkGetRoleAttributeTypeOk(o.Role); ok { - toSerialize["Role"] = 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/loadbalancer/model_network_test.go b/services/loadbalancer/model_network_test.go deleted file mode 100644 index 2965abd727..0000000000 --- a/services/loadbalancer/model_network_test.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer - -import ( - "testing" -) - -// isEnum - -func TestNetworkRole_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"ROLE_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"ROLE_LISTENERS_AND_TARGETS"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"ROLE_LISTENERS"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"ROLE_TARGETS"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := NetworkRole("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/loadbalancer/model_options_tcp.go b/services/loadbalancer/model_options_tcp.go deleted file mode 100644 index d40901782f..0000000000 --- a/services/loadbalancer/model_options_tcp.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the OptionsTCP type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OptionsTCP{} - -/* - types and functions for idleTimeout -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptionsTCPGetIdleTimeoutAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOptionsTCPGetIdleTimeoutAttributeTypeOk(arg OptionsTCPGetIdleTimeoutAttributeType) (ret OptionsTCPGetIdleTimeoutRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOptionsTCPGetIdleTimeoutAttributeType(arg *OptionsTCPGetIdleTimeoutAttributeType, val OptionsTCPGetIdleTimeoutRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptionsTCPGetIdleTimeoutArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptionsTCPGetIdleTimeoutRetType = string - -// OptionsTCP ProtocolOptionsTCP options to be configured for the PROTOCOL_TCP, PROTOCOL_TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH protocols. TCP options for the SNI listeners with the same port must be the same. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptionsTCP struct { - // The connection idle timeout to be used with the protocol. The default value is set to 5 minutes, and the maximum value is one hour. - IdleTimeout OptionsTCPGetIdleTimeoutAttributeType `json:"idleTimeout,omitempty"` -} - -// NewOptionsTCP instantiates a new OptionsTCP 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 NewOptionsTCP() *OptionsTCP { - this := OptionsTCP{} - return &this -} - -// NewOptionsTCPWithDefaults instantiates a new OptionsTCP 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 NewOptionsTCPWithDefaults() *OptionsTCP { - this := OptionsTCP{} - return &this -} - -// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptionsTCP) GetIdleTimeout() (res OptionsTCPGetIdleTimeoutRetType) { - res, _ = o.GetIdleTimeoutOk() - return -} - -// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptionsTCP) GetIdleTimeoutOk() (ret OptionsTCPGetIdleTimeoutRetType, ok bool) { - return getOptionsTCPGetIdleTimeoutAttributeTypeOk(o.IdleTimeout) -} - -// HasIdleTimeout returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptionsTCP) HasIdleTimeout() bool { - _, ok := o.GetIdleTimeoutOk() - return ok -} - -// SetIdleTimeout gets a reference to the given string and assigns it to the IdleTimeout field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptionsTCP) SetIdleTimeout(v OptionsTCPGetIdleTimeoutRetType) { - setOptionsTCPGetIdleTimeoutAttributeType(&o.IdleTimeout, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o OptionsTCP) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOptionsTCPGetIdleTimeoutAttributeTypeOk(o.IdleTimeout); ok { - toSerialize["IdleTimeout"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOptionsTCP struct { - value *OptionsTCP - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOptionsTCP) Get() *OptionsTCP { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOptionsTCP) Set(val *OptionsTCP) { - 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 NullableOptionsTCP) 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 *NullableOptionsTCP) 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 NewNullableOptionsTCP(val *OptionsTCP) *NullableOptionsTCP { - return &NullableOptionsTCP{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 NullableOptionsTCP) 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 *NullableOptionsTCP) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_options_tcp_test.go b/services/loadbalancer/model_options_tcp_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_options_tcp_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_options_udp.go b/services/loadbalancer/model_options_udp.go deleted file mode 100644 index 75529839d8..0000000000 --- a/services/loadbalancer/model_options_udp.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the OptionsUDP type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OptionsUDP{} - -/* - types and functions for idleTimeout -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptionsUDPGetIdleTimeoutAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOptionsUDPGetIdleTimeoutAttributeTypeOk(arg OptionsUDPGetIdleTimeoutAttributeType) (ret OptionsUDPGetIdleTimeoutRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOptionsUDPGetIdleTimeoutAttributeType(arg *OptionsUDPGetIdleTimeoutAttributeType, val OptionsUDPGetIdleTimeoutRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptionsUDPGetIdleTimeoutArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptionsUDPGetIdleTimeoutRetType = string - -// OptionsUDP ProtocolOptionsUDP options to be configured for the PROTOCOL_UDP protocol. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptionsUDP struct { - // The connection idle timeout to be used with the protocol. The default value is set to 1 minute, and the maximum value is 2 minutes. - IdleTimeout OptionsUDPGetIdleTimeoutAttributeType `json:"idleTimeout,omitempty"` -} - -// NewOptionsUDP instantiates a new OptionsUDP 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 NewOptionsUDP() *OptionsUDP { - this := OptionsUDP{} - return &this -} - -// NewOptionsUDPWithDefaults instantiates a new OptionsUDP 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 NewOptionsUDPWithDefaults() *OptionsUDP { - this := OptionsUDP{} - return &this -} - -// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptionsUDP) GetIdleTimeout() (res OptionsUDPGetIdleTimeoutRetType) { - res, _ = o.GetIdleTimeoutOk() - return -} - -// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptionsUDP) GetIdleTimeoutOk() (ret OptionsUDPGetIdleTimeoutRetType, ok bool) { - return getOptionsUDPGetIdleTimeoutAttributeTypeOk(o.IdleTimeout) -} - -// HasIdleTimeout returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptionsUDP) HasIdleTimeout() bool { - _, ok := o.GetIdleTimeoutOk() - return ok -} - -// SetIdleTimeout gets a reference to the given string and assigns it to the IdleTimeout field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptionsUDP) SetIdleTimeout(v OptionsUDPGetIdleTimeoutRetType) { - setOptionsUDPGetIdleTimeoutAttributeType(&o.IdleTimeout, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o OptionsUDP) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOptionsUDPGetIdleTimeoutAttributeTypeOk(o.IdleTimeout); ok { - toSerialize["IdleTimeout"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOptionsUDP struct { - value *OptionsUDP - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOptionsUDP) Get() *OptionsUDP { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOptionsUDP) Set(val *OptionsUDP) { - 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 NullableOptionsUDP) 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 *NullableOptionsUDP) 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 NewNullableOptionsUDP(val *OptionsUDP) *NullableOptionsUDP { - return &NullableOptionsUDP{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 NullableOptionsUDP) 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 *NullableOptionsUDP) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_options_udp_test.go b/services/loadbalancer/model_options_udp_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_options_udp_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_plan_details.go b/services/loadbalancer/model_plan_details.go deleted file mode 100644 index 06395b8c1e..0000000000 --- a/services/loadbalancer/model_plan_details.go +++ /dev/null @@ -1,448 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the PlanDetails type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PlanDetails{} - -/* - 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 PlanDetailsGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPlanDetailsGetDescriptionAttributeTypeOk(arg PlanDetailsGetDescriptionAttributeType) (ret PlanDetailsGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPlanDetailsGetDescriptionAttributeType(arg *PlanDetailsGetDescriptionAttributeType, val PlanDetailsGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetDescriptionRetType = string - -/* - types and functions for flavorName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetFlavorNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPlanDetailsGetFlavorNameAttributeTypeOk(arg PlanDetailsGetFlavorNameAttributeType) (ret PlanDetailsGetFlavorNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPlanDetailsGetFlavorNameAttributeType(arg *PlanDetailsGetFlavorNameAttributeType, val PlanDetailsGetFlavorNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetFlavorNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetFlavorNameRetType = string - -/* - types and functions for maxConnections -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetMaxConnectionsAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetMaxConnectionsArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetMaxConnectionsRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPlanDetailsGetMaxConnectionsAttributeTypeOk(arg PlanDetailsGetMaxConnectionsAttributeType) (ret PlanDetailsGetMaxConnectionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPlanDetailsGetMaxConnectionsAttributeType(arg *PlanDetailsGetMaxConnectionsAttributeType, val PlanDetailsGetMaxConnectionsRetType) { - *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 PlanDetailsGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPlanDetailsGetNameAttributeTypeOk(arg PlanDetailsGetNameAttributeType) (ret PlanDetailsGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPlanDetailsGetNameAttributeType(arg *PlanDetailsGetNameAttributeType, val PlanDetailsGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetNameRetType = string - -/* - types and functions for planId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetPlanIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPlanDetailsGetPlanIdAttributeTypeOk(arg PlanDetailsGetPlanIdAttributeType) (ret PlanDetailsGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPlanDetailsGetPlanIdAttributeType(arg *PlanDetailsGetPlanIdAttributeType, val PlanDetailsGetPlanIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetPlanIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetPlanIdRetType = 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 PlanDetailsGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPlanDetailsGetRegionAttributeTypeOk(arg PlanDetailsGetRegionAttributeType) (ret PlanDetailsGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPlanDetailsGetRegionAttributeType(arg *PlanDetailsGetRegionAttributeType, val PlanDetailsGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetailsGetRegionRetType = string - -// PlanDetails struct for PlanDetails -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PlanDetails struct { - // Description - Description PlanDetailsGetDescriptionAttributeType `json:"description,omitempty"` - // Flavor Name - FlavorName PlanDetailsGetFlavorNameAttributeType `json:"flavorName,omitempty"` - // Maximum number of concurrent connections per load balancer VM instance. - // Can be cast to int32 without loss of precision. - MaxConnections PlanDetailsGetMaxConnectionsAttributeType `json:"maxConnections,omitempty"` - // Service Plan Name - Name PlanDetailsGetNameAttributeType `json:"name,omitempty"` - // Service Plan Identifier - PlanId PlanDetailsGetPlanIdAttributeType `json:"planId,omitempty"` - // Region this Plan is available in - Region PlanDetailsGetRegionAttributeType `json:"region,omitempty"` -} - -// NewPlanDetails instantiates a new PlanDetails 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 NewPlanDetails() *PlanDetails { - this := PlanDetails{} - return &this -} - -// NewPlanDetailsWithDefaults instantiates a new PlanDetails 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 NewPlanDetailsWithDefaults() *PlanDetails { - this := PlanDetails{} - 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 *PlanDetails) GetDescription() (res PlanDetailsGetDescriptionRetType) { - 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 *PlanDetails) GetDescriptionOk() (ret PlanDetailsGetDescriptionRetType, ok bool) { - return getPlanDetailsGetDescriptionAttributeTypeOk(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 *PlanDetails) 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 *PlanDetails) SetDescription(v PlanDetailsGetDescriptionRetType) { - setPlanDetailsGetDescriptionAttributeType(&o.Description, v) -} - -// GetFlavorName returns the FlavorName field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) GetFlavorName() (res PlanDetailsGetFlavorNameRetType) { - res, _ = o.GetFlavorNameOk() - return -} - -// GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) GetFlavorNameOk() (ret PlanDetailsGetFlavorNameRetType, ok bool) { - return getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName) -} - -// HasFlavorName returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) HasFlavorName() bool { - _, ok := o.GetFlavorNameOk() - return ok -} - -// SetFlavorName gets a reference to the given string and assigns it to the FlavorName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) SetFlavorName(v PlanDetailsGetFlavorNameRetType) { - setPlanDetailsGetFlavorNameAttributeType(&o.FlavorName, v) -} - -// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) GetMaxConnections() (res PlanDetailsGetMaxConnectionsRetType) { - res, _ = o.GetMaxConnectionsOk() - return -} - -// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) GetMaxConnectionsOk() (ret PlanDetailsGetMaxConnectionsRetType, ok bool) { - return getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections) -} - -// HasMaxConnections returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) HasMaxConnections() bool { - _, ok := o.GetMaxConnectionsOk() - return ok -} - -// SetMaxConnections gets a reference to the given int64 and assigns it to the MaxConnections field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) SetMaxConnections(v PlanDetailsGetMaxConnectionsRetType) { - setPlanDetailsGetMaxConnectionsAttributeType(&o.MaxConnections, 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 *PlanDetails) GetName() (res PlanDetailsGetNameRetType) { - 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 *PlanDetails) GetNameOk() (ret PlanDetailsGetNameRetType, ok bool) { - return getPlanDetailsGetNameAttributeTypeOk(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 *PlanDetails) 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 *PlanDetails) SetName(v PlanDetailsGetNameRetType) { - setPlanDetailsGetNameAttributeType(&o.Name, v) -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) GetPlanId() (res PlanDetailsGetPlanIdRetType) { - res, _ = o.GetPlanIdOk() - return -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) GetPlanIdOk() (ret PlanDetailsGetPlanIdRetType, ok bool) { - return getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId) -} - -// HasPlanId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) HasPlanId() bool { - _, ok := o.GetPlanIdOk() - return ok -} - -// SetPlanId gets a reference to the given string and assigns it to the PlanId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) SetPlanId(v PlanDetailsGetPlanIdRetType) { - setPlanDetailsGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetRegion returns the Region field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) GetRegion() (res PlanDetailsGetRegionRetType) { - res, _ = o.GetRegionOk() - return -} - -// GetRegionOk returns a tuple with the Region field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) GetRegionOk() (ret PlanDetailsGetRegionRetType, ok bool) { - return getPlanDetailsGetRegionAttributeTypeOk(o.Region) -} - -// HasRegion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) HasRegion() bool { - _, ok := o.GetRegionOk() - return ok -} - -// SetRegion gets a reference to the given string and assigns it to the Region field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PlanDetails) SetRegion(v PlanDetailsGetRegionRetType) { - setPlanDetailsGetRegionAttributeType(&o.Region, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PlanDetails) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPlanDetailsGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName); ok { - toSerialize["FlavorName"] = val - } - if val, ok := getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections); ok { - toSerialize["MaxConnections"] = val - } - if val, ok := getPlanDetailsGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getPlanDetailsGetRegionAttributeTypeOk(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 NullablePlanDetails struct { - value *PlanDetails - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePlanDetails) Get() *PlanDetails { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePlanDetails) Set(val *PlanDetails) { - 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 NullablePlanDetails) 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 *NullablePlanDetails) 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 NewNullablePlanDetails(val *PlanDetails) *NullablePlanDetails { - return &NullablePlanDetails{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 NullablePlanDetails) 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 *NullablePlanDetails) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_plan_details_test.go b/services/loadbalancer/model_plan_details_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_plan_details_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_security_group.go b/services/loadbalancer/model_security_group.go deleted file mode 100644 index c89daf4843..0000000000 --- a/services/loadbalancer/model_security_group.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the SecurityGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecurityGroup{} - -/* - 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 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 - -// SecurityGroup struct for SecurityGroup -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SecurityGroup struct { - // ID of the security Group - Id SecurityGroupGetIdAttributeType `json:"id,omitempty"` - // Name of the security Group - Name SecurityGroupGetNameAttributeType `json:"name,omitempty"` -} - -// 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() *SecurityGroup { - this := SecurityGroup{} - 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{} - 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 *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) -} - -// 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 *SecurityGroup) GetName() (res SecurityGroupGetNameRetType) { - 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 *SecurityGroup) GetNameOk() (ret SecurityGroupGetNameRetType, ok bool) { - return getSecurityGroupGetNameAttributeTypeOk(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 *SecurityGroup) 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 *SecurityGroup) SetName(v SecurityGroupGetNameRetType) { - setSecurityGroupGetNameAttributeType(&o.Name, 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 := getSecurityGroupGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getSecurityGroupGetNameAttributeTypeOk(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 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/loadbalancer/model_security_group_test.go b/services/loadbalancer/model_security_group_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_security_group_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_server_name_indicator.go b/services/loadbalancer/model_server_name_indicator.go deleted file mode 100644 index 5ada4d5679..0000000000 --- a/services/loadbalancer/model_server_name_indicator.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the ServerNameIndicator type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerNameIndicator{} - -/* - 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 ServerNameIndicatorGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerNameIndicatorGetNameAttributeTypeOk(arg ServerNameIndicatorGetNameAttributeType) (ret ServerNameIndicatorGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setServerNameIndicatorGetNameAttributeType(arg *ServerNameIndicatorGetNameAttributeType, val ServerNameIndicatorGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNameIndicatorGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNameIndicatorGetNameRetType = string - -// ServerNameIndicator struct for ServerNameIndicator -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerNameIndicator struct { - // The domain name for this SNI config. - Name ServerNameIndicatorGetNameAttributeType `json:"name,omitempty"` -} - -// NewServerNameIndicator instantiates a new ServerNameIndicator 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 NewServerNameIndicator() *ServerNameIndicator { - this := ServerNameIndicator{} - return &this -} - -// NewServerNameIndicatorWithDefaults instantiates a new ServerNameIndicator 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 NewServerNameIndicatorWithDefaults() *ServerNameIndicator { - this := ServerNameIndicator{} - 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 *ServerNameIndicator) GetName() (res ServerNameIndicatorGetNameRetType) { - 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 *ServerNameIndicator) GetNameOk() (ret ServerNameIndicatorGetNameRetType, ok bool) { - return getServerNameIndicatorGetNameAttributeTypeOk(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 *ServerNameIndicator) 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 *ServerNameIndicator) SetName(v ServerNameIndicatorGetNameRetType) { - setServerNameIndicatorGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServerNameIndicator) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServerNameIndicatorGetNameAttributeTypeOk(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 NullableServerNameIndicator struct { - value *ServerNameIndicator - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerNameIndicator) Get() *ServerNameIndicator { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerNameIndicator) Set(val *ServerNameIndicator) { - 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 NullableServerNameIndicator) 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 *NullableServerNameIndicator) 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 NewNullableServerNameIndicator(val *ServerNameIndicator) *NullableServerNameIndicator { - return &NullableServerNameIndicator{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 NullableServerNameIndicator) 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 *NullableServerNameIndicator) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_server_name_indicator_test.go b/services/loadbalancer/model_server_name_indicator_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_server_name_indicator_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_session_persistence.go b/services/loadbalancer/model_session_persistence.go deleted file mode 100644 index c7f2e06f00..0000000000 --- a/services/loadbalancer/model_session_persistence.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the SessionPersistence type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SessionPersistence{} - -/* - types and functions for useSourceIpAddress -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SessionPersistencegetUseSourceIpAddressAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SessionPersistencegetUseSourceIpAddressArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SessionPersistencegetUseSourceIpAddressRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSessionPersistencegetUseSourceIpAddressAttributeTypeOk(arg SessionPersistencegetUseSourceIpAddressAttributeType) (ret SessionPersistencegetUseSourceIpAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSessionPersistencegetUseSourceIpAddressAttributeType(arg *SessionPersistencegetUseSourceIpAddressAttributeType, val SessionPersistencegetUseSourceIpAddressRetType) { - *arg = &val -} - -// SessionPersistence struct for SessionPersistence -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SessionPersistence struct { - // If enabled then all connections from one source IP address are redirected to the same target. This setting changes the load balancing algorithm to Maglev. - UseSourceIpAddress SessionPersistencegetUseSourceIpAddressAttributeType `json:"useSourceIpAddress,omitempty"` -} - -// NewSessionPersistence instantiates a new SessionPersistence 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 NewSessionPersistence() *SessionPersistence { - this := SessionPersistence{} - return &this -} - -// NewSessionPersistenceWithDefaults instantiates a new SessionPersistence 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 NewSessionPersistenceWithDefaults() *SessionPersistence { - this := SessionPersistence{} - return &this -} - -// GetUseSourceIpAddress returns the UseSourceIpAddress field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SessionPersistence) GetUseSourceIpAddress() (res SessionPersistencegetUseSourceIpAddressRetType) { - res, _ = o.GetUseSourceIpAddressOk() - return -} - -// GetUseSourceIpAddressOk returns a tuple with the UseSourceIpAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SessionPersistence) GetUseSourceIpAddressOk() (ret SessionPersistencegetUseSourceIpAddressRetType, ok bool) { - return getSessionPersistencegetUseSourceIpAddressAttributeTypeOk(o.UseSourceIpAddress) -} - -// HasUseSourceIpAddress returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SessionPersistence) HasUseSourceIpAddress() bool { - _, ok := o.GetUseSourceIpAddressOk() - return ok -} - -// SetUseSourceIpAddress gets a reference to the given bool and assigns it to the UseSourceIpAddress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SessionPersistence) SetUseSourceIpAddress(v SessionPersistencegetUseSourceIpAddressRetType) { - setSessionPersistencegetUseSourceIpAddressAttributeType(&o.UseSourceIpAddress, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SessionPersistence) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSessionPersistencegetUseSourceIpAddressAttributeTypeOk(o.UseSourceIpAddress); ok { - toSerialize["UseSourceIpAddress"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSessionPersistence struct { - value *SessionPersistence - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSessionPersistence) Get() *SessionPersistence { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSessionPersistence) Set(val *SessionPersistence) { - 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 NullableSessionPersistence) 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 *NullableSessionPersistence) 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 NewNullableSessionPersistence(val *SessionPersistence) *NullableSessionPersistence { - return &NullableSessionPersistence{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 NullableSessionPersistence) 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 *NullableSessionPersistence) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_session_persistence_test.go b/services/loadbalancer/model_session_persistence_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_session_persistence_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_status.go b/services/loadbalancer/model_status.go deleted file mode 100644 index 1f20123915..0000000000 --- a/services/loadbalancer/model_status.go +++ /dev/null @@ -1,271 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the Status type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Status{} - -/* - types and functions for code -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetCodeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetCodeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetCodeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret StatusGetCodeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGetCodeRetType) { - *arg = &val -} - -/* - types and functions for details -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetDetailsAttributeType = *[]GoogleProtobufAny - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetDetailsArgType = []GoogleProtobufAny - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetDetailsRetType = []GoogleProtobufAny - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret StatusGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val StatusGetDetailsRetType) { - *arg = &val -} - -/* - types and functions for message -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret StatusGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setStatusGetMessageAttributeType(arg *StatusGetMessageAttributeType, val StatusGetMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusGetMessageRetType = string - -// Status The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Status struct { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - // Can be cast to int32 without loss of precision. - Code StatusGetCodeAttributeType `json:"code,omitempty"` - // A list of messages that carry the error details. There is a common set of message types for APIs to use. - Details StatusGetDetailsAttributeType `json:"details,omitempty"` - // A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - Message StatusGetMessageAttributeType `json:"message,omitempty"` -} - -// NewStatus instantiates a new Status 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 NewStatus() *Status { - this := Status{} - return &this -} - -// NewStatusWithDefaults instantiates a new Status 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 NewStatusWithDefaults() *Status { - this := Status{} - return &this -} - -// GetCode returns the Code field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Status) GetCode() (res StatusGetCodeRetType) { - res, _ = o.GetCodeOk() - return -} - -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Status) GetCodeOk() (ret StatusGetCodeRetType, ok bool) { - return getStatusGetCodeAttributeTypeOk(o.Code) -} - -// HasCode returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Status) HasCode() bool { - _, ok := o.GetCodeOk() - return ok -} - -// SetCode gets a reference to the given int64 and assigns it to the Code field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Status) SetCode(v StatusGetCodeRetType) { - setStatusGetCodeAttributeType(&o.Code, v) -} - -// 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 *Status) GetDetails() (res StatusGetDetailsRetType) { - 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 *Status) GetDetailsOk() (ret StatusGetDetailsRetType, ok bool) { - return getStatusGetDetailsAttributeTypeOk(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 *Status) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given []GoogleProtobufAny 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 *Status) SetDetails(v StatusGetDetailsRetType) { - setStatusGetDetailsAttributeType(&o.Details, v) -} - -// GetMessage returns the Message field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Status) GetMessage() (res StatusGetMessageRetType) { - res, _ = o.GetMessageOk() - return -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Status) GetMessageOk() (ret StatusGetMessageRetType, ok bool) { - return getStatusGetMessageAttributeTypeOk(o.Message) -} - -// HasMessage returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Status) HasMessage() bool { - _, ok := o.GetMessageOk() - return ok -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Status) SetMessage(v StatusGetMessageRetType) { - setStatusGetMessageAttributeType(&o.Message, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Status) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getStatusGetCodeAttributeTypeOk(o.Code); ok { - toSerialize["Code"] = val - } - if val, ok := getStatusGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getStatusGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableStatus struct { - value *Status - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStatus) Get() *Status { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStatus) Set(val *Status) { - 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 NullableStatus) 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 *NullableStatus) 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 NewNullableStatus(val *Status) *NullableStatus { - return &NullableStatus{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 NullableStatus) 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 *NullableStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_status_test.go b/services/loadbalancer/model_status_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_status_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_target.go b/services/loadbalancer/model_target.go deleted file mode 100644 index 8fae7e9e5a..0000000000 --- a/services/loadbalancer/model_target.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the Target type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Target{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetGetDisplayNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTargetGetDisplayNameAttributeTypeOk(arg TargetGetDisplayNameAttributeType) (ret TargetGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTargetGetDisplayNameAttributeType(arg *TargetGetDisplayNameAttributeType, val TargetGetDisplayNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetGetDisplayNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetGetDisplayNameRetType = 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 TargetGetIpAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTargetGetIpAttributeTypeOk(arg TargetGetIpAttributeType) (ret TargetGetIpRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTargetGetIpAttributeType(arg *TargetGetIpAttributeType, val TargetGetIpRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetGetIpArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetGetIpRetType = string - -// Target struct for Target -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Target struct { - // Target name - DisplayName TargetGetDisplayNameAttributeType `json:"displayName,omitempty"` - // Target IP. Must by unique within a target pool. - Ip TargetGetIpAttributeType `json:"ip,omitempty"` -} - -// NewTarget instantiates a new Target 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 NewTarget() *Target { - this := Target{} - return &this -} - -// NewTargetWithDefaults instantiates a new Target 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 NewTargetWithDefaults() *Target { - this := Target{} - return &this -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Target) GetDisplayName() (res TargetGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Target) GetDisplayNameOk() (ret TargetGetDisplayNameRetType, ok bool) { - return getTargetGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Target) HasDisplayName() bool { - _, ok := o.GetDisplayNameOk() - return ok -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Target) SetDisplayName(v TargetGetDisplayNameRetType) { - setTargetGetDisplayNameAttributeType(&o.DisplayName, 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 *Target) GetIp() (res TargetGetIpRetType) { - 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 *Target) GetIpOk() (ret TargetGetIpRetType, ok bool) { - return getTargetGetIpAttributeTypeOk(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 *Target) 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 *Target) SetIp(v TargetGetIpRetType) { - setTargetGetIpAttributeType(&o.Ip, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Target) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getTargetGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getTargetGetIpAttributeTypeOk(o.Ip); ok { - toSerialize["Ip"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableTarget struct { - value *Target - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTarget) Get() *Target { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTarget) Set(val *Target) { - 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 NullableTarget) 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 *NullableTarget) 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 NewNullableTarget(val *Target) *NullableTarget { - return &NullableTarget{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 NullableTarget) 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 *NullableTarget) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_target_pool.go b/services/loadbalancer/model_target_pool.go deleted file mode 100644 index e696393e2e..0000000000 --- a/services/loadbalancer/model_target_pool.go +++ /dev/null @@ -1,387 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the TargetPool type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TargetPool{} - -/* - types and functions for activeHealthCheck -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetActiveHealthCheckAttributeType = *ActiveHealthCheck - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetActiveHealthCheckArgType = ActiveHealthCheck - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetActiveHealthCheckRetType = ActiveHealthCheck - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTargetPoolGetActiveHealthCheckAttributeTypeOk(arg TargetPoolGetActiveHealthCheckAttributeType) (ret TargetPoolGetActiveHealthCheckRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTargetPoolGetActiveHealthCheckAttributeType(arg *TargetPoolGetActiveHealthCheckAttributeType, val TargetPoolGetActiveHealthCheckRetType) { - *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 TargetPoolGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTargetPoolGetNameAttributeTypeOk(arg TargetPoolGetNameAttributeType) (ret TargetPoolGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTargetPoolGetNameAttributeType(arg *TargetPoolGetNameAttributeType, val TargetPoolGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetNameRetType = string - -/* - types and functions for sessionPersistence -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetSessionPersistenceAttributeType = *SessionPersistence - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetSessionPersistenceArgType = SessionPersistence - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetSessionPersistenceRetType = SessionPersistence - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTargetPoolGetSessionPersistenceAttributeTypeOk(arg TargetPoolGetSessionPersistenceAttributeType) (ret TargetPoolGetSessionPersistenceRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTargetPoolGetSessionPersistenceAttributeType(arg *TargetPoolGetSessionPersistenceAttributeType, val TargetPoolGetSessionPersistenceRetType) { - *arg = &val -} - -/* - types and functions for targetPort -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetTargetPortAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetTargetPortArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetTargetPortRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTargetPoolGetTargetPortAttributeTypeOk(arg TargetPoolGetTargetPortAttributeType) (ret TargetPoolGetTargetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTargetPoolGetTargetPortAttributeType(arg *TargetPoolGetTargetPortAttributeType, val TargetPoolGetTargetPortRetType) { - *arg = &val -} - -/* - types and functions for targets -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetTargetsAttributeType = *[]Target - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetTargetsArgType = []Target - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPoolGetTargetsRetType = []Target - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTargetPoolGetTargetsAttributeTypeOk(arg TargetPoolGetTargetsAttributeType) (ret TargetPoolGetTargetsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTargetPoolGetTargetsAttributeType(arg *TargetPoolGetTargetsAttributeType, val TargetPoolGetTargetsRetType) { - *arg = &val -} - -// TargetPool struct for TargetPool -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TargetPool struct { - ActiveHealthCheck TargetPoolGetActiveHealthCheckAttributeType `json:"activeHealthCheck,omitempty"` - // Target pool name - Name TargetPoolGetNameAttributeType `json:"name,omitempty"` - SessionPersistence TargetPoolGetSessionPersistenceAttributeType `json:"sessionPersistence,omitempty"` - // The number identifying the port where each target listens for traffic. - // Can be cast to int32 without loss of precision. - TargetPort TargetPoolGetTargetPortAttributeType `json:"targetPort,omitempty"` - // List of all targets which will be used in the pool. Limited to 250. - Targets TargetPoolGetTargetsAttributeType `json:"targets,omitempty"` -} - -// NewTargetPool instantiates a new TargetPool 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 NewTargetPool() *TargetPool { - this := TargetPool{} - return &this -} - -// NewTargetPoolWithDefaults instantiates a new TargetPool 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 NewTargetPoolWithDefaults() *TargetPool { - this := TargetPool{} - return &this -} - -// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) GetActiveHealthCheck() (res TargetPoolGetActiveHealthCheckRetType) { - res, _ = o.GetActiveHealthCheckOk() - return -} - -// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) GetActiveHealthCheckOk() (ret TargetPoolGetActiveHealthCheckRetType, ok bool) { - return getTargetPoolGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck) -} - -// HasActiveHealthCheck returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) HasActiveHealthCheck() bool { - _, ok := o.GetActiveHealthCheckOk() - return ok -} - -// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) SetActiveHealthCheck(v TargetPoolGetActiveHealthCheckRetType) { - setTargetPoolGetActiveHealthCheckAttributeType(&o.ActiveHealthCheck, 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 *TargetPool) GetName() (res TargetPoolGetNameRetType) { - 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 *TargetPool) GetNameOk() (ret TargetPoolGetNameRetType, ok bool) { - return getTargetPoolGetNameAttributeTypeOk(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 *TargetPool) 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 *TargetPool) SetName(v TargetPoolGetNameRetType) { - setTargetPoolGetNameAttributeType(&o.Name, v) -} - -// GetSessionPersistence returns the SessionPersistence field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) GetSessionPersistence() (res TargetPoolGetSessionPersistenceRetType) { - res, _ = o.GetSessionPersistenceOk() - return -} - -// GetSessionPersistenceOk returns a tuple with the SessionPersistence field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) GetSessionPersistenceOk() (ret TargetPoolGetSessionPersistenceRetType, ok bool) { - return getTargetPoolGetSessionPersistenceAttributeTypeOk(o.SessionPersistence) -} - -// HasSessionPersistence returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) HasSessionPersistence() bool { - _, ok := o.GetSessionPersistenceOk() - return ok -} - -// SetSessionPersistence gets a reference to the given SessionPersistence and assigns it to the SessionPersistence field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) SetSessionPersistence(v TargetPoolGetSessionPersistenceRetType) { - setTargetPoolGetSessionPersistenceAttributeType(&o.SessionPersistence, v) -} - -// GetTargetPort returns the TargetPort field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) GetTargetPort() (res TargetPoolGetTargetPortRetType) { - res, _ = o.GetTargetPortOk() - return -} - -// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) GetTargetPortOk() (ret TargetPoolGetTargetPortRetType, ok bool) { - return getTargetPoolGetTargetPortAttributeTypeOk(o.TargetPort) -} - -// HasTargetPort returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) HasTargetPort() bool { - _, ok := o.GetTargetPortOk() - return ok -} - -// SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) SetTargetPort(v TargetPoolGetTargetPortRetType) { - setTargetPoolGetTargetPortAttributeType(&o.TargetPort, v) -} - -// GetTargets returns the Targets field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) GetTargets() (res TargetPoolGetTargetsRetType) { - res, _ = o.GetTargetsOk() - return -} - -// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) GetTargetsOk() (ret TargetPoolGetTargetsRetType, ok bool) { - return getTargetPoolGetTargetsAttributeTypeOk(o.Targets) -} - -// HasTargets returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) HasTargets() bool { - _, ok := o.GetTargetsOk() - return ok -} - -// SetTargets gets a reference to the given []Target and assigns it to the Targets field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TargetPool) SetTargets(v TargetPoolGetTargetsRetType) { - setTargetPoolGetTargetsAttributeType(&o.Targets, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o TargetPool) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getTargetPoolGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck); ok { - toSerialize["ActiveHealthCheck"] = val - } - if val, ok := getTargetPoolGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getTargetPoolGetSessionPersistenceAttributeTypeOk(o.SessionPersistence); ok { - toSerialize["SessionPersistence"] = val - } - if val, ok := getTargetPoolGetTargetPortAttributeTypeOk(o.TargetPort); ok { - toSerialize["TargetPort"] = val - } - if val, ok := getTargetPoolGetTargetsAttributeTypeOk(o.Targets); ok { - toSerialize["Targets"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableTargetPool struct { - value *TargetPool - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTargetPool) Get() *TargetPool { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTargetPool) Set(val *TargetPool) { - 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 NullableTargetPool) 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 *NullableTargetPool) 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 NewNullableTargetPool(val *TargetPool) *NullableTargetPool { - return &NullableTargetPool{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 NullableTargetPool) 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 *NullableTargetPool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_target_pool_test.go b/services/loadbalancer/model_target_pool_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_target_pool_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_target_test.go b/services/loadbalancer/model_target_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_target_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_tls_config.go b/services/loadbalancer/model_tls_config.go deleted file mode 100644 index a24f76c6ae..0000000000 --- a/services/loadbalancer/model_tls_config.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the TlsConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TlsConfig{} - -/* - types and functions for customCa -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigGetCustomCaAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTlsConfigGetCustomCaAttributeTypeOk(arg TlsConfigGetCustomCaAttributeType) (ret TlsConfigGetCustomCaRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTlsConfigGetCustomCaAttributeType(arg *TlsConfigGetCustomCaAttributeType, val TlsConfigGetCustomCaRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigGetCustomCaArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigGetCustomCaRetType = string - -/* - types and functions for enabled -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnabledAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnabledArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnabledRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTlsConfiggetEnabledAttributeTypeOk(arg TlsConfiggetEnabledAttributeType) (ret TlsConfiggetEnabledRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTlsConfiggetEnabledAttributeType(arg *TlsConfiggetEnabledAttributeType, val TlsConfiggetEnabledRetType) { - *arg = &val -} - -/* - types and functions for skipCertificateValidation -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetSkipCertificateValidationAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetSkipCertificateValidationArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetSkipCertificateValidationRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTlsConfiggetSkipCertificateValidationAttributeTypeOk(arg TlsConfiggetSkipCertificateValidationAttributeType) (ret TlsConfiggetSkipCertificateValidationRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTlsConfiggetSkipCertificateValidationAttributeType(arg *TlsConfiggetSkipCertificateValidationAttributeType, val TlsConfiggetSkipCertificateValidationRetType) { - *arg = &val -} - -// TlsConfig Set this to configure TLS settings. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfig struct { - // Specifies a custom Certificate Authority (CA). When provided, the target pool will trust certificates signed by this CA, in addition to any system-trusted CAs. This is useful for scenarios where the target pool needs to communicate with servers using self-signed or internally-issued certificates. Enabled needs to be set to true and skip validation to false for this option. - CustomCa TlsConfigGetCustomCaAttributeType `json:"customCa,omitempty"` - // Enable TLS (Transport Layer Security) bridging for the connection between Application Load Balancer and targets in this pool. When enabled, public CAs are trusted. Can be used in tandem with the options either custom CA or skip validation or alone. - Enabled TlsConfiggetEnabledAttributeType `json:"enabled,omitempty"` - // Bypass certificate validation for TLS bridging in this target pool. This option is insecure and can only be used with public CAs by setting enabled true. Meant to be used for testing purposes only! - SkipCertificateValidation TlsConfiggetSkipCertificateValidationAttributeType `json:"skipCertificateValidation,omitempty"` -} - -// NewTlsConfig instantiates a new TlsConfig 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 NewTlsConfig() *TlsConfig { - this := TlsConfig{} - return &this -} - -// NewTlsConfigWithDefaults instantiates a new TlsConfig 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 NewTlsConfigWithDefaults() *TlsConfig { - this := TlsConfig{} - return &this -} - -// GetCustomCa returns the CustomCa field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetCustomCa() (res TlsConfigGetCustomCaRetType) { - res, _ = o.GetCustomCaOk() - return -} - -// GetCustomCaOk returns a tuple with the CustomCa field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetCustomCaOk() (ret TlsConfigGetCustomCaRetType, ok bool) { - return getTlsConfigGetCustomCaAttributeTypeOk(o.CustomCa) -} - -// HasCustomCa returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) HasCustomCa() bool { - _, ok := o.GetCustomCaOk() - return ok -} - -// SetCustomCa gets a reference to the given string and assigns it to the CustomCa field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) SetCustomCa(v TlsConfigGetCustomCaRetType) { - setTlsConfigGetCustomCaAttributeType(&o.CustomCa, v) -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetEnabled() (res TlsConfiggetEnabledRetType) { - res, _ = o.GetEnabledOk() - return -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetEnabledOk() (ret TlsConfiggetEnabledRetType, ok bool) { - return getTlsConfiggetEnabledAttributeTypeOk(o.Enabled) -} - -// HasEnabled returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) HasEnabled() bool { - _, ok := o.GetEnabledOk() - return ok -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) SetEnabled(v TlsConfiggetEnabledRetType) { - setTlsConfiggetEnabledAttributeType(&o.Enabled, v) -} - -// GetSkipCertificateValidation returns the SkipCertificateValidation field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetSkipCertificateValidation() (res TlsConfiggetSkipCertificateValidationRetType) { - res, _ = o.GetSkipCertificateValidationOk() - return -} - -// GetSkipCertificateValidationOk returns a tuple with the SkipCertificateValidation field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetSkipCertificateValidationOk() (ret TlsConfiggetSkipCertificateValidationRetType, ok bool) { - return getTlsConfiggetSkipCertificateValidationAttributeTypeOk(o.SkipCertificateValidation) -} - -// HasSkipCertificateValidation returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) HasSkipCertificateValidation() bool { - _, ok := o.GetSkipCertificateValidationOk() - return ok -} - -// SetSkipCertificateValidation gets a reference to the given bool and assigns it to the SkipCertificateValidation field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) SetSkipCertificateValidation(v TlsConfiggetSkipCertificateValidationRetType) { - setTlsConfiggetSkipCertificateValidationAttributeType(&o.SkipCertificateValidation, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o TlsConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getTlsConfigGetCustomCaAttributeTypeOk(o.CustomCa); ok { - toSerialize["CustomCa"] = val - } - if val, ok := getTlsConfiggetEnabledAttributeTypeOk(o.Enabled); ok { - toSerialize["Enabled"] = val - } - if val, ok := getTlsConfiggetSkipCertificateValidationAttributeTypeOk(o.SkipCertificateValidation); ok { - toSerialize["SkipCertificateValidation"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableTlsConfig struct { - value *TlsConfig - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTlsConfig) Get() *TlsConfig { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTlsConfig) Set(val *TlsConfig) { - 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 NullableTlsConfig) 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 *NullableTlsConfig) 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 NewNullableTlsConfig(val *TlsConfig) *NullableTlsConfig { - return &NullableTlsConfig{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 NullableTlsConfig) 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 *NullableTlsConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_tls_config_test.go b/services/loadbalancer/model_tls_config_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_tls_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_update_credentials_payload.go b/services/loadbalancer/model_update_credentials_payload.go deleted file mode 100644 index 2d02bf3f49..0000000000 --- a/services/loadbalancer/model_update_credentials_payload.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the UpdateCredentialsPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateCredentialsPayload{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetDisplayNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg UpdateCredentialsPayloadGetDisplayNameAttributeType) (ret UpdateCredentialsPayloadGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateCredentialsPayloadGetDisplayNameAttributeType(arg *UpdateCredentialsPayloadGetDisplayNameAttributeType, val UpdateCredentialsPayloadGetDisplayNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetDisplayNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetDisplayNameRetType = string - -/* - types and functions for password -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetPasswordAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(arg UpdateCredentialsPayloadGetPasswordAttributeType) (ret UpdateCredentialsPayloadGetPasswordRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateCredentialsPayloadGetPasswordAttributeType(arg *UpdateCredentialsPayloadGetPasswordAttributeType, val UpdateCredentialsPayloadGetPasswordRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetPasswordArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetPasswordRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetUsernameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(arg UpdateCredentialsPayloadGetUsernameAttributeType) (ret UpdateCredentialsPayloadGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateCredentialsPayloadGetUsernameAttributeType(arg *UpdateCredentialsPayloadGetUsernameAttributeType, val UpdateCredentialsPayloadGetUsernameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetUsernameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayloadGetUsernameRetType = string - -// UpdateCredentialsPayload struct for UpdateCredentialsPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsPayload struct { - // Credential name - DisplayName UpdateCredentialsPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"` - // A valid password used for an existing STACKIT Observability instance, which is used during basic auth. - Password UpdateCredentialsPayloadGetPasswordAttributeType `json:"password,omitempty"` - // A valid username used for an existing STACKIT Observability instance, which is used during basic auth. - Username UpdateCredentialsPayloadGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewUpdateCredentialsPayload instantiates a new UpdateCredentialsPayload 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 NewUpdateCredentialsPayload() *UpdateCredentialsPayload { - this := UpdateCredentialsPayload{} - return &this -} - -// NewUpdateCredentialsPayloadWithDefaults instantiates a new UpdateCredentialsPayload 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 NewUpdateCredentialsPayloadWithDefaults() *UpdateCredentialsPayload { - this := UpdateCredentialsPayload{} - return &this -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) GetDisplayName() (res UpdateCredentialsPayloadGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) GetDisplayNameOk() (ret UpdateCredentialsPayloadGetDisplayNameRetType, ok bool) { - return getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) HasDisplayName() bool { - _, ok := o.GetDisplayNameOk() - return ok -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) SetDisplayName(v UpdateCredentialsPayloadGetDisplayNameRetType) { - setUpdateCredentialsPayloadGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetPassword returns the Password field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) GetPassword() (res UpdateCredentialsPayloadGetPasswordRetType) { - res, _ = o.GetPasswordOk() - return -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) GetPasswordOk() (ret UpdateCredentialsPayloadGetPasswordRetType, ok bool) { - return getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password) -} - -// HasPassword returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) HasPassword() bool { - _, ok := o.GetPasswordOk() - return ok -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) SetPassword(v UpdateCredentialsPayloadGetPasswordRetType) { - setUpdateCredentialsPayloadGetPasswordAttributeType(&o.Password, v) -} - -// GetUsername returns the Username field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) GetUsername() (res UpdateCredentialsPayloadGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) GetUsernameOk() (ret UpdateCredentialsPayloadGetUsernameRetType, ok bool) { - return getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) HasUsername() bool { - _, ok := o.GetUsernameOk() - return ok -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsPayload) SetUsername(v UpdateCredentialsPayloadGetUsernameRetType) { - setUpdateCredentialsPayloadGetUsernameAttributeType(&o.Username, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateCredentialsPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password); ok { - toSerialize["Password"] = val - } - if val, ok := getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateCredentialsPayload struct { - value *UpdateCredentialsPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateCredentialsPayload) Get() *UpdateCredentialsPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateCredentialsPayload) Set(val *UpdateCredentialsPayload) { - 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 NullableUpdateCredentialsPayload) 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 *NullableUpdateCredentialsPayload) 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 NewNullableUpdateCredentialsPayload(val *UpdateCredentialsPayload) *NullableUpdateCredentialsPayload { - return &NullableUpdateCredentialsPayload{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 NullableUpdateCredentialsPayload) 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 *NullableUpdateCredentialsPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_update_credentials_payload_test.go b/services/loadbalancer/model_update_credentials_payload_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_update_credentials_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_update_credentials_response.go b/services/loadbalancer/model_update_credentials_response.go deleted file mode 100644 index e13dd16b96..0000000000 --- a/services/loadbalancer/model_update_credentials_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the UpdateCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateCredentialsResponse{} - -/* - types and functions for credential -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsResponseGetCredentialAttributeType = *CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsResponseGetCredentialArgType = CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsResponseGetCredentialRetType = CredentialsResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateCredentialsResponseGetCredentialAttributeTypeOk(arg UpdateCredentialsResponseGetCredentialAttributeType) (ret UpdateCredentialsResponseGetCredentialRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateCredentialsResponseGetCredentialAttributeType(arg *UpdateCredentialsResponseGetCredentialAttributeType, val UpdateCredentialsResponseGetCredentialRetType) { - *arg = &val -} - -// UpdateCredentialsResponse struct for UpdateCredentialsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateCredentialsResponse struct { - Credential UpdateCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` -} - -// NewUpdateCredentialsResponse instantiates a new UpdateCredentialsResponse 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 NewUpdateCredentialsResponse() *UpdateCredentialsResponse { - this := UpdateCredentialsResponse{} - return &this -} - -// NewUpdateCredentialsResponseWithDefaults instantiates a new UpdateCredentialsResponse 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 NewUpdateCredentialsResponseWithDefaults() *UpdateCredentialsResponse { - this := UpdateCredentialsResponse{} - return &this -} - -// GetCredential returns the Credential field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsResponse) GetCredential() (res UpdateCredentialsResponseGetCredentialRetType) { - res, _ = o.GetCredentialOk() - return -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsResponse) GetCredentialOk() (ret UpdateCredentialsResponseGetCredentialRetType, ok bool) { - return getUpdateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) -} - -// HasCredential returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsResponse) HasCredential() bool { - _, ok := o.GetCredentialOk() - return ok -} - -// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateCredentialsResponse) SetCredential(v UpdateCredentialsResponseGetCredentialRetType) { - setUpdateCredentialsResponseGetCredentialAttributeType(&o.Credential, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { - toSerialize["Credential"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateCredentialsResponse struct { - value *UpdateCredentialsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateCredentialsResponse) Get() *UpdateCredentialsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateCredentialsResponse) Set(val *UpdateCredentialsResponse) { - 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 NullableUpdateCredentialsResponse) 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 *NullableUpdateCredentialsResponse) 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 NewNullableUpdateCredentialsResponse(val *UpdateCredentialsResponse) *NullableUpdateCredentialsResponse { - return &NullableUpdateCredentialsResponse{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 NullableUpdateCredentialsResponse) 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 *NullableUpdateCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_update_credentials_response_test.go b/services/loadbalancer/model_update_credentials_response_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_update_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/model_update_load_balancer_payload.go b/services/loadbalancer/model_update_load_balancer_payload.go deleted file mode 100644 index c2ff18c00e..0000000000 --- a/services/loadbalancer/model_update_load_balancer_payload.go +++ /dev/null @@ -1,1163 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" - "fmt" -) - -// checks if the UpdateLoadBalancerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateLoadBalancerPayload{} - -/* - types and functions for disableTargetSecurityGroupAssignment -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType) (ret UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(arg *UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType, val UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { - *arg = &val -} - -/* - types and functions for errors -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetErrorsAttributeType) (ret UpdateLoadBalancerPayloadGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetErrorsAttributeType(arg *UpdateLoadBalancerPayloadGetErrorsAttributeType, val UpdateLoadBalancerPayloadGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for externalAddress -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetExternalAddressAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg UpdateLoadBalancerPayloadGetExternalAddressAttributeType) (ret UpdateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(arg *UpdateLoadBalancerPayloadGetExternalAddressAttributeType, val UpdateLoadBalancerPayloadGetExternalAddressRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetExternalAddressArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetExternalAddressRetType = string - -/* - types and functions for labels -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetLabelsAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetLabelsArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetLabelsRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetLabelsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetLabelsAttributeType) (ret UpdateLoadBalancerPayloadGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetLabelsAttributeType(arg *UpdateLoadBalancerPayloadGetLabelsAttributeType, val UpdateLoadBalancerPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for listeners -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetListenersAttributeType = *[]Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetListenersArgType = []Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetListenersRetType = []Listener - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(arg UpdateLoadBalancerPayloadGetListenersAttributeType) (ret UpdateLoadBalancerPayloadGetListenersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetListenersAttributeType(arg *UpdateLoadBalancerPayloadGetListenersAttributeType, val UpdateLoadBalancerPayloadGetListenersRetType) { - *arg = &val -} - -/* - types and functions for loadBalancerSecurityGroup -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType = *CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupArgType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(arg UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType) (ret UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(arg *UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType, val UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { - *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 UpdateLoadBalancerPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(arg UpdateLoadBalancerPayloadGetNameAttributeType) (ret UpdateLoadBalancerPayloadGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetNameAttributeType(arg *UpdateLoadBalancerPayloadGetNameAttributeType, val UpdateLoadBalancerPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetNameRetType = string - -/* - types and functions for networks -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetNetworksAttributeType = *[]Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetNetworksArgType = []Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetNetworksRetType = []Network - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg UpdateLoadBalancerPayloadGetNetworksAttributeType) (ret UpdateLoadBalancerPayloadGetNetworksRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetNetworksAttributeType(arg *UpdateLoadBalancerPayloadGetNetworksAttributeType, val UpdateLoadBalancerPayloadGetNetworksRetType) { - *arg = &val -} - -/* - types and functions for options -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetOptionsAttributeType) (ret UpdateLoadBalancerPayloadGetOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetOptionsAttributeType(arg *UpdateLoadBalancerPayloadGetOptionsAttributeType, val UpdateLoadBalancerPayloadGetOptionsRetType) { - *arg = &val -} - -/* - types and functions for planId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetPlanIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg UpdateLoadBalancerPayloadGetPlanIdAttributeType) (ret UpdateLoadBalancerPayloadGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetPlanIdAttributeType(arg *UpdateLoadBalancerPayloadGetPlanIdAttributeType, val UpdateLoadBalancerPayloadGetPlanIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetPlanIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetPlanIdRetType = string - -/* - types and functions for privateAddress -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetPrivateAddressAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg UpdateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret UpdateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *UpdateLoadBalancerPayloadGetPrivateAddressAttributeType, val UpdateLoadBalancerPayloadGetPrivateAddressRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetPrivateAddressArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetPrivateAddressRetType = 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 UpdateLoadBalancerPayloadGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetRegionAttributeTypeOk(arg UpdateLoadBalancerPayloadGetRegionAttributeType) (ret UpdateLoadBalancerPayloadGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetRegionAttributeType(arg *UpdateLoadBalancerPayloadGetRegionAttributeType, val UpdateLoadBalancerPayloadGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetRegionRetType = string - -/* - types and functions for status -*/ - -// isEnum - -// UpdateLoadBalancerPayloadStatus the model 'UpdateLoadBalancerPayload' -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadStatus string - -// List of Status -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UPDATELOADBALANCERPAYLOADSTATUS_UNSPECIFIED UpdateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UPDATELOADBALANCERPAYLOADSTATUS_PENDING UpdateLoadBalancerPayloadStatus = "STATUS_PENDING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UPDATELOADBALANCERPAYLOADSTATUS_READY UpdateLoadBalancerPayloadStatus = "STATUS_READY" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UPDATELOADBALANCERPAYLOADSTATUS_ERROR UpdateLoadBalancerPayloadStatus = "STATUS_ERROR" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - UPDATELOADBALANCERPAYLOADSTATUS_TERMINATING UpdateLoadBalancerPayloadStatus = "STATUS_TERMINATING" -) - -// All allowed values of UpdateLoadBalancerPayload enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedUpdateLoadBalancerPayloadStatusEnumValues = []UpdateLoadBalancerPayloadStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *UpdateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson UpdateLoadBalancerPayloadStatus - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := UpdateLoadBalancerPayloadStatus(value) - for _, existing := range AllowedUpdateLoadBalancerPayloadStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid UpdateLoadBalancerPayload", value) -} - -// NewUpdateLoadBalancerPayloadStatusFromValue returns a pointer to a valid UpdateLoadBalancerPayloadStatus -// 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 NewUpdateLoadBalancerPayloadStatusFromValue(v UpdateLoadBalancerPayloadStatus) (*UpdateLoadBalancerPayloadStatus, error) { - ev := UpdateLoadBalancerPayloadStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for UpdateLoadBalancerPayloadStatus: valid values are %v", v, AllowedUpdateLoadBalancerPayloadStatusEnumValues) - } -} - -// 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 UpdateLoadBalancerPayloadStatus) IsValid() bool { - for _, existing := range AllowedUpdateLoadBalancerPayloadStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusStatus value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v UpdateLoadBalancerPayloadStatus) Ptr() *UpdateLoadBalancerPayloadStatus { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateLoadBalancerPayloadStatus struct { - value *UpdateLoadBalancerPayloadStatus - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateLoadBalancerPayloadStatus) Get() *UpdateLoadBalancerPayloadStatus { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateLoadBalancerPayloadStatus) Set(val *UpdateLoadBalancerPayloadStatus) { - 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 NullableUpdateLoadBalancerPayloadStatus) 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 *NullableUpdateLoadBalancerPayloadStatus) 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 NewNullableUpdateLoadBalancerPayloadStatus(val *UpdateLoadBalancerPayloadStatus) *NullableUpdateLoadBalancerPayloadStatus { - return &NullableUpdateLoadBalancerPayloadStatus{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 NullableUpdateLoadBalancerPayloadStatus) 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 *NullableUpdateLoadBalancerPayloadStatus) 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 UpdateLoadBalancerPayloadGetStatusAttributeType = *UpdateLoadBalancerPayloadStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetStatusArgType = UpdateLoadBalancerPayloadStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetStatusRetType = UpdateLoadBalancerPayloadStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(arg UpdateLoadBalancerPayloadGetStatusAttributeType) (ret UpdateLoadBalancerPayloadGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetStatusAttributeType(arg *UpdateLoadBalancerPayloadGetStatusAttributeType, val UpdateLoadBalancerPayloadGetStatusRetType) { - *arg = &val -} - -/* - types and functions for targetPools -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret UpdateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *UpdateLoadBalancerPayloadGetTargetPoolsAttributeType, val UpdateLoadBalancerPayloadGetTargetPoolsRetType) { - *arg = &val -} - -/* - types and functions for targetSecurityGroup -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType = *CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetTargetSecurityGroupArgType = CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType = CreateLoadBalancerPayloadTargetSecurityGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(arg UpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType) (ret UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(arg *UpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType, val UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType) { - *arg = &val -} - -/* - types and functions for version -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetVersionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(arg UpdateLoadBalancerPayloadGetVersionAttributeType) (ret UpdateLoadBalancerPayloadGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateLoadBalancerPayloadGetVersionAttributeType(arg *UpdateLoadBalancerPayloadGetVersionAttributeType, val UpdateLoadBalancerPayloadGetVersionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetVersionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayloadGetVersionRetType = string - -// UpdateLoadBalancerPayload struct for UpdateLoadBalancerPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateLoadBalancerPayload struct { - // Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation. - DisableTargetSecurityGroupAssignment UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"` - // Reports all errors a load balancer has. - Errors UpdateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` - // External load balancer IP address where this load balancer is exposed. Not changeable after creation. - ExternalAddress UpdateLoadBalancerPayloadGetExternalAddressAttributeType `json:"externalAddress,omitempty"` - // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per LB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. - Labels UpdateLoadBalancerPayloadGetLabelsAttributeType `json:"labels,omitempty"` - // There is a maximum listener count of 20. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. - Listeners UpdateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` - LoadBalancerSecurityGroup UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"` - // Load balancer name. Not changeable after creation. - Name UpdateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks UpdateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"` - Options UpdateLoadBalancerPayloadGetOptionsAttributeType `json:"options,omitempty"` - // Service Plan configures the size of the Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId UpdateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"` - // Transient private load balancer IP address that can change any time. - PrivateAddress UpdateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` - // Region of the LoadBalancer - Region UpdateLoadBalancerPayloadGetRegionAttributeType `json:"region,omitempty"` - Status UpdateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"` - // List of all target pools which will be used in the load balancer. Limited to 20. - TargetPools UpdateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"` - TargetSecurityGroup UpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType `json:"targetSecurityGroup,omitempty"` - // Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version UpdateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"` -} - -// NewUpdateLoadBalancerPayload instantiates a new UpdateLoadBalancerPayload 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 NewUpdateLoadBalancerPayload() *UpdateLoadBalancerPayload { - this := UpdateLoadBalancerPayload{} - return &this -} - -// NewUpdateLoadBalancerPayloadWithDefaults instantiates a new UpdateLoadBalancerPayload 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 NewUpdateLoadBalancerPayloadWithDefaults() *UpdateLoadBalancerPayload { - this := UpdateLoadBalancerPayload{} - return &this -} - -// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() (res UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { - res, _ = o.GetDisableTargetSecurityGroupAssignmentOk() - return -} - -// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (ret UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) { - return getUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment) -} - -// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool { - _, ok := o.GetDisableTargetSecurityGroupAssignmentOk() - return ok -} - -// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { - setUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v) -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetErrors() (res UpdateLoadBalancerPayloadGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetErrorsOk() (ret UpdateLoadBalancerPayloadGetErrorsRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasErrors() bool { - _, ok := o.GetErrorsOk() - return ok -} - -// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetErrors(v UpdateLoadBalancerPayloadGetErrorsRetType) { - setUpdateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v) -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetExternalAddress() (res UpdateLoadBalancerPayloadGetExternalAddressRetType) { - res, _ = o.GetExternalAddressOk() - return -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetExternalAddressOk() (ret UpdateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress) -} - -// HasExternalAddress returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasExternalAddress() bool { - _, ok := o.GetExternalAddressOk() - return ok -} - -// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetExternalAddress(v UpdateLoadBalancerPayloadGetExternalAddressRetType) { - setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, 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 *UpdateLoadBalancerPayload) GetLabels() (res UpdateLoadBalancerPayloadGetLabelsRetType) { - 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 *UpdateLoadBalancerPayload) GetLabelsOk() (ret UpdateLoadBalancerPayloadGetLabelsRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetLabelsAttributeTypeOk(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 *UpdateLoadBalancerPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetLabels(v UpdateLoadBalancerPayloadGetLabelsRetType) { - setUpdateLoadBalancerPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetListeners() (res UpdateLoadBalancerPayloadGetListenersRetType) { - res, _ = o.GetListenersOk() - return -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetListenersOk() (ret UpdateLoadBalancerPayloadGetListenersRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners) -} - -// HasListeners returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasListeners() bool { - _, ok := o.GetListenersOk() - return ok -} - -// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetListeners(v UpdateLoadBalancerPayloadGetListenersRetType) { - setUpdateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v) -} - -// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroup() (res UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { - res, _ = o.GetLoadBalancerSecurityGroupOk() - return -} - -// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (ret UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup) -} - -// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool { - _, ok := o.GetLoadBalancerSecurityGroupOk() - return ok -} - -// SetLoadBalancerSecurityGroup gets a reference to the given CreateLoadBalancerPayloadLoadBalancerSecurityGroup and assigns it to the LoadBalancerSecurityGroup field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { - setUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(&o.LoadBalancerSecurityGroup, 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 *UpdateLoadBalancerPayload) GetName() (res UpdateLoadBalancerPayloadGetNameRetType) { - 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 *UpdateLoadBalancerPayload) GetNameOk() (ret UpdateLoadBalancerPayloadGetNameRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(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 *UpdateLoadBalancerPayload) 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 *UpdateLoadBalancerPayload) SetName(v UpdateLoadBalancerPayloadGetNameRetType) { - setUpdateLoadBalancerPayloadGetNameAttributeType(&o.Name, v) -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetNetworks() (res UpdateLoadBalancerPayloadGetNetworksRetType) { - res, _ = o.GetNetworksOk() - return -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetNetworksOk() (ret UpdateLoadBalancerPayloadGetNetworksRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks) -} - -// HasNetworks returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasNetworks() bool { - _, ok := o.GetNetworksOk() - return ok -} - -// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetNetworks(v UpdateLoadBalancerPayloadGetNetworksRetType) { - setUpdateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v) -} - -// GetOptions returns the Options field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetOptions() (res UpdateLoadBalancerPayloadGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetOptionsOk() (ret UpdateLoadBalancerPayloadGetOptionsRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok -} - -// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetOptions(v UpdateLoadBalancerPayloadGetOptionsRetType) { - setUpdateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v) -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetPlanId() (res UpdateLoadBalancerPayloadGetPlanIdRetType) { - res, _ = o.GetPlanIdOk() - return -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetPlanIdOk() (ret UpdateLoadBalancerPayloadGetPlanIdRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId) -} - -// HasPlanId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasPlanId() bool { - _, ok := o.GetPlanIdOk() - return ok -} - -// SetPlanId gets a reference to the given string and assigns it to the PlanId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetPlanId(v UpdateLoadBalancerPayloadGetPlanIdRetType) { - setUpdateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetPrivateAddress() (res UpdateLoadBalancerPayloadGetPrivateAddressRetType) { - res, _ = o.GetPrivateAddressOk() - return -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetPrivateAddressOk() (ret UpdateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress) -} - -// HasPrivateAddress returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasPrivateAddress() bool { - _, ok := o.GetPrivateAddressOk() - return ok -} - -// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v UpdateLoadBalancerPayloadGetPrivateAddressRetType) { - setUpdateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v) -} - -// GetRegion returns the Region field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetRegion() (res UpdateLoadBalancerPayloadGetRegionRetType) { - res, _ = o.GetRegionOk() - return -} - -// GetRegionOk returns a tuple with the Region field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetRegionOk() (ret UpdateLoadBalancerPayloadGetRegionRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region) -} - -// HasRegion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasRegion() bool { - _, ok := o.GetRegionOk() - return ok -} - -// SetRegion gets a reference to the given string and assigns it to the Region field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetRegion(v UpdateLoadBalancerPayloadGetRegionRetType) { - setUpdateLoadBalancerPayloadGetRegionAttributeType(&o.Region, 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 *UpdateLoadBalancerPayload) GetStatus() (res UpdateLoadBalancerPayloadGetStatusRetType) { - 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 *UpdateLoadBalancerPayload) GetStatusOk() (ret UpdateLoadBalancerPayloadGetStatusRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(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 *UpdateLoadBalancerPayload) 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 *UpdateLoadBalancerPayload) SetStatus(v UpdateLoadBalancerPayloadGetStatusRetType) { - setUpdateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v) -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetTargetPools() (res UpdateLoadBalancerPayloadGetTargetPoolsRetType) { - res, _ = o.GetTargetPoolsOk() - return -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetTargetPoolsOk() (ret UpdateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools) -} - -// HasTargetPools returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasTargetPools() bool { - _, ok := o.GetTargetPoolsOk() - return ok -} - -// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetTargetPools(v UpdateLoadBalancerPayloadGetTargetPoolsRetType) { - setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v) -} - -// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetTargetSecurityGroup() (res UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType) { - res, _ = o.GetTargetSecurityGroupOk() - return -} - -// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetTargetSecurityGroupOk() (ret UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup) -} - -// HasTargetSecurityGroup returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasTargetSecurityGroup() bool { - _, ok := o.GetTargetSecurityGroupOk() - return ok -} - -// SetTargetSecurityGroup gets a reference to the given CreateLoadBalancerPayloadTargetSecurityGroup and assigns it to the TargetSecurityGroup field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetTargetSecurityGroup(v UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType) { - setUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(&o.TargetSecurityGroup, v) -} - -// GetVersion returns the Version field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetVersion() (res UpdateLoadBalancerPayloadGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) GetVersionOk() (ret UpdateLoadBalancerPayloadGetVersionRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateLoadBalancerPayload) SetVersion(v UpdateLoadBalancerPayloadGetVersionRetType) { - setUpdateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok { - toSerialize["DisableTargetSecurityGroupAssignment"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { - toSerialize["ExternalAddress"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok { - toSerialize["Listeners"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup); ok { - toSerialize["LoadBalancerSecurityGroup"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok { - toSerialize["Networks"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { - toSerialize["PrivateAddress"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region); ok { - toSerialize["Region"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { - toSerialize["TargetPools"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup); ok { - toSerialize["TargetSecurityGroup"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateLoadBalancerPayload struct { - value *UpdateLoadBalancerPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateLoadBalancerPayload) Get() *UpdateLoadBalancerPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateLoadBalancerPayload) Set(val *UpdateLoadBalancerPayload) { - 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 NullableUpdateLoadBalancerPayload) 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 *NullableUpdateLoadBalancerPayload) 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 NewNullableUpdateLoadBalancerPayload(val *UpdateLoadBalancerPayload) *NullableUpdateLoadBalancerPayload { - return &NullableUpdateLoadBalancerPayload{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 NullableUpdateLoadBalancerPayload) 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 *NullableUpdateLoadBalancerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_update_load_balancer_payload_test.go b/services/loadbalancer/model_update_load_balancer_payload_test.go deleted file mode 100644 index 82a1dc395f..0000000000 --- a/services/loadbalancer/model_update_load_balancer_payload_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer - -import ( - "testing" -) - -// isEnum - -func TestUpdateLoadBalancerPayloadStatus_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"STATUS_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"STATUS_PENDING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"STATUS_READY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"STATUS_ERROR"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"STATUS_TERMINATING"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := UpdateLoadBalancerPayloadStatus("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/loadbalancer/model_update_target_pool_payload.go b/services/loadbalancer/model_update_target_pool_payload.go deleted file mode 100644 index 361db01c34..0000000000 --- a/services/loadbalancer/model_update_target_pool_payload.go +++ /dev/null @@ -1,387 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// 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 loadbalancer - -import ( - "encoding/json" -) - -// checks if the UpdateTargetPoolPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateTargetPoolPayload{} - -/* - types and functions for activeHealthCheck -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType = *ActiveHealthCheck - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetActiveHealthCheckArgType = ActiveHealthCheck - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetActiveHealthCheckRetType = ActiveHealthCheck - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(arg UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType) (ret UpdateTargetPoolPayloadGetActiveHealthCheckRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateTargetPoolPayloadGetActiveHealthCheckAttributeType(arg *UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType, val UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { - *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 UpdateTargetPoolPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateTargetPoolPayloadGetNameAttributeTypeOk(arg UpdateTargetPoolPayloadGetNameAttributeType) (ret UpdateTargetPoolPayloadGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateTargetPoolPayloadGetNameAttributeType(arg *UpdateTargetPoolPayloadGetNameAttributeType, val UpdateTargetPoolPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetNameRetType = string - -/* - types and functions for sessionPersistence -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetSessionPersistenceAttributeType = *SessionPersistence - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetSessionPersistenceArgType = SessionPersistence - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetSessionPersistenceRetType = SessionPersistence - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateTargetPoolPayloadGetSessionPersistenceAttributeTypeOk(arg UpdateTargetPoolPayloadGetSessionPersistenceAttributeType) (ret UpdateTargetPoolPayloadGetSessionPersistenceRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateTargetPoolPayloadGetSessionPersistenceAttributeType(arg *UpdateTargetPoolPayloadGetSessionPersistenceAttributeType, val UpdateTargetPoolPayloadGetSessionPersistenceRetType) { - *arg = &val -} - -/* - types and functions for targetPort -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetTargetPortAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetTargetPortArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetTargetPortRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(arg UpdateTargetPoolPayloadGetTargetPortAttributeType) (ret UpdateTargetPoolPayloadGetTargetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateTargetPoolPayloadGetTargetPortAttributeType(arg *UpdateTargetPoolPayloadGetTargetPortAttributeType, val UpdateTargetPoolPayloadGetTargetPortRetType) { - *arg = &val -} - -/* - types and functions for targets -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetTargetsAttributeType = *[]Target - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetTargetsArgType = []Target - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayloadGetTargetsRetType = []Target - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(arg UpdateTargetPoolPayloadGetTargetsAttributeType) (ret UpdateTargetPoolPayloadGetTargetsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateTargetPoolPayloadGetTargetsAttributeType(arg *UpdateTargetPoolPayloadGetTargetsAttributeType, val UpdateTargetPoolPayloadGetTargetsRetType) { - *arg = &val -} - -// UpdateTargetPoolPayload struct for UpdateTargetPoolPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateTargetPoolPayload struct { - ActiveHealthCheck UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType `json:"activeHealthCheck,omitempty"` - // Target pool name - Name UpdateTargetPoolPayloadGetNameAttributeType `json:"name,omitempty"` - SessionPersistence UpdateTargetPoolPayloadGetSessionPersistenceAttributeType `json:"sessionPersistence,omitempty"` - // The number identifying the port where each target listens for traffic. - // Can be cast to int32 without loss of precision. - TargetPort UpdateTargetPoolPayloadGetTargetPortAttributeType `json:"targetPort,omitempty"` - // List of all targets which will be used in the pool. Limited to 250. - Targets UpdateTargetPoolPayloadGetTargetsAttributeType `json:"targets,omitempty"` -} - -// NewUpdateTargetPoolPayload instantiates a new UpdateTargetPoolPayload 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 NewUpdateTargetPoolPayload() *UpdateTargetPoolPayload { - this := UpdateTargetPoolPayload{} - return &this -} - -// NewUpdateTargetPoolPayloadWithDefaults instantiates a new UpdateTargetPoolPayload 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 NewUpdateTargetPoolPayloadWithDefaults() *UpdateTargetPoolPayload { - this := UpdateTargetPoolPayload{} - return &this -} - -// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) GetActiveHealthCheck() (res UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { - res, _ = o.GetActiveHealthCheckOk() - return -} - -// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) GetActiveHealthCheckOk() (ret UpdateTargetPoolPayloadGetActiveHealthCheckRetType, ok bool) { - return getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck) -} - -// HasActiveHealthCheck returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) HasActiveHealthCheck() bool { - _, ok := o.GetActiveHealthCheckOk() - return ok -} - -// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) SetActiveHealthCheck(v UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { - setUpdateTargetPoolPayloadGetActiveHealthCheckAttributeType(&o.ActiveHealthCheck, 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 *UpdateTargetPoolPayload) GetName() (res UpdateTargetPoolPayloadGetNameRetType) { - 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 *UpdateTargetPoolPayload) GetNameOk() (ret UpdateTargetPoolPayloadGetNameRetType, ok bool) { - return getUpdateTargetPoolPayloadGetNameAttributeTypeOk(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 *UpdateTargetPoolPayload) 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 *UpdateTargetPoolPayload) SetName(v UpdateTargetPoolPayloadGetNameRetType) { - setUpdateTargetPoolPayloadGetNameAttributeType(&o.Name, v) -} - -// GetSessionPersistence returns the SessionPersistence field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) GetSessionPersistence() (res UpdateTargetPoolPayloadGetSessionPersistenceRetType) { - res, _ = o.GetSessionPersistenceOk() - return -} - -// GetSessionPersistenceOk returns a tuple with the SessionPersistence field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) GetSessionPersistenceOk() (ret UpdateTargetPoolPayloadGetSessionPersistenceRetType, ok bool) { - return getUpdateTargetPoolPayloadGetSessionPersistenceAttributeTypeOk(o.SessionPersistence) -} - -// HasSessionPersistence returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) HasSessionPersistence() bool { - _, ok := o.GetSessionPersistenceOk() - return ok -} - -// SetSessionPersistence gets a reference to the given SessionPersistence and assigns it to the SessionPersistence field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) SetSessionPersistence(v UpdateTargetPoolPayloadGetSessionPersistenceRetType) { - setUpdateTargetPoolPayloadGetSessionPersistenceAttributeType(&o.SessionPersistence, v) -} - -// GetTargetPort returns the TargetPort field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) GetTargetPort() (res UpdateTargetPoolPayloadGetTargetPortRetType) { - res, _ = o.GetTargetPortOk() - return -} - -// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) GetTargetPortOk() (ret UpdateTargetPoolPayloadGetTargetPortRetType, ok bool) { - return getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(o.TargetPort) -} - -// HasTargetPort returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) HasTargetPort() bool { - _, ok := o.GetTargetPortOk() - return ok -} - -// SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) SetTargetPort(v UpdateTargetPoolPayloadGetTargetPortRetType) { - setUpdateTargetPoolPayloadGetTargetPortAttributeType(&o.TargetPort, v) -} - -// GetTargets returns the Targets field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) GetTargets() (res UpdateTargetPoolPayloadGetTargetsRetType) { - res, _ = o.GetTargetsOk() - return -} - -// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) GetTargetsOk() (ret UpdateTargetPoolPayloadGetTargetsRetType, ok bool) { - return getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(o.Targets) -} - -// HasTargets returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) HasTargets() bool { - _, ok := o.GetTargetsOk() - return ok -} - -// SetTargets gets a reference to the given []Target and assigns it to the Targets field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateTargetPoolPayload) SetTargets(v UpdateTargetPoolPayloadGetTargetsRetType) { - setUpdateTargetPoolPayloadGetTargetsAttributeType(&o.Targets, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck); ok { - toSerialize["ActiveHealthCheck"] = val - } - if val, ok := getUpdateTargetPoolPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getUpdateTargetPoolPayloadGetSessionPersistenceAttributeTypeOk(o.SessionPersistence); ok { - toSerialize["SessionPersistence"] = val - } - if val, ok := getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(o.TargetPort); ok { - toSerialize["TargetPort"] = val - } - if val, ok := getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(o.Targets); ok { - toSerialize["Targets"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateTargetPoolPayload struct { - value *UpdateTargetPoolPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateTargetPoolPayload) Get() *UpdateTargetPoolPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateTargetPoolPayload) Set(val *UpdateTargetPoolPayload) { - 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 NullableUpdateTargetPoolPayload) 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 *NullableUpdateTargetPoolPayload) 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 NewNullableUpdateTargetPoolPayload(val *UpdateTargetPoolPayload) *NullableUpdateTargetPoolPayload { - return &NullableUpdateTargetPoolPayload{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 NullableUpdateTargetPoolPayload) 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 *NullableUpdateTargetPoolPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/loadbalancer/model_update_target_pool_payload_test.go b/services/loadbalancer/model_update_target_pool_payload_test.go deleted file mode 100644 index 5551ef6b57..0000000000 --- a/services/loadbalancer/model_update_target_pool_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer diff --git a/services/loadbalancer/oas_commit b/services/loadbalancer/oas_commit index 69bfa80b38..6a8ba08d49 100644 --- a/services/loadbalancer/oas_commit +++ b/services/loadbalancer/oas_commit @@ -1 +1 @@ -864bdad12a54f612df8fcdb6e41dd2933e94c3af +ef9232ba8d49c72fc3397a365b09ca1a8205b25e diff --git a/services/loadbalancer/package.go b/services/loadbalancer/package.go new file mode 100644 index 0000000000..71a2e9f734 --- /dev/null +++ b/services/loadbalancer/package.go @@ -0,0 +1 @@ +package loadbalancer diff --git a/services/loadbalancer/utils.go b/services/loadbalancer/utils.go deleted file mode 100644 index c9e10724e8..0000000000 --- a/services/loadbalancer/utils.go +++ /dev/null @@ -1,466 +0,0 @@ -/* -STACKIT Network Load Balancer API - -This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package loadbalancer - -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/loadbalancer/wait/deprecation.go b/services/loadbalancer/wait/deprecation.go deleted file mode 100644 index 58f184c093..0000000000 --- a/services/loadbalancer/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/loadbalancer/wait/wait.go b/services/loadbalancer/wait/wait.go deleted file mode 100644 index 32cc3d7e31..0000000000 --- a/services/loadbalancer/wait/wait.go +++ /dev/null @@ -1,98 +0,0 @@ -package wait - -import ( - "context" - "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/loadbalancer" -) - -// Load balancer instance status -const ( - // Deprecated: InstanceStatusUnspecified is deprecated and will be removed after 14th November 2025. Use [loadbalancer.LOADBALANCERSTATUS_UNSPECIFIED] instead. - InstanceStatusUnspecified = "STATUS_UNSPECIFIED" - // Deprecated: InstanceStatusPending is deprecated and will be removed after 14th November 2025. Use [loadbalancer.LOADBALANCERSTATUS_PENDING] instead. - InstanceStatusPending = "STATUS_PENDING" - // Deprecated: InstanceStatusReady is deprecated and will be removed after 14th November 2025. Use [loadbalancer.LOADBALANCERSTATUS_READY] instead. - InstanceStatusReady = "STATUS_READY" - // Deprecated: InstanceStatusError is deprecated and will be removed after 14th November 2025. Use [loadbalancer.LOADBALANCERSTATUS_ERROR] instead. - InstanceStatusError = "STATUS_ERROR" - // Deprecated: InstanceStatusTerminating is deprecated and will be removed after 12th November 2025. Use [loadbalancer.LOADBALANCERSTATUS_TERMINATING] instead. - InstanceStatusTerminating = "STATUS_TERMINATING" -) - -var _ APIClientInterface = &loadbalancer.APIClient{} - -// Interface 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 { - GetLoadBalancerExecute(ctx context.Context, projectId, region, name string) (*loadbalancer.LoadBalancer, error) -} - -// CreateLoadBalancerWaitHandler will wait for load balancer creation -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateLoadBalancerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, instanceName string) *wait.AsyncActionHandler[loadbalancer.LoadBalancer] { - handler := wait.New(func() (waitFinished bool, response *loadbalancer.LoadBalancer, err error) { - s, err := a.GetLoadBalancerExecute(ctx, projectId, region, instanceName) - if err != nil { - return false, nil, err - } - if s == nil || s.Name == nil || *s.Name != instanceName || s.Status == nil { - return false, nil, nil - } - - var errors []string - if s.Errors != nil && len(*s.Errors) > 0 { - for _, err := range *s.Errors { - errors = append(errors, fmt.Sprintf("%s: %s", *err.Type, *err.Description)) - } - return true, s, fmt.Errorf("create failed for instance with name %s, got status %s and errors: %s", instanceName, *s.Status, strings.Join(errors, ";")) - } - - switch *s.Status { - case loadbalancer.LOADBALANCERSTATUS_READY: - return true, s, nil - case loadbalancer.LOADBALANCERSTATUS_UNSPECIFIED: - return false, nil, nil - case loadbalancer.LOADBALANCERSTATUS_PENDING: - return false, nil, nil - case loadbalancer.LOADBALANCERSTATUS_TERMINATING: - return true, s, fmt.Errorf("create failed for instance with name %s, got status %s", instanceName, InstanceStatusTerminating) - case loadbalancer.LOADBALANCERSTATUS_ERROR: - return true, s, fmt.Errorf("create failed for instance with name %s, got status %s", instanceName, InstanceStatusError) - default: - return true, s, fmt.Errorf("instance with name %s has unexpected status %s", instanceName, *s.Status) - } - }) - handler.SetTimeout(45 * time.Minute) - return handler -} - -// DeleteLoadBalancerWaitHandler will wait for load balancer deletion -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteLoadBalancerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, instanceId string) *wait.AsyncActionHandler[struct{}] { - handler := wait.New(func() (waitFinished bool, response *struct{}, err error) { - _, err = a.GetLoadBalancerExecute(ctx, projectId, region, instanceId) - 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, nil, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError") - } - if oapiErr.StatusCode != http.StatusNotFound { - return false, nil, err - } - return true, nil, nil - }) - handler.SetTimeout(15 * time.Minute) - return handler -} diff --git a/services/loadbalancer/wait/wait_test.go b/services/loadbalancer/wait/wait_test.go deleted file mode 100644 index 3f328a88ef..0000000000 --- a/services/loadbalancer/wait/wait_test.go +++ /dev/null @@ -1,168 +0,0 @@ -package wait - -import ( - "context" - "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/loadbalancer" -) - -// Used for testing instance operations -type apiClientMocked struct { - instanceName string - instanceStatus loadbalancer.LoadBalancerStatus - instanceIsDeleted bool - instanceGetFails bool -} - -const testRegion = "eu01" - -func (a *apiClientMocked) GetLoadBalancerExecute(_ context.Context, _, _, _ string) (*loadbalancer.LoadBalancer, error) { - if a.instanceGetFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 500, - } - } - - if a.instanceIsDeleted { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: 404, - } - } - - return &loadbalancer.LoadBalancer{ - Name: &a.instanceName, - Status: &a.instanceStatus, - }, nil -} - -func TestCreateInstanceWaitHandler(t *testing.T) { - tests := []struct { - desc string - instanceGetFails bool - instanceStatus loadbalancer.LoadBalancerStatus - wantErr bool - wantResp bool - }{ - { - desc: "create_succeeded", - instanceGetFails: false, - instanceStatus: loadbalancer.LOADBALANCERSTATUS_READY, - wantErr: false, - wantResp: true, - }, - { - desc: "create_failed", - instanceGetFails: false, - instanceStatus: loadbalancer.LOADBALANCERSTATUS_ERROR, - wantErr: true, - wantResp: true, - }, - { - desc: "create_failed_2", - instanceGetFails: false, - instanceStatus: loadbalancer.LOADBALANCERSTATUS_TERMINATING, - wantErr: true, - wantResp: true, - }, - { - desc: "instance_get_fails", - instanceGetFails: true, - wantErr: true, - wantResp: false, - }, - { - desc: "timeout", - instanceGetFails: false, - instanceStatus: loadbalancer.LOADBALANCERSTATUS_PENDING, - wantErr: true, - wantResp: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - instanceName := "foo-bar" - - apiClient := &apiClientMocked{ - instanceName: instanceName, - instanceStatus: tt.instanceStatus, - instanceGetFails: tt.instanceGetFails, - } - - var wantRes *loadbalancer.LoadBalancer - if tt.wantResp { - wantRes = &loadbalancer.LoadBalancer{ - Name: &instanceName, - Status: utils.Ptr(tt.instanceStatus), - } - } - - handler := CreateLoadBalancerWaitHandler(context.Background(), apiClient, "", testRegion, instanceName) - - 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 TestDeleteInstanceWaitHandler(t *testing.T) { - tests := []struct { - desc string - instanceGetFails bool - instanceIsDeleted bool - wantErr bool - }{ - { - desc: "delete_succeeded", - instanceGetFails: false, - instanceIsDeleted: true, - wantErr: false, - }, - { - desc: "delete_failed", - instanceGetFails: false, - instanceIsDeleted: false, - wantErr: true, - }, - { - desc: "get_fails", - instanceGetFails: true, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - instanceName := "foo-bar" - - apiClient := &apiClientMocked{ - instanceGetFails: tt.instanceGetFails, - instanceName: instanceName, - instanceIsDeleted: tt.instanceIsDeleted, - } - - handler := DeleteLoadBalancerWaitHandler(context.Background(), apiClient, "", testRegion, instanceName) - - _, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - }) - }) - } -}