From 61fc54b80472b0fe48df73b6e1c44571bde56b1d Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 5 Mar 2026 10:52:54 +0000 Subject: [PATCH] Generate loadbalancer --- services/loadbalancer/api_default.go | 173 +- services/loadbalancer/client.go | 7 + services/loadbalancer/configuration.go | 2 + services/loadbalancer/go.mod | 2 +- services/loadbalancer/go.sum | 4 +- .../loadbalancer/model_active_health_check.go | 87 + .../model_create_credentials_payload.go | 43 + .../model_create_credentials_response.go | 24 + .../model_create_load_balancer_payload.go | 208 +- ...er_payload_load_balancer_security_group.go | 33 + ..._balancer_payload_target_security_group.go | 33 + .../model_credentials_response.go | 53 + .../model_get_credentials_response.go | 24 + .../loadbalancer/model_get_quota_response.go | 77 + .../loadbalancer/model_google_protobuf_any.go | 24 + .../loadbalancer/model_http_health_checks.go | 45 + .../model_list_credentials_response.go | 24 + .../model_list_load_balancers_response.go | 34 + .../loadbalancer/model_list_plans_response.go | 24 + services/loadbalancer/model_listener.go | 125 +- services/loadbalancer/model_load_balancer.go | 208 +- .../loadbalancer/model_load_balancer_error.go | 76 +- .../model_load_balancer_options.go | 57 + ...odel_loadbalancer_option_access_control.go | 24 + .../model_loadbalancer_option_logs.go | 33 + .../model_loadbalancer_option_metrics.go | 33 + ...model_loadbalancer_option_observability.go | 35 + services/loadbalancer/model_network.go | 58 +- services/loadbalancer/model_options_tcp.go | 23 + services/loadbalancer/model_options_udp.go | 23 + services/loadbalancer/model_plan_details.go | 74 + services/loadbalancer/model_security_group.go | 33 + .../model_server_name_indicator.go | 23 + .../loadbalancer/model_session_persistence.go | 24 + services/loadbalancer/model_status.go | 45 + services/loadbalancer/model_target.go | 33 + services/loadbalancer/model_target_pool.go | 67 + services/loadbalancer/model_tls_config.go | 45 + .../model_update_credentials_payload.go | 43 + .../model_update_credentials_response.go | 24 + .../model_update_load_balancer_payload.go | 208 +- .../model_update_target_pool_payload.go | 67 + services/loadbalancer/oas_commit | 2 +- services/loadbalancer/utils.go | 81 + services/loadbalancer/v1api/api_default.go | 2644 +++++++++++++++++ .../loadbalancer/v1api/api_default_mock.go | 353 +++ services/loadbalancer/v1api/client.go | 658 ++++ services/loadbalancer/v1api/configuration.go | 40 + .../v1api/model_active_health_check.go | 273 ++ .../v1api/model_create_credentials_payload.go | 199 ++ .../model_create_credentials_response.go | 124 + .../model_create_load_balancer_payload.go | 493 +++ .../v1api/model_credentials_response.go | 199 ++ .../v1api/model_get_credentials_response.go | 124 + .../v1api/model_get_quota_response.go | 162 + .../model_get_service_status_response.go | 125 + .../v1api/model_google_protobuf_any.go | 154 + .../v1api/model_list_credentials_response.go | 124 + .../model_list_load_balancers_response.go | 161 + .../v1api/model_list_plans_response.go | 124 + services/loadbalancer/v1api/model_listener.go | 381 +++ .../loadbalancer/v1api/model_load_balancer.go | 493 +++ .../v1api/model_load_balancer_error.go | 162 + .../v1api/model_load_balancer_options.go | 233 ++ ...odel_loadbalancer_option_access_control.go | 125 + .../v1api/model_loadbalancer_option_logs.go | 162 + .../model_loadbalancer_option_metrics.go | 162 + ...model_loadbalancer_option_observability.go | 160 + services/loadbalancer/v1api/model_network.go | 162 + .../loadbalancer/v1api/model_options_tcp.go | 125 + .../loadbalancer/v1api/model_options_udp.go | 125 + .../loadbalancer/v1api/model_plan_details.go | 273 ++ .../v1api/model_server_name_indicator.go | 125 + .../v1api/model_session_persistence.go | 125 + services/loadbalancer/v1api/model_status.go | 199 ++ services/loadbalancer/v1api/model_target.go | 162 + .../loadbalancer/v1api/model_target_pool.go | 271 ++ .../v1api/model_update_credentials_payload.go | 199 ++ .../model_update_credentials_response.go | 124 + .../model_update_load_balancer_payload.go | 493 +++ .../v1api/model_update_target_pool_payload.go | 271 ++ services/loadbalancer/v1api/response.go | 47 + services/loadbalancer/v1api/utils.go | 361 +++ services/loadbalancer/v2api/api_default.go | 2217 ++++++++++++++ .../loadbalancer/v2api/api_default_mock.go | 303 ++ services/loadbalancer/v2api/client.go | 658 ++++ services/loadbalancer/v2api/configuration.go | 37 + .../v2api/model_active_health_check.go | 346 +++ .../v2api/model_create_credentials_payload.go | 199 ++ .../model_create_credentials_response.go | 124 + .../model_create_load_balancer_payload.go | 678 +++++ .../v2api/model_credentials_response.go | 236 ++ .../v2api/model_get_credentials_response.go | 124 + .../v2api/model_get_quota_response.go | 310 ++ .../v2api/model_google_protobuf_any.go | 154 + .../v2api/model_http_health_checks.go | 198 ++ .../v2api/model_list_credentials_response.go | 124 + .../model_list_load_balancers_response.go | 161 + .../v2api/model_list_plans_response.go | 124 + services/loadbalancer/v2api/model_listener.go | 381 +++ .../loadbalancer/v2api/model_load_balancer.go | 678 +++++ .../v2api/model_load_balancer_error.go | 162 + .../v2api/model_load_balancer_options.go | 233 ++ ...odel_loadbalancer_option_access_control.go | 125 + .../v2api/model_loadbalancer_option_logs.go | 162 + .../model_loadbalancer_option_metrics.go | 162 + ...model_loadbalancer_option_observability.go | 160 + services/loadbalancer/v2api/model_network.go | 162 + .../loadbalancer/v2api/model_options_tcp.go | 125 + .../loadbalancer/v2api/model_options_udp.go | 125 + .../loadbalancer/v2api/model_plan_details.go | 310 ++ .../v2api/model_security_group.go | 162 + .../v2api/model_server_name_indicator.go | 125 + .../v2api/model_session_persistence.go | 125 + services/loadbalancer/v2api/model_status.go | 199 ++ services/loadbalancer/v2api/model_target.go | 162 + .../loadbalancer/v2api/model_target_pool.go | 271 ++ .../loadbalancer/v2api/model_tls_config.go | 199 ++ .../v2api/model_update_credentials_payload.go | 199 ++ .../model_update_credentials_response.go | 124 + .../model_update_load_balancer_payload.go | 678 +++++ .../v2api/model_update_target_pool_payload.go | 271 ++ services/loadbalancer/v2api/response.go | 47 + services/loadbalancer/v2api/utils.go | 361 +++ services/loadbalancer/wait/deprecation.go | 2 + 125 files changed, 24921 insertions(+), 64 deletions(-) create mode 100644 services/loadbalancer/v1api/api_default.go create mode 100644 services/loadbalancer/v1api/api_default_mock.go create mode 100644 services/loadbalancer/v1api/client.go create mode 100644 services/loadbalancer/v1api/configuration.go create mode 100644 services/loadbalancer/v1api/model_active_health_check.go create mode 100644 services/loadbalancer/v1api/model_create_credentials_payload.go create mode 100644 services/loadbalancer/v1api/model_create_credentials_response.go create mode 100644 services/loadbalancer/v1api/model_create_load_balancer_payload.go create mode 100644 services/loadbalancer/v1api/model_credentials_response.go create mode 100644 services/loadbalancer/v1api/model_get_credentials_response.go create mode 100644 services/loadbalancer/v1api/model_get_quota_response.go create mode 100644 services/loadbalancer/v1api/model_get_service_status_response.go create mode 100644 services/loadbalancer/v1api/model_google_protobuf_any.go create mode 100644 services/loadbalancer/v1api/model_list_credentials_response.go create mode 100644 services/loadbalancer/v1api/model_list_load_balancers_response.go create mode 100644 services/loadbalancer/v1api/model_list_plans_response.go create mode 100644 services/loadbalancer/v1api/model_listener.go create mode 100644 services/loadbalancer/v1api/model_load_balancer.go create mode 100644 services/loadbalancer/v1api/model_load_balancer_error.go create mode 100644 services/loadbalancer/v1api/model_load_balancer_options.go create mode 100644 services/loadbalancer/v1api/model_loadbalancer_option_access_control.go create mode 100644 services/loadbalancer/v1api/model_loadbalancer_option_logs.go create mode 100644 services/loadbalancer/v1api/model_loadbalancer_option_metrics.go create mode 100644 services/loadbalancer/v1api/model_loadbalancer_option_observability.go create mode 100644 services/loadbalancer/v1api/model_network.go create mode 100644 services/loadbalancer/v1api/model_options_tcp.go create mode 100644 services/loadbalancer/v1api/model_options_udp.go create mode 100644 services/loadbalancer/v1api/model_plan_details.go create mode 100644 services/loadbalancer/v1api/model_server_name_indicator.go create mode 100644 services/loadbalancer/v1api/model_session_persistence.go create mode 100644 services/loadbalancer/v1api/model_status.go create mode 100644 services/loadbalancer/v1api/model_target.go create mode 100644 services/loadbalancer/v1api/model_target_pool.go create mode 100644 services/loadbalancer/v1api/model_update_credentials_payload.go create mode 100644 services/loadbalancer/v1api/model_update_credentials_response.go create mode 100644 services/loadbalancer/v1api/model_update_load_balancer_payload.go create mode 100644 services/loadbalancer/v1api/model_update_target_pool_payload.go create mode 100644 services/loadbalancer/v1api/response.go create mode 100644 services/loadbalancer/v1api/utils.go create mode 100644 services/loadbalancer/v2api/api_default.go create mode 100644 services/loadbalancer/v2api/api_default_mock.go create mode 100644 services/loadbalancer/v2api/client.go create mode 100644 services/loadbalancer/v2api/configuration.go create mode 100644 services/loadbalancer/v2api/model_active_health_check.go create mode 100644 services/loadbalancer/v2api/model_create_credentials_payload.go create mode 100644 services/loadbalancer/v2api/model_create_credentials_response.go create mode 100644 services/loadbalancer/v2api/model_create_load_balancer_payload.go create mode 100644 services/loadbalancer/v2api/model_credentials_response.go create mode 100644 services/loadbalancer/v2api/model_get_credentials_response.go create mode 100644 services/loadbalancer/v2api/model_get_quota_response.go create mode 100644 services/loadbalancer/v2api/model_google_protobuf_any.go create mode 100644 services/loadbalancer/v2api/model_http_health_checks.go create mode 100644 services/loadbalancer/v2api/model_list_credentials_response.go create mode 100644 services/loadbalancer/v2api/model_list_load_balancers_response.go create mode 100644 services/loadbalancer/v2api/model_list_plans_response.go create mode 100644 services/loadbalancer/v2api/model_listener.go create mode 100644 services/loadbalancer/v2api/model_load_balancer.go create mode 100644 services/loadbalancer/v2api/model_load_balancer_error.go create mode 100644 services/loadbalancer/v2api/model_load_balancer_options.go create mode 100644 services/loadbalancer/v2api/model_loadbalancer_option_access_control.go create mode 100644 services/loadbalancer/v2api/model_loadbalancer_option_logs.go create mode 100644 services/loadbalancer/v2api/model_loadbalancer_option_metrics.go create mode 100644 services/loadbalancer/v2api/model_loadbalancer_option_observability.go create mode 100644 services/loadbalancer/v2api/model_network.go create mode 100644 services/loadbalancer/v2api/model_options_tcp.go create mode 100644 services/loadbalancer/v2api/model_options_udp.go create mode 100644 services/loadbalancer/v2api/model_plan_details.go create mode 100644 services/loadbalancer/v2api/model_security_group.go create mode 100644 services/loadbalancer/v2api/model_server_name_indicator.go create mode 100644 services/loadbalancer/v2api/model_session_persistence.go create mode 100644 services/loadbalancer/v2api/model_status.go create mode 100644 services/loadbalancer/v2api/model_target.go create mode 100644 services/loadbalancer/v2api/model_target_pool.go create mode 100644 services/loadbalancer/v2api/model_tls_config.go create mode 100644 services/loadbalancer/v2api/model_update_credentials_payload.go create mode 100644 services/loadbalancer/v2api/model_update_credentials_response.go create mode 100644 services/loadbalancer/v2api/model_update_load_balancer_payload.go create mode 100644 services/loadbalancer/v2api/model_update_target_pool_payload.go create mode 100644 services/loadbalancer/v2api/response.go create mode 100644 services/loadbalancer/v2api/utils.go create mode 100644 services/loadbalancer/wait/deprecation.go diff --git a/services/loadbalancer/api_default.go b/services/loadbalancer/api_default.go index edb833b19..b8db62a30 100644 --- a/services/loadbalancer/api_default.go +++ b/services/loadbalancer/api_default.go @@ -8,6 +8,7 @@ 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 ( @@ -23,6 +24,7 @@ import ( "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 @@ -34,6 +36,8 @@ type DefaultApi interface { @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 /* @@ -44,6 +48,7 @@ type DefaultApi interface { @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) /* @@ -55,6 +60,8 @@ type DefaultApi interface { @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 /* @@ -65,6 +72,7 @@ type DefaultApi interface { @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) /* @@ -76,6 +84,8 @@ type DefaultApi interface { @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 /* @@ -87,6 +97,7 @@ type DefaultApi interface { @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) /* @@ -98,6 +109,8 @@ type DefaultApi interface { @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 /* @@ -109,6 +122,7 @@ type DefaultApi interface { @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) /* @@ -120,6 +134,8 @@ type DefaultApi interface { @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 /* @@ -131,6 +147,7 @@ type DefaultApi interface { @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) /* @@ -144,6 +161,8 @@ type DefaultApi interface { @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 /* @@ -155,6 +174,7 @@ type DefaultApi interface { @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) /* @@ -166,6 +186,8 @@ type DefaultApi interface { @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 /* @@ -176,6 +198,7 @@ type DefaultApi interface { @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) /* @@ -186,6 +209,8 @@ type DefaultApi interface { @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 /* @@ -196,6 +221,7 @@ type DefaultApi interface { @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) /* @@ -208,6 +234,8 @@ type DefaultApi interface { @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 /* @@ -218,6 +246,7 @@ type DefaultApi interface { @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) /* @@ -227,6 +256,8 @@ type DefaultApi interface { @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 /* @@ -236,6 +267,7 @@ type DefaultApi interface { @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) /* @@ -247,6 +279,8 @@ type DefaultApi interface { @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 /* @@ -258,6 +292,7 @@ type DefaultApi interface { @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) /* @@ -271,6 +306,8 @@ type DefaultApi interface { @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 /* @@ -282,6 +319,7 @@ type DefaultApi interface { @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) /* @@ -297,6 +335,8 @@ type DefaultApi interface { @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 /* @@ -309,76 +349,114 @@ type DefaultApi interface { @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 @@ -388,16 +466,19 @@ type CreateCredentialsRequest struct { 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 @@ -518,10 +599,7 @@ func (r CreateCredentialsRequest) Execute() (*CreateCredentialsResponse, error) /* 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. +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 @@ -537,6 +615,7 @@ func (a *APIClient) CreateCredentials(ctx context.Context, projectId string, reg } } +// 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, @@ -547,6 +626,7 @@ func (a *APIClient) CreateCredentialsExecute(ctx context.Context, projectId stri 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 @@ -556,16 +636,19 @@ type CreateLoadBalancerRequest struct { 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 @@ -686,9 +769,7 @@ func (r CreateLoadBalancerRequest) Execute() (*LoadBalancer, 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. +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 @@ -704,6 +785,7 @@ func (a *APIClient) CreateLoadBalancer(ctx context.Context, projectId string, re } } +// 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, @@ -714,6 +796,7 @@ func (a *APIClient) CreateLoadBalancerExecute(ctx context.Context, projectId str 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 @@ -722,6 +805,7 @@ type DeleteCredentialsRequest struct { 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 @@ -835,7 +919,7 @@ func (r DeleteCredentialsRequest) Execute() (map[string]interface{}, error) { /* DeleteCredentials: Delete a single credential in a project. -Delete Credential +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 @@ -853,6 +937,7 @@ func (a *APIClient) DeleteCredentials(ctx context.Context, projectId string, reg } } +// 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, @@ -864,6 +949,7 @@ func (a *APIClient) DeleteCredentialsExecute(ctx context.Context, projectId stri 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 @@ -872,6 +958,7 @@ type DeleteLoadBalancerRequest struct { 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 @@ -985,7 +1072,7 @@ func (r DeleteLoadBalancerRequest) Execute() (map[string]interface{}, error) { /* DeleteLoadBalancer: Delete a given load balancer in a project. -DeleteLoadBalancer will delete a given 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 @@ -1003,6 +1090,7 @@ func (a *APIClient) DeleteLoadBalancer(ctx context.Context, projectId string, re } } +// 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, @@ -1014,6 +1102,7 @@ func (a *APIClient) DeleteLoadBalancerExecute(ctx context.Context, projectId str 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 @@ -1022,6 +1111,7 @@ type GetCredentialsRequest struct { 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 @@ -1135,7 +1225,7 @@ func (r GetCredentialsRequest) Execute() (*GetCredentialsResponse, error) { /* GetCredentials: Get a single credential reference in a project. -Get Credentials +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 @@ -1153,6 +1243,7 @@ func (a *APIClient) GetCredentials(ctx context.Context, projectId string, region } } +// 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, @@ -1164,6 +1255,7 @@ func (a *APIClient) GetCredentialsExecute(ctx context.Context, projectId string, 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 @@ -1172,6 +1264,7 @@ type GetLoadBalancerRequest struct { 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 @@ -1285,10 +1378,7 @@ func (r GetLoadBalancerRequest) Execute() (*LoadBalancer, 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. +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 @@ -1306,6 +1396,7 @@ func (a *APIClient) GetLoadBalancer(ctx context.Context, projectId string, regio } } +// 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, @@ -1317,6 +1408,7 @@ func (a *APIClient) GetLoadBalancerExecute(ctx context.Context, projectId string 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 @@ -1324,6 +1416,7 @@ type GetQuotaRequest struct { 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 @@ -1436,9 +1529,7 @@ func (r GetQuotaRequest) Execute() (*GetQuotaResponse, error) { /* GetQuota: Get the quota of Load Balancers in a project. -Retrieves the configured Load Balancer quota for the project. Limit can be changed via service request. - - There can be 3 times as many observability credentials as Load Balancers. +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 @@ -1454,6 +1545,7 @@ func (a *APIClient) GetQuota(ctx context.Context, projectId string, region strin } } +// 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, @@ -1464,6 +1556,7 @@ func (a *APIClient) GetQuotaExecute(ctx context.Context, projectId string, regio 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 @@ -1471,6 +1564,7 @@ type ListCredentialsRequest struct { 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 @@ -1583,7 +1677,7 @@ func (r ListCredentialsRequest) Execute() (*ListCredentialsResponse, error) { /* ListCredentials: List all credentials in a project. -List Credentials +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 @@ -1599,6 +1693,7 @@ func (a *APIClient) ListCredentials(ctx context.Context, projectId string, regio } } +// 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, @@ -1609,6 +1704,7 @@ func (a *APIClient) ListCredentialsExecute(ctx context.Context, projectId string 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 @@ -1619,19 +1715,20 @@ type ListLoadBalancersRequest struct { } // 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 @@ -1750,10 +1847,7 @@ func (r ListLoadBalancersRequest) Execute() (*ListLoadBalancersResponse, 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. +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 @@ -1769,6 +1863,7 @@ func (a *APIClient) ListLoadBalancers(ctx context.Context, projectId string, reg } } +// 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, @@ -1779,12 +1874,14 @@ func (a *APIClient) ListLoadBalancersExecute(ctx context.Context, projectId stri 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 @@ -1896,7 +1993,7 @@ func (r ListPlansRequest) Execute() (*ListPlansResponse, error) { /* ListPlans: List available service plans. -ListPlans returns for the configured service plans for a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param region @@ -1910,6 +2007,7 @@ func (a *APIClient) ListPlans(ctx context.Context, region string) ApiListPlansRe } } +// 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, @@ -1919,6 +2017,7 @@ func (a *APIClient) ListPlansExecute(ctx context.Context, region string) (*ListP 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 @@ -1928,11 +2027,13 @@ type UpdateCredentialsRequest struct { 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 @@ -2051,7 +2152,7 @@ func (r UpdateCredentialsRequest) Execute() (*UpdateCredentialsResponse, error) /* UpdateCredentials: Update credentials for observability in a project. -Update Credentials +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 @@ -2069,6 +2170,7 @@ func (a *APIClient) UpdateCredentials(ctx context.Context, projectId string, reg } } +// 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, @@ -2080,6 +2182,7 @@ func (a *APIClient) UpdateCredentialsExecute(ctx context.Context, projectId stri 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 @@ -2089,11 +2192,13 @@ type UpdateLoadBalancerRequest struct { 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 @@ -2212,10 +2317,7 @@ func (r UpdateLoadBalancerRequest) Execute() (*LoadBalancer, 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. +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 @@ -2233,6 +2335,7 @@ func (a *APIClient) UpdateLoadBalancer(ctx context.Context, projectId string, re } } +// 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, @@ -2244,6 +2347,7 @@ func (a *APIClient) UpdateLoadBalancerExecute(ctx context.Context, projectId str 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 @@ -2254,11 +2358,13 @@ type UpdateTargetPoolRequest struct { 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 @@ -2378,11 +2484,7 @@ func (r UpdateTargetPoolRequest) Execute() (*TargetPool, 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. +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 @@ -2402,6 +2504,7 @@ func (a *APIClient) UpdateTargetPool(ctx context.Context, projectId string, regi } } +// 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, diff --git a/services/loadbalancer/client.go b/services/loadbalancer/client.go index 33808bd78..38ed4cc97 100644 --- a/services/loadbalancer/client.go +++ b/services/loadbalancer/client.go @@ -8,6 +8,7 @@ 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 ( @@ -44,18 +45,21 @@ var ( // 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() @@ -144,6 +148,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { 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) @@ -282,6 +287,7 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { // 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 } @@ -592,6 +598,7 @@ func parseCacheControl(headers http.Header) cacheControl { } // 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 diff --git a/services/loadbalancer/configuration.go b/services/loadbalancer/configuration.go index f178338fd..8c12f1822 100644 --- a/services/loadbalancer/configuration.go +++ b/services/loadbalancer/configuration.go @@ -8,6 +8,7 @@ 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 ( @@ -15,6 +16,7 @@ import ( ) // 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), diff --git a/services/loadbalancer/go.mod b/services/loadbalancer/go.mod index 9896ea8fb..15b719b4e 100644 --- a/services/loadbalancer/go.mod +++ b/services/loadbalancer/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/google/go-cmp v0.7.0 - github.com/stackitcloud/stackit-sdk-go/core v0.21.1 + github.com/stackitcloud/stackit-sdk-go/core v0.22.0 ) require ( diff --git a/services/loadbalancer/go.sum b/services/loadbalancer/go.sum index ca103c909..195011dd5 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.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= diff --git a/services/loadbalancer/model_active_health_check.go b/services/loadbalancer/model_active_health_check.go index 2031dd5d1..691371b93 100644 --- a/services/loadbalancer/model_active_health_check.go +++ b/services/loadbalancer/model_active_health_check.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ActiveHealthCheck{} */ // 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 @@ -33,6 +40,7 @@ func getActiveHealthCheckGetAltPortAttributeTypeOk(arg ActiveHealthCheckGetAltPo 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 } @@ -42,10 +50,16 @@ func setActiveHealthCheckGetAltPortAttributeType(arg *ActiveHealthCheckGetAltPor */ // 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 @@ -53,6 +67,7 @@ func getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(arg ActiveHealthChec 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 } @@ -62,10 +77,16 @@ func setActiveHealthCheckGetHealthyThresholdAttributeType(arg *ActiveHealthCheck */ // 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 @@ -73,6 +94,7 @@ func getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(arg ActiveHealthChec 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 } @@ -82,8 +104,10 @@ func setActiveHealthCheckGetHttpHealthChecksAttributeType(arg *ActiveHealthCheck */ // 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 @@ -91,11 +115,15 @@ func getActiveHealthCheckGetIntervalAttributeTypeOk(arg ActiveHealthCheckGetInte 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 /* @@ -103,8 +131,10 @@ type ActiveHealthCheckGetIntervalRetType = string */ // 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 @@ -112,11 +142,15 @@ func getActiveHealthCheckGetIntervalJitterAttributeTypeOk(arg ActiveHealthCheckG 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 /* @@ -124,8 +158,10 @@ type ActiveHealthCheckGetIntervalJitterRetType = string */ // 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 @@ -133,11 +169,15 @@ func getActiveHealthCheckGetTimeoutAttributeTypeOk(arg ActiveHealthCheckGetTimeo 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 /* @@ -145,10 +185,16 @@ type ActiveHealthCheckGetTimeoutRetType = string */ // 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 @@ -156,11 +202,13 @@ func getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(arg ActiveHealthCh 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. @@ -184,6 +232,7 @@ type ActiveHealthCheck struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -192,12 +241,14 @@ func NewActiveHealthCheck() *ActiveHealthCheck { // 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 @@ -205,22 +256,26 @@ func (o *ActiveHealthCheck) GetAltPort() (res ActiveHealthCheckGetAltPortRetType // 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 @@ -228,22 +283,26 @@ func (o *ActiveHealthCheck) GetHealthyThreshold() (res ActiveHealthCheckGetHealt // 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 @@ -251,22 +310,26 @@ func (o *ActiveHealthCheck) GetHttpHealthChecks() (res ActiveHealthCheckGetHttpH // 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 @@ -274,22 +337,26 @@ func (o *ActiveHealthCheck) GetInterval() (res ActiveHealthCheckGetIntervalRetTy // 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 @@ -297,22 +364,26 @@ func (o *ActiveHealthCheck) GetIntervalJitter() (res ActiveHealthCheckGetInterva // 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 @@ -320,22 +391,26 @@ func (o *ActiveHealthCheck) GetTimeout() (res ActiveHealthCheckGetTimeoutRetType // 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 @@ -343,21 +418,25 @@ func (o *ActiveHealthCheck) GetUnhealthyThreshold() (res ActiveHealthCheckGetUnh // 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 { @@ -384,37 +463,45 @@ func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { 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_create_credentials_payload.go b/services/loadbalancer/model_create_credentials_payload.go index 13184da8b..9667f98e7 100644 --- a/services/loadbalancer/model_create_credentials_payload.go +++ b/services/loadbalancer/model_create_credentials_payload.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateCredentialsPayload{} */ // 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 @@ -31,11 +34,15 @@ func getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg CreateCredenti 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 /* @@ -43,8 +50,10 @@ type CreateCredentialsPayloadGetDisplayNameRetType = string */ // 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 @@ -52,11 +61,15 @@ func getCreateCredentialsPayloadGetPasswordAttributeTypeOk(arg CreateCredentials 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 /* @@ -64,8 +77,10 @@ type CreateCredentialsPayloadGetPasswordRetType = string */ // 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 @@ -73,14 +88,19 @@ func getCreateCredentialsPayloadGetUsernameAttributeTypeOk(arg CreateCredentials 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"` @@ -94,6 +114,7 @@ type CreateCredentialsPayload struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -102,12 +123,14 @@ func NewCreateCredentialsPayload() *CreateCredentialsPayload { // 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 @@ -115,22 +138,26 @@ func (o *CreateCredentialsPayload) GetDisplayName() (res CreateCredentialsPayloa // 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 @@ -138,22 +165,26 @@ func (o *CreateCredentialsPayload) GetPassword() (res CreateCredentialsPayloadGe // 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 @@ -161,21 +192,25 @@ func (o *CreateCredentialsPayload) GetUsername() (res CreateCredentialsPayloadGe // 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 { @@ -190,37 +225,45 @@ func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) { 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_response.go b/services/loadbalancer/model_create_credentials_response.go index 4a6b70f97..63c7e2058 100644 --- a/services/loadbalancer/model_create_credentials_response.go +++ b/services/loadbalancer/model_create_credentials_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateCredentialsResponse{} */ // 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 @@ -33,11 +40,13 @@ func getCreateCredentialsResponseGetCredentialAttributeTypeOk(arg CreateCredenti 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"` } @@ -46,6 +55,7 @@ type CreateCredentialsResponse struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -54,12 +64,14 @@ func NewCreateCredentialsResponse() *CreateCredentialsResponse { // 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 @@ -67,21 +79,25 @@ func (o *CreateCredentialsResponse) GetCredential() (res CreateCredentialsRespon // 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 { @@ -90,37 +106,45 @@ func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { 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_load_balancer_payload.go b/services/loadbalancer/model_create_load_balancer_payload.go index cf0770fcc..ce87b86e2 100644 --- a/services/loadbalancer/model_create_load_balancer_payload.go +++ b/services/loadbalancer/model_create_load_balancer_payload.go @@ -8,6 +8,7 @@ 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 ( @@ -23,10 +24,16 @@ var _ MappedNullable = &CreateLoadBalancerPayload{} */ // 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 @@ -34,6 +41,7 @@ func getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttribut 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 } @@ -43,10 +51,16 @@ func setCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttribut */ // 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 @@ -54,6 +68,7 @@ func getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg CreateLoadBalancer 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 } @@ -63,8 +78,10 @@ func setCreateLoadBalancerPayloadGetErrorsAttributeType(arg *CreateLoadBalancerP */ // 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 @@ -72,11 +89,15 @@ func getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg CreateLoa 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 /* @@ -84,10 +105,16 @@ type CreateLoadBalancerPayloadGetExternalAddressRetType = string */ // 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 @@ -95,6 +122,7 @@ func getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(arg CreateLoadBalancer 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 } @@ -104,10 +132,16 @@ func setCreateLoadBalancerPayloadGetLabelsAttributeType(arg *CreateLoadBalancerP */ // 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 @@ -115,6 +149,7 @@ func getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(arg CreateLoadBalan 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 } @@ -124,10 +159,16 @@ func setCreateLoadBalancerPayloadGetListenersAttributeType(arg *CreateLoadBalanc */ // 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 @@ -135,6 +176,7 @@ func getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(arg 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 } @@ -144,8 +186,10 @@ func setCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(arg * */ // 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 @@ -153,11 +197,15 @@ func getCreateLoadBalancerPayloadGetNameAttributeTypeOk(arg CreateLoadBalancerPa 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 /* @@ -165,10 +213,16 @@ type CreateLoadBalancerPayloadGetNameRetType = string */ // 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 @@ -176,6 +230,7 @@ func getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg CreateLoadBalanc 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 } @@ -185,10 +240,16 @@ func setCreateLoadBalancerPayloadGetNetworksAttributeType(arg *CreateLoadBalance */ // 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 @@ -196,6 +257,7 @@ func getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg CreateLoadBalance 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 } @@ -205,8 +267,10 @@ func setCreateLoadBalancerPayloadGetOptionsAttributeType(arg *CreateLoadBalancer */ // 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 @@ -214,11 +278,15 @@ func getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg CreateLoadBalancer 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 /* @@ -226,8 +294,10 @@ type CreateLoadBalancerPayloadGetPlanIdRetType = string */ // 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 @@ -235,11 +305,15 @@ func getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg CreateLoad 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 /* @@ -247,8 +321,10 @@ type CreateLoadBalancerPayloadGetPrivateAddressRetType = string */ // 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 @@ -256,11 +332,15 @@ func getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(arg CreateLoadBalancer 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 /* @@ -271,18 +351,25 @@ type CreateLoadBalancerPayloadGetRegionRetType = string // 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" - CREATELOADBALANCERPAYLOADSTATUS_PENDING CreateLoadBalancerPayloadStatus = "STATUS_PENDING" - CREATELOADBALANCERPAYLOADSTATUS_READY CreateLoadBalancerPayloadStatus = "STATUS_READY" - 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_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", @@ -291,6 +378,7 @@ var AllowedCreateLoadBalancerPayloadStatusEnumValues = []CreateLoadBalancerPaylo "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 @@ -318,6 +406,7 @@ func (v *CreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { // 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() { @@ -328,6 +417,7 @@ func NewCreateLoadBalancerPayloadStatusFromValue(v CreateLoadBalancerPayloadStat } // 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 { @@ -338,50 +428,65 @@ func (v CreateLoadBalancerPayloadStatus) IsValid() bool { } // 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 @@ -389,6 +494,7 @@ func getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(arg CreateLoadBalancer 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 } @@ -398,10 +504,16 @@ func setCreateLoadBalancerPayloadGetStatusAttributeType(arg *CreateLoadBalancerP */ // 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 @@ -409,6 +521,7 @@ func getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg CreateLoadBal 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 } @@ -418,10 +531,16 @@ func setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *CreateLoadBala */ // 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 @@ -429,6 +548,7 @@ func getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(arg Creat 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 } @@ -438,8 +558,10 @@ func setCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(arg *Create */ // 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 @@ -447,14 +569,19 @@ func getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(arg CreateLoadBalance 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"` @@ -490,6 +617,7 @@ type CreateLoadBalancerPayload struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -498,12 +626,14 @@ func NewCreateLoadBalancerPayload() *CreateLoadBalancerPayload { // 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 @@ -511,22 +641,26 @@ func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() (r // 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 @@ -534,22 +668,26 @@ func (o *CreateLoadBalancerPayload) GetErrors() (res CreateLoadBalancerPayloadGe // 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 @@ -557,22 +695,26 @@ func (o *CreateLoadBalancerPayload) GetExternalAddress() (res CreateLoadBalancer // 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 @@ -580,22 +722,26 @@ func (o *CreateLoadBalancerPayload) GetLabels() (res CreateLoadBalancerPayloadGe // 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 @@ -603,22 +749,26 @@ func (o *CreateLoadBalancerPayload) GetListeners() (res CreateLoadBalancerPayloa // 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 @@ -626,22 +776,26 @@ func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroup() (res CreateLo // 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 @@ -649,22 +803,26 @@ func (o *CreateLoadBalancerPayload) GetName() (res CreateLoadBalancerPayloadGetN // 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 @@ -672,22 +830,26 @@ func (o *CreateLoadBalancerPayload) GetNetworks() (res CreateLoadBalancerPayload // 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 @@ -695,22 +857,26 @@ func (o *CreateLoadBalancerPayload) GetOptions() (res CreateLoadBalancerPayloadG // 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 @@ -718,22 +884,26 @@ func (o *CreateLoadBalancerPayload) GetPlanId() (res CreateLoadBalancerPayloadGe // 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 @@ -741,22 +911,26 @@ func (o *CreateLoadBalancerPayload) GetPrivateAddress() (res CreateLoadBalancerP // 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 @@ -764,22 +938,26 @@ func (o *CreateLoadBalancerPayload) GetRegion() (res CreateLoadBalancerPayloadGe // 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 @@ -787,22 +965,26 @@ func (o *CreateLoadBalancerPayload) GetStatus() (res CreateLoadBalancerPayloadGe // 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 @@ -810,22 +992,26 @@ func (o *CreateLoadBalancerPayload) GetTargetPools() (res CreateLoadBalancerPayl // 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 @@ -833,22 +1019,26 @@ func (o *CreateLoadBalancerPayload) GetTargetSecurityGroup() (res CreateLoadBala // 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 @@ -856,21 +1046,25 @@ func (o *CreateLoadBalancerPayload) GetVersion() (res CreateLoadBalancerPayloadG // 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 { @@ -924,37 +1118,45 @@ func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { 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 index ff39053a1..806af962e 100644 --- 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 @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateLoadBalancerPayloadLoadBalancerSecurityGroup{} */ // 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 @@ -31,11 +34,15 @@ func getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeTypeOk(a 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 /* @@ -43,8 +50,10 @@ type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType = string */ // 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 @@ -52,14 +61,19 @@ func getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeTypeOk 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"` @@ -71,6 +85,7 @@ type CreateLoadBalancerPayloadLoadBalancerSecurityGroup struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -79,12 +94,14 @@ func NewCreateLoadBalancerPayloadLoadBalancerSecurityGroup() *CreateLoadBalancer // 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 @@ -92,22 +109,26 @@ func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetId() (res Create // 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 @@ -115,21 +136,25 @@ func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetName() (res Crea // 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 { @@ -141,37 +166,45 @@ func (o CreateLoadBalancerPayloadLoadBalancerSecurityGroup) ToMap() (map[string] 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_target_security_group.go b/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go index 43c8bd6fc..35622fc49 100644 --- a/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go +++ b/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateLoadBalancerPayloadTargetSecurityGroup{} */ // 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 @@ -31,11 +34,15 @@ func getCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeTypeOk(arg Cre 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 /* @@ -43,8 +50,10 @@ type CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType = string */ // 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 @@ -52,14 +61,19 @@ func getCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeTypeOk(arg C 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"` @@ -71,6 +85,7 @@ type CreateLoadBalancerPayloadTargetSecurityGroup struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -79,12 +94,14 @@ func NewCreateLoadBalancerPayloadTargetSecurityGroup() *CreateLoadBalancerPayloa // 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 @@ -92,22 +109,26 @@ func (o *CreateLoadBalancerPayloadTargetSecurityGroup) GetId() (res CreateLoadBa // 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 @@ -115,21 +136,25 @@ func (o *CreateLoadBalancerPayloadTargetSecurityGroup) GetName() (res CreateLoad // 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 { @@ -141,37 +166,45 @@ func (o CreateLoadBalancerPayloadTargetSecurityGroup) ToMap() (map[string]interf 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_credentials_response.go b/services/loadbalancer/model_credentials_response.go index 8bcd3270b..d3dc59729 100644 --- a/services/loadbalancer/model_credentials_response.go +++ b/services/loadbalancer/model_credentials_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CredentialsResponse{} */ // 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 @@ -31,11 +34,15 @@ func getCredentialsResponseGetCredentialsRefAttributeTypeOk(arg CredentialsRespo 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 /* @@ -43,8 +50,10 @@ type CredentialsResponseGetCredentialsRefRetType = string */ // 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 @@ -52,11 +61,15 @@ func getCredentialsResponseGetDisplayNameAttributeTypeOk(arg CredentialsResponse 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 /* @@ -64,8 +77,10 @@ type CredentialsResponseGetDisplayNameRetType = string */ // 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 @@ -73,11 +88,15 @@ func getCredentialsResponseGetRegionAttributeTypeOk(arg CredentialsResponseGetRe 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 /* @@ -85,8 +104,10 @@ type CredentialsResponseGetRegionRetType = string */ // 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 @@ -94,14 +115,19 @@ func getCredentialsResponseGetUsernameAttributeTypeOk(arg CredentialsResponseGet 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"` @@ -117,6 +143,7 @@ type CredentialsResponse struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -125,12 +152,14 @@ func NewCredentialsResponse() *CredentialsResponse { // 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 @@ -138,22 +167,26 @@ func (o *CredentialsResponse) GetCredentialsRef() (res CredentialsResponseGetCre // 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 @@ -161,22 +194,26 @@ func (o *CredentialsResponse) GetDisplayName() (res CredentialsResponseGetDispla // 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 @@ -184,22 +221,26 @@ func (o *CredentialsResponse) GetRegion() (res CredentialsResponseGetRegionRetTy // 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 @@ -207,21 +248,25 @@ func (o *CredentialsResponse) GetUsername() (res CredentialsResponseGetUsernameR // 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 { @@ -239,37 +284,45 @@ func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { 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_get_credentials_response.go b/services/loadbalancer/model_get_credentials_response.go index 99d7ad93e..a932460e1 100644 --- a/services/loadbalancer/model_get_credentials_response.go +++ b/services/loadbalancer/model_get_credentials_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &GetCredentialsResponse{} */ // 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 @@ -33,11 +40,13 @@ func getGetCredentialsResponseGetCredentialAttributeTypeOk(arg GetCredentialsRes 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"` } @@ -46,6 +55,7 @@ type GetCredentialsResponse struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -54,12 +64,14 @@ func NewGetCredentialsResponse() *GetCredentialsResponse { // 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 @@ -67,21 +79,25 @@ func (o *GetCredentialsResponse) GetCredential() (res GetCredentialsResponseGetC // 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 { @@ -90,37 +106,45 @@ func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { 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_quota_response.go b/services/loadbalancer/model_get_quota_response.go index e0c1d6ca8..3c2f1cf93 100644 --- a/services/loadbalancer/model_get_quota_response.go +++ b/services/loadbalancer/model_get_quota_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &GetQuotaResponse{} */ // 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 @@ -33,6 +40,7 @@ func getGetQuotaResponseGetMaxCredentialsAttributeTypeOk(arg GetQuotaResponseGet 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 } @@ -42,10 +50,16 @@ func setGetQuotaResponseGetMaxCredentialsAttributeType(arg *GetQuotaResponseGetM */ // 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 @@ -53,6 +67,7 @@ func getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(arg GetQuotaResponseG 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 } @@ -62,8 +77,10 @@ func setGetQuotaResponseGetMaxLoadBalancersAttributeType(arg *GetQuotaResponseGe */ // 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 @@ -71,11 +88,15 @@ func getGetQuotaResponseGetProjectIdAttributeTypeOk(arg GetQuotaResponseGetProje 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 /* @@ -83,8 +104,10 @@ type GetQuotaResponseGetProjectIdRetType = string */ // 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 @@ -92,11 +115,15 @@ func getGetQuotaResponseGetRegionAttributeTypeOk(arg GetQuotaResponseGetRegionAt 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 /* @@ -104,10 +131,16 @@ type GetQuotaResponseGetRegionRetType = string */ // 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 @@ -115,6 +148,7 @@ func getGetQuotaResponseGetUsedCredentialsAttributeTypeOk(arg GetQuotaResponseGe 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 } @@ -124,10 +158,16 @@ func setGetQuotaResponseGetUsedCredentialsAttributeType(arg *GetQuotaResponseGet */ // 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 @@ -135,11 +175,13 @@ func getGetQuotaResponseGetUsedLoadBalancersAttributeTypeOk(arg GetQuotaResponse 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. @@ -163,6 +205,7 @@ type GetQuotaResponse struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -171,12 +214,14 @@ func NewGetQuotaResponse() *GetQuotaResponse { // 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 @@ -184,22 +229,26 @@ func (o *GetQuotaResponse) GetMaxCredentials() (res GetQuotaResponseGetMaxCreden // 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 @@ -207,22 +256,26 @@ func (o *GetQuotaResponse) GetMaxLoadBalancers() (res GetQuotaResponseGetMaxLoad // 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 @@ -230,22 +283,26 @@ func (o *GetQuotaResponse) GetProjectId() (res GetQuotaResponseGetProjectIdRetTy // 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 @@ -253,22 +310,26 @@ func (o *GetQuotaResponse) GetRegion() (res GetQuotaResponseGetRegionRetType) { // 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 @@ -276,22 +337,26 @@ func (o *GetQuotaResponse) GetUsedCredentials() (res GetQuotaResponseGetUsedCred // 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 @@ -299,21 +364,25 @@ func (o *GetQuotaResponse) GetUsedLoadBalancers() (res GetQuotaResponseGetUsedLo // 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 { @@ -337,37 +406,45 @@ func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { 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_google_protobuf_any.go b/services/loadbalancer/model_google_protobuf_any.go index 985a1fdce..11fb6a77a 100644 --- a/services/loadbalancer/model_google_protobuf_any.go +++ b/services/loadbalancer/model_google_protobuf_any.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &GoogleProtobufAny{} */ // 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 @@ -31,26 +34,33 @@ func getGoogleProtobufAnyGetTypeAttributeTypeOk(arg GoogleProtobufAnyGetTypeAttr 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 @@ -59,12 +69,14 @@ func NewGoogleProtobufAny() *GoogleProtobufAny { // 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 @@ -72,21 +84,25 @@ func (o *GoogleProtobufAny) GetType() (res GoogleProtobufAnyGetTypeRetType) { // 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 { @@ -100,37 +116,45 @@ func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { 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_http_health_checks.go b/services/loadbalancer/model_http_health_checks.go index 0ad129e4f..ca297e25d 100644 --- a/services/loadbalancer/model_http_health_checks.go +++ b/services/loadbalancer/model_http_health_checks.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &HttpHealthChecks{} */ // 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 @@ -33,6 +40,7 @@ func getHttpHealthChecksGetOkStatusesAttributeTypeOk(arg HttpHealthChecksGetOkSt 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 } @@ -42,8 +50,10 @@ func setHttpHealthChecksGetOkStatusesAttributeType(arg *HttpHealthChecksGetOkSta */ // 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 @@ -51,11 +61,15 @@ func getHttpHealthChecksGetPathAttributeTypeOk(arg HttpHealthChecksGetPathAttrib 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 /* @@ -63,10 +77,16 @@ type HttpHealthChecksGetPathRetType = string */ // 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 @@ -74,11 +94,13 @@ func getHttpHealthChecksGetTlsAttributeTypeOk(arg HttpHealthChecksGetTlsAttribut 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"` @@ -91,6 +113,7 @@ type HttpHealthChecks struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -99,12 +122,14 @@ func NewHttpHealthChecks() *HttpHealthChecks { // 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 @@ -112,22 +137,26 @@ func (o *HttpHealthChecks) GetOkStatuses() (res HttpHealthChecksGetOkStatusesRet // 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 @@ -135,22 +164,26 @@ func (o *HttpHealthChecks) GetPath() (res HttpHealthChecksGetPathRetType) { // 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 @@ -158,21 +191,25 @@ func (o *HttpHealthChecks) GetTls() (res HttpHealthChecksGetTlsRetType) { // 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 { @@ -187,37 +224,45 @@ func (o HttpHealthChecks) ToMap() (map[string]interface{}, error) { 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_list_credentials_response.go b/services/loadbalancer/model_list_credentials_response.go index 86dc74157..cf3f514e6 100644 --- a/services/loadbalancer/model_list_credentials_response.go +++ b/services/loadbalancer/model_list_credentials_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListCredentialsResponse{} */ // 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 @@ -33,11 +40,13 @@ func getListCredentialsResponseGetCredentialsAttributeTypeOk(arg ListCredentials 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"` } @@ -46,6 +55,7 @@ type ListCredentialsResponse struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -54,12 +64,14 @@ func NewListCredentialsResponse() *ListCredentialsResponse { // 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 @@ -67,21 +79,25 @@ func (o *ListCredentialsResponse) GetCredentials() (res ListCredentialsResponseG // 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 { @@ -90,37 +106,45 @@ func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { 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_load_balancers_response.go b/services/loadbalancer/model_list_load_balancers_response.go index 4e7a557ce..d74609937 100644 --- a/services/loadbalancer/model_list_load_balancers_response.go +++ b/services/loadbalancer/model_list_load_balancers_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListLoadBalancersResponse{} */ // 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 @@ -33,6 +40,7 @@ func getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(arg ListLoadBal 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 } @@ -42,8 +50,10 @@ func setListLoadBalancersResponseGetLoadBalancersAttributeType(arg *ListLoadBala */ // 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 @@ -51,14 +61,19 @@ func getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(arg ListLoadBalanc 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 @@ -69,6 +84,7 @@ type ListLoadBalancersResponse struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -77,12 +93,14 @@ func NewListLoadBalancersResponse() *ListLoadBalancersResponse { // 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 @@ -90,22 +108,26 @@ func (o *ListLoadBalancersResponse) GetLoadBalancers() (res ListLoadBalancersRes // 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 @@ -113,21 +135,25 @@ func (o *ListLoadBalancersResponse) GetNextPageId() (res ListLoadBalancersRespon // 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 { @@ -139,37 +165,45 @@ func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) { 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_plans_response.go b/services/loadbalancer/model_list_plans_response.go index a7351d7b9..ee868057e 100644 --- a/services/loadbalancer/model_list_plans_response.go +++ b/services/loadbalancer/model_list_plans_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListPlansResponse{} */ // 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 @@ -33,11 +40,13 @@ func getListPlansResponseGetValidPlansAttributeTypeOk(arg ListPlansResponseGetVa 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"` } @@ -46,6 +55,7 @@ type ListPlansResponse struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -54,12 +64,14 @@ func NewListPlansResponse() *ListPlansResponse { // 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 @@ -67,21 +79,25 @@ func (o *ListPlansResponse) GetValidPlans() (res ListPlansResponseGetValidPlansR // 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 { @@ -90,37 +106,45 @@ func (o ListPlansResponse) ToMap() (map[string]interface{}, error) { 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_listener.go b/services/loadbalancer/model_listener.go index b1292c22d..9e441e202 100644 --- a/services/loadbalancer/model_listener.go +++ b/services/loadbalancer/model_listener.go @@ -8,6 +8,7 @@ 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 ( @@ -23,8 +24,10 @@ var _ MappedNullable = &Listener{} */ // 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 @@ -32,11 +35,15 @@ func getListenerGetDisplayNameAttributeTypeOk(arg ListenerGetDisplayNameAttribut 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 /* @@ -44,8 +51,10 @@ type ListenerGetDisplayNameRetType = string */ // 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 @@ -53,11 +62,15 @@ func getListenerGetNameAttributeTypeOk(arg ListenerGetNameAttributeType) (ret Li 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 /* @@ -65,10 +78,16 @@ type ListenerGetNameRetType = string */ // 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 @@ -76,6 +95,7 @@ func getListenerGetPortAttributeTypeOk(arg ListenerGetPortAttributeType) (ret Li 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 } @@ -88,18 +108,25 @@ func setListenerGetPortAttributeType(arg *ListenerGetPortAttributeType, val List // 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 ( - LISTENERPROTOCOL_UNSPECIFIED ListenerProtocol = "PROTOCOL_UNSPECIFIED" - LISTENERPROTOCOL_TCP ListenerProtocol = "PROTOCOL_TCP" - LISTENERPROTOCOL_UDP ListenerProtocol = "PROTOCOL_UDP" - 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_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", @@ -108,6 +135,7 @@ var AllowedListenerProtocolEnumValues = []ListenerProtocol{ "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 @@ -135,6 +163,7 @@ func (v *ListenerProtocol) UnmarshalJSON(src []byte) error { // 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() { @@ -145,6 +174,7 @@ func NewListenerProtocolFromValue(v ListenerProtocol) (*ListenerProtocol, error) } // 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 { @@ -155,50 +185,65 @@ func (v ListenerProtocol) IsValid() bool { } // 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 @@ -206,6 +251,7 @@ func getListenerGetProtocolAttributeTypeOk(arg ListenerGetProtocolAttributeType) 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 } @@ -215,10 +261,16 @@ func setListenerGetProtocolAttributeType(arg *ListenerGetProtocolAttributeType, */ // 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 @@ -226,6 +278,7 @@ func getListenerGetServerNameIndicatorsAttributeTypeOk(arg ListenerGetServerName 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 } @@ -235,8 +288,10 @@ func setListenerGetServerNameIndicatorsAttributeType(arg *ListenerGetServerNameI */ // 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 @@ -244,11 +299,15 @@ func getListenerGetTargetPoolAttributeTypeOk(arg ListenerGetTargetPoolAttributeT 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 /* @@ -256,10 +315,16 @@ type ListenerGetTargetPoolRetType = string */ // 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 @@ -267,6 +332,7 @@ func getListenerGetTcpAttributeTypeOk(arg ListenerGetTcpAttributeType) (ret List 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 } @@ -276,10 +342,16 @@ func setListenerGetTcpAttributeType(arg *ListenerGetTcpAttributeType, val Listen */ // 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 @@ -287,11 +359,13 @@ func getListenerGetUdpAttributeTypeOk(arg ListenerGetUdpAttributeType) (ret List 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. @@ -313,6 +387,7 @@ type Listener struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -321,12 +396,14 @@ func NewListener() *Listener { // 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 @@ -334,22 +411,26 @@ func (o *Listener) GetDisplayName() (res ListenerGetDisplayNameRetType) { // 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 @@ -357,22 +438,26 @@ func (o *Listener) GetName() (res ListenerGetNameRetType) { // 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 @@ -380,22 +465,26 @@ func (o *Listener) GetPort() (res ListenerGetPortRetType) { // 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 @@ -403,22 +492,26 @@ func (o *Listener) GetProtocol() (res ListenerGetProtocolRetType) { // 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 @@ -426,22 +519,26 @@ func (o *Listener) GetServerNameIndicators() (res ListenerGetServerNameIndicator // 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 @@ -449,22 +546,26 @@ func (o *Listener) GetTargetPool() (res ListenerGetTargetPoolRetType) { // 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 @@ -472,22 +573,26 @@ func (o *Listener) GetTcp() (res ListenerGetTcpRetType) { // 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 @@ -495,21 +600,25 @@ func (o *Listener) GetUdp() (res ListenerGetUdpRetType) { // 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 { @@ -539,37 +648,45 @@ func (o Listener) ToMap() (map[string]interface{}, error) { 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_load_balancer.go b/services/loadbalancer/model_load_balancer.go index ba36e39fe..1e03eaaaf 100644 --- a/services/loadbalancer/model_load_balancer.go +++ b/services/loadbalancer/model_load_balancer.go @@ -8,6 +8,7 @@ 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 ( @@ -23,10 +24,16 @@ var _ MappedNullable = &LoadBalancer{} */ // 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 @@ -34,6 +41,7 @@ func getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg L 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 } @@ -43,10 +51,16 @@ func setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(arg *Lo */ // 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 @@ -54,6 +68,7 @@ func getLoadBalancerGetErrorsAttributeTypeOk(arg LoadBalancerGetErrorsAttributeT 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 } @@ -63,8 +78,10 @@ func setLoadBalancerGetErrorsAttributeType(arg *LoadBalancerGetErrorsAttributeTy */ // 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 @@ -72,11 +89,15 @@ func getLoadBalancerGetExternalAddressAttributeTypeOk(arg LoadBalancerGetExterna 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 /* @@ -84,10 +105,16 @@ type LoadBalancerGetExternalAddressRetType = string */ // 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 @@ -95,6 +122,7 @@ func getLoadBalancerGetLabelsAttributeTypeOk(arg LoadBalancerGetLabelsAttributeT 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 } @@ -104,10 +132,16 @@ func setLoadBalancerGetLabelsAttributeType(arg *LoadBalancerGetLabelsAttributeTy */ // 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 @@ -115,6 +149,7 @@ func getLoadBalancerGetListenersAttributeTypeOk(arg LoadBalancerGetListenersAttr 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 } @@ -124,10 +159,16 @@ func setLoadBalancerGetListenersAttributeType(arg *LoadBalancerGetListenersAttri */ // 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 @@ -135,6 +176,7 @@ func getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(arg LoadBalancer 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 } @@ -144,8 +186,10 @@ func setLoadBalancerGetLoadBalancerSecurityGroupAttributeType(arg *LoadBalancerG */ // 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 @@ -153,11 +197,15 @@ func getLoadBalancerGetNameAttributeTypeOk(arg LoadBalancerGetNameAttributeType) 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 /* @@ -165,10 +213,16 @@ type LoadBalancerGetNameRetType = string */ // 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 @@ -176,6 +230,7 @@ func getLoadBalancerGetNetworksAttributeTypeOk(arg LoadBalancerGetNetworksAttrib 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 } @@ -185,10 +240,16 @@ func setLoadBalancerGetNetworksAttributeType(arg *LoadBalancerGetNetworksAttribu */ // 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 @@ -196,6 +257,7 @@ func getLoadBalancerGetOptionsAttributeTypeOk(arg LoadBalancerGetOptionsAttribut 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 } @@ -205,8 +267,10 @@ func setLoadBalancerGetOptionsAttributeType(arg *LoadBalancerGetOptionsAttribute */ // 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 @@ -214,11 +278,15 @@ func getLoadBalancerGetPlanIdAttributeTypeOk(arg LoadBalancerGetPlanIdAttributeT 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 /* @@ -226,8 +294,10 @@ type LoadBalancerGetPlanIdRetType = string */ // 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 @@ -235,11 +305,15 @@ func getLoadBalancerGetPrivateAddressAttributeTypeOk(arg LoadBalancerGetPrivateA 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 /* @@ -247,8 +321,10 @@ type LoadBalancerGetPrivateAddressRetType = string */ // 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 @@ -256,11 +332,15 @@ func getLoadBalancerGetRegionAttributeTypeOk(arg LoadBalancerGetRegionAttributeT 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 /* @@ -271,18 +351,25 @@ type LoadBalancerGetRegionRetType = string // 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" - LOADBALANCERSTATUS_PENDING LoadBalancerStatus = "STATUS_PENDING" - LOADBALANCERSTATUS_READY LoadBalancerStatus = "STATUS_READY" - 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_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", @@ -291,6 +378,7 @@ var AllowedLoadBalancerStatusEnumValues = []LoadBalancerStatus{ "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 @@ -318,6 +406,7 @@ func (v *LoadBalancerStatus) UnmarshalJSON(src []byte) error { // 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() { @@ -328,6 +417,7 @@ func NewLoadBalancerStatusFromValue(v LoadBalancerStatus) (*LoadBalancerStatus, } // 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 { @@ -338,50 +428,65 @@ func (v LoadBalancerStatus) IsValid() bool { } // 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 @@ -389,6 +494,7 @@ func getLoadBalancerGetStatusAttributeTypeOk(arg LoadBalancerGetStatusAttributeT 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 } @@ -398,10 +504,16 @@ func setLoadBalancerGetStatusAttributeType(arg *LoadBalancerGetStatusAttributeTy */ // 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 @@ -409,6 +521,7 @@ func getLoadBalancerGetTargetPoolsAttributeTypeOk(arg LoadBalancerGetTargetPools 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 } @@ -418,10 +531,16 @@ func setLoadBalancerGetTargetPoolsAttributeType(arg *LoadBalancerGetTargetPoolsA */ // 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 @@ -429,6 +548,7 @@ func getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(arg LoadBalancerGetTar 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 } @@ -438,8 +558,10 @@ func setLoadBalancerGetTargetSecurityGroupAttributeType(arg *LoadBalancerGetTarg */ // 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 @@ -447,14 +569,19 @@ func getLoadBalancerGetVersionAttributeTypeOk(arg LoadBalancerGetVersionAttribut 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"` @@ -490,6 +617,7 @@ type LoadBalancer struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -498,12 +626,14 @@ func NewLoadBalancer() *LoadBalancer { // 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 @@ -511,22 +641,26 @@ func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignment() (res LoadBalanc // 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 @@ -534,22 +668,26 @@ func (o *LoadBalancer) GetErrors() (res LoadBalancerGetErrorsRetType) { // 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 @@ -557,22 +695,26 @@ func (o *LoadBalancer) GetExternalAddress() (res LoadBalancerGetExternalAddressR // 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 @@ -580,22 +722,26 @@ func (o *LoadBalancer) GetLabels() (res LoadBalancerGetLabelsRetType) { // 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 @@ -603,22 +749,26 @@ func (o *LoadBalancer) GetListeners() (res LoadBalancerGetListenersRetType) { // 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 @@ -626,22 +776,26 @@ func (o *LoadBalancer) GetLoadBalancerSecurityGroup() (res LoadBalancerGetLoadBa // 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 @@ -649,22 +803,26 @@ func (o *LoadBalancer) GetName() (res LoadBalancerGetNameRetType) { // 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 @@ -672,22 +830,26 @@ func (o *LoadBalancer) GetNetworks() (res LoadBalancerGetNetworksRetType) { // 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 @@ -695,22 +857,26 @@ func (o *LoadBalancer) GetOptions() (res LoadBalancerGetOptionsRetType) { // 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 @@ -718,22 +884,26 @@ func (o *LoadBalancer) GetPlanId() (res LoadBalancerGetPlanIdRetType) { // 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 @@ -741,22 +911,26 @@ func (o *LoadBalancer) GetPrivateAddress() (res LoadBalancerGetPrivateAddressRet // 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 @@ -764,22 +938,26 @@ func (o *LoadBalancer) GetRegion() (res LoadBalancerGetRegionRetType) { // 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 @@ -787,22 +965,26 @@ func (o *LoadBalancer) GetStatus() (res LoadBalancerGetStatusRetType) { // 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 @@ -810,22 +992,26 @@ func (o *LoadBalancer) GetTargetPools() (res LoadBalancerGetTargetPoolsRetType) // 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 @@ -833,22 +1019,26 @@ func (o *LoadBalancer) GetTargetSecurityGroup() (res LoadBalancerGetTargetSecuri // 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 @@ -856,21 +1046,25 @@ func (o *LoadBalancer) GetVersion() (res LoadBalancerGetVersionRetType) { // 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 { @@ -924,37 +1118,45 @@ func (o LoadBalancer) ToMap() (map[string]interface{}, error) { 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 index 4e77bc591..81d423f5d 100644 --- a/services/loadbalancer/model_load_balancer_error.go +++ b/services/loadbalancer/model_load_balancer_error.go @@ -8,6 +8,7 @@ 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 ( @@ -23,8 +24,10 @@ var _ MappedNullable = &LoadBalancerError{} */ // 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 @@ -32,11 +35,15 @@ func getLoadBalancerErrorGetDescriptionAttributeTypeOk(arg LoadBalancerErrorGetD 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 /* @@ -47,23 +54,35 @@ type LoadBalancerErrorGetDescriptionRetType = string // 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 ( - LOADBALANCERERRORTYPE_UNSPECIFIED LoadBalancerErrorTypes = "TYPE_UNSPECIFIED" - LOADBALANCERERRORTYPE_INTERNAL LoadBalancerErrorTypes = "TYPE_INTERNAL" - 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_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" - LOADBALANCERERRORTYPE_PORT_NOT_CONFIGURED LoadBalancerErrorTypes = "TYPE_PORT_NOT_CONFIGURED" - LOADBALANCERERRORTYPE_FIP_NOT_CONFIGURED LoadBalancerErrorTypes = "TYPE_FIP_NOT_CONFIGURED" - LOADBALANCERERRORTYPE_TARGET_NOT_ACTIVE LoadBalancerErrorTypes = "TYPE_TARGET_NOT_ACTIVE" - LOADBALANCERERRORTYPE_METRICS_MISCONFIGURED LoadBalancerErrorTypes = "TYPE_METRICS_MISCONFIGURED" - LOADBALANCERERRORTYPE_LOGS_MISCONFIGURED LoadBalancerErrorTypes = "TYPE_LOGS_MISCONFIGURED" - 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_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" ) // 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", @@ -77,6 +96,7 @@ var AllowedLoadBalancerErrorTypesEnumValues = []LoadBalancerErrorTypes{ "TYPE_FIP_NOT_FOUND", } +// 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 @@ -104,6 +124,7 @@ func (v *LoadBalancerErrorTypes) UnmarshalJSON(src []byte) error { // 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() { @@ -114,6 +135,7 @@ func NewLoadBalancerErrorTypesFromValue(v LoadBalancerErrorTypes) (*LoadBalancer } // 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 { @@ -124,50 +146,65 @@ func (v LoadBalancerErrorTypes) IsValid() bool { } // 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 @@ -175,11 +212,13 @@ func getLoadBalancerErrorGetTypeAttributeTypeOk(arg LoadBalancerErrorGetTypeAttr 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"` @@ -191,6 +230,7 @@ type LoadBalancerError struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -199,12 +239,14 @@ func NewLoadBalancerError() *LoadBalancerError { // 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 @@ -212,22 +254,26 @@ func (o *LoadBalancerError) GetDescription() (res LoadBalancerErrorGetDescriptio // 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 @@ -235,21 +281,25 @@ func (o *LoadBalancerError) GetType() (res LoadBalancerErrorGetTypeRetType) { // 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 { @@ -261,37 +311,45 @@ func (o LoadBalancerError) ToMap() (map[string]interface{}, error) { 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_options.go b/services/loadbalancer/model_load_balancer_options.go index aba38c361..49d2a8cda 100644 --- a/services/loadbalancer/model_load_balancer_options.go +++ b/services/loadbalancer/model_load_balancer_options.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &LoadBalancerOptions{} */ // 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 @@ -33,6 +40,7 @@ func getLoadBalancerOptionsGetAccessControlAttributeTypeOk(arg LoadBalancerOptio 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 } @@ -42,10 +50,16 @@ func setLoadBalancerOptionsGetAccessControlAttributeType(arg *LoadBalancerOption */ // 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 @@ -53,6 +67,7 @@ func getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(arg LoadBalancerOp 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 } @@ -62,10 +77,16 @@ func setLoadBalancerOptionsgetEphemeralAddressAttributeType(arg *LoadBalancerOpt */ // 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 @@ -73,6 +94,7 @@ func getLoadBalancerOptionsGetObservabilityAttributeTypeOk(arg LoadBalancerOptio 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 } @@ -82,10 +104,16 @@ func setLoadBalancerOptionsGetObservabilityAttributeType(arg *LoadBalancerOption */ // 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 @@ -93,11 +121,13 @@ func getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(arg LoadBalancer 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"` @@ -110,6 +140,7 @@ type LoadBalancerOptions struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -118,12 +149,14 @@ func NewLoadBalancerOptions() *LoadBalancerOptions { // 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 @@ -131,22 +164,26 @@ func (o *LoadBalancerOptions) GetAccessControl() (res LoadBalancerOptionsGetAcce // 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 @@ -154,22 +191,26 @@ func (o *LoadBalancerOptions) GetEphemeralAddress() (res LoadBalancerOptionsgetE // 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 @@ -177,22 +218,26 @@ func (o *LoadBalancerOptions) GetObservability() (res LoadBalancerOptionsGetObse // 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 @@ -200,21 +245,25 @@ func (o *LoadBalancerOptions) GetPrivateNetworkOnly() (res LoadBalancerOptionsge // 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 { @@ -232,37 +281,45 @@ func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) { 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_loadbalancer_option_access_control.go b/services/loadbalancer/model_loadbalancer_option_access_control.go index 3e3176d4a..d4c958828 100644 --- a/services/loadbalancer/model_loadbalancer_option_access_control.go +++ b/services/loadbalancer/model_loadbalancer_option_access_control.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &LoadbalancerOptionAccessControl{} */ // 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 @@ -33,11 +40,13 @@ func getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(arg 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"` @@ -47,6 +56,7 @@ type LoadbalancerOptionAccessControl struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -55,12 +65,14 @@ func NewLoadbalancerOptionAccessControl() *LoadbalancerOptionAccessControl { // 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 @@ -68,21 +80,25 @@ func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() (res Loadbala // 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 { @@ -91,37 +107,45 @@ func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) 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_logs.go b/services/loadbalancer/model_loadbalancer_option_logs.go index 528b758cd..ea2930546 100644 --- a/services/loadbalancer/model_loadbalancer_option_logs.go +++ b/services/loadbalancer/model_loadbalancer_option_logs.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &LoadbalancerOptionLogs{} */ // 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 @@ -31,11 +34,15 @@ func getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(arg LoadbalancerO 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 /* @@ -43,8 +50,10 @@ type LoadbalancerOptionLogsGetCredentialsRefRetType = string */ // 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 @@ -52,14 +61,19 @@ func getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionLo 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"` @@ -71,6 +85,7 @@ type LoadbalancerOptionLogs struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -79,12 +94,14 @@ func NewLoadbalancerOptionLogs() *LoadbalancerOptionLogs { // 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 @@ -92,22 +109,26 @@ func (o *LoadbalancerOptionLogs) GetCredentialsRef() (res LoadbalancerOptionLogs // 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 @@ -115,21 +136,25 @@ func (o *LoadbalancerOptionLogs) GetPushUrl() (res LoadbalancerOptionLogsGetPush // 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 { @@ -141,37 +166,45 @@ func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) { 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_metrics.go b/services/loadbalancer/model_loadbalancer_option_metrics.go index e379c0319..7781ec06b 100644 --- a/services/loadbalancer/model_loadbalancer_option_metrics.go +++ b/services/loadbalancer/model_loadbalancer_option_metrics.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &LoadbalancerOptionMetrics{} */ // 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 @@ -31,11 +34,15 @@ func getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(arg Loadbalanc 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 /* @@ -43,8 +50,10 @@ type LoadbalancerOptionMetricsGetCredentialsRefRetType = string */ // 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 @@ -52,14 +61,19 @@ func getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(arg LoadbalancerOptio 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"` @@ -71,6 +85,7 @@ type LoadbalancerOptionMetrics struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -79,12 +94,14 @@ func NewLoadbalancerOptionMetrics() *LoadbalancerOptionMetrics { // 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 @@ -92,22 +109,26 @@ func (o *LoadbalancerOptionMetrics) GetCredentialsRef() (res LoadbalancerOptionM // 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 @@ -115,21 +136,25 @@ func (o *LoadbalancerOptionMetrics) GetPushUrl() (res LoadbalancerOptionMetricsG // 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 { @@ -141,37 +166,45 @@ func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) { 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_observability.go b/services/loadbalancer/model_loadbalancer_option_observability.go index 170a4f090..a0b86f147 100644 --- a/services/loadbalancer/model_loadbalancer_option_observability.go +++ b/services/loadbalancer/model_loadbalancer_option_observability.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &LoadbalancerOptionObservability{} */ // 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 @@ -33,6 +40,7 @@ func getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(arg LoadbalancerOp 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 } @@ -42,10 +50,16 @@ func setLoadbalancerOptionObservabilityGetLogsAttributeType(arg *LoadbalancerOpt */ // 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 @@ -53,11 +67,13 @@ func getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(arg Loadbalance 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"` @@ -67,6 +83,7 @@ type LoadbalancerOptionObservability struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -75,12 +92,14 @@ func NewLoadbalancerOptionObservability() *LoadbalancerOptionObservability { // 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 @@ -88,22 +107,26 @@ func (o *LoadbalancerOptionObservability) GetLogs() (res LoadbalancerOptionObser // 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 @@ -111,21 +134,25 @@ func (o *LoadbalancerOptionObservability) GetMetrics() (res LoadbalancerOptionOb // 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 { @@ -137,37 +164,45 @@ func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) 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_network.go b/services/loadbalancer/model_network.go index 9b100289c..b6157b696 100644 --- a/services/loadbalancer/model_network.go +++ b/services/loadbalancer/model_network.go @@ -8,6 +8,7 @@ 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 ( @@ -23,8 +24,10 @@ var _ MappedNullable = &Network{} */ // 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 @@ -32,11 +35,15 @@ func getNetworkGetNetworkIdAttributeTypeOk(arg NetworkGetNetworkIdAttributeType) 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 /* @@ -47,17 +54,23 @@ type NetworkGetNetworkIdRetType = string // 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 ( - 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_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" - NETWORKROLE_LISTENERS NetworkRole = "ROLE_LISTENERS" - NETWORKROLE_TARGETS NetworkRole = "ROLE_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", @@ -65,6 +78,7 @@ var AllowedNetworkRoleEnumValues = []NetworkRole{ "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 @@ -92,6 +106,7 @@ func (v *NetworkRole) UnmarshalJSON(src []byte) error { // 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() { @@ -102,6 +117,7 @@ func NewNetworkRoleFromValue(v NetworkRole) (*NetworkRole, error) { } // 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 { @@ -112,50 +128,65 @@ func (v NetworkRole) IsValid() bool { } // 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 @@ -163,11 +194,13 @@ func getNetworkGetRoleAttributeTypeOk(arg NetworkGetRoleAttributeType) (ret Netw 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"` @@ -179,6 +212,7 @@ type Network struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -187,12 +221,14 @@ func NewNetwork() *Network { // 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 @@ -200,22 +236,26 @@ func (o *Network) GetNetworkId() (res NetworkGetNetworkIdRetType) { // 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 @@ -223,21 +263,25 @@ func (o *Network) GetRole() (res NetworkGetRoleRetType) { // 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 { @@ -249,37 +293,45 @@ func (o Network) ToMap() (map[string]interface{}, error) { 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_options_tcp.go b/services/loadbalancer/model_options_tcp.go index 3e74a4c7f..d40901782 100644 --- a/services/loadbalancer/model_options_tcp.go +++ b/services/loadbalancer/model_options_tcp.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &OptionsTCP{} */ // 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 @@ -31,14 +34,19 @@ func getOptionsTCPGetIdleTimeoutAttributeTypeOk(arg OptionsTCPGetIdleTimeoutAttr 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"` @@ -48,6 +56,7 @@ type OptionsTCP struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -56,12 +65,14 @@ func NewOptionsTCP() *OptionsTCP { // 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 @@ -69,21 +80,25 @@ func (o *OptionsTCP) GetIdleTimeout() (res OptionsTCPGetIdleTimeoutRetType) { // 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 { @@ -92,37 +107,45 @@ func (o OptionsTCP) ToMap() (map[string]interface{}, error) { 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_udp.go b/services/loadbalancer/model_options_udp.go index d65cc3b1d..75529839d 100644 --- a/services/loadbalancer/model_options_udp.go +++ b/services/loadbalancer/model_options_udp.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &OptionsUDP{} */ // 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 @@ -31,14 +34,19 @@ func getOptionsUDPGetIdleTimeoutAttributeTypeOk(arg OptionsUDPGetIdleTimeoutAttr 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"` @@ -48,6 +56,7 @@ type OptionsUDP struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -56,12 +65,14 @@ func NewOptionsUDP() *OptionsUDP { // 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 @@ -69,21 +80,25 @@ func (o *OptionsUDP) GetIdleTimeout() (res OptionsUDPGetIdleTimeoutRetType) { // 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 { @@ -92,37 +107,45 @@ func (o OptionsUDP) ToMap() (map[string]interface{}, error) { 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_plan_details.go b/services/loadbalancer/model_plan_details.go index 458b7b187..06395b8c1 100644 --- a/services/loadbalancer/model_plan_details.go +++ b/services/loadbalancer/model_plan_details.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &PlanDetails{} */ // 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 @@ -31,11 +34,15 @@ func getPlanDetailsGetDescriptionAttributeTypeOk(arg PlanDetailsGetDescriptionAt 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 /* @@ -43,8 +50,10 @@ type PlanDetailsGetDescriptionRetType = string */ // 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 @@ -52,11 +61,15 @@ func getPlanDetailsGetFlavorNameAttributeTypeOk(arg PlanDetailsGetFlavorNameAttr 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 /* @@ -64,10 +77,16 @@ type PlanDetailsGetFlavorNameRetType = string */ // 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 @@ -75,6 +94,7 @@ func getPlanDetailsGetMaxConnectionsAttributeTypeOk(arg PlanDetailsGetMaxConnect 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 } @@ -84,8 +104,10 @@ func setPlanDetailsGetMaxConnectionsAttributeType(arg *PlanDetailsGetMaxConnecti */ // 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 @@ -93,11 +115,15 @@ func getPlanDetailsGetNameAttributeTypeOk(arg PlanDetailsGetNameAttributeType) ( 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 /* @@ -105,8 +131,10 @@ type PlanDetailsGetNameRetType = string */ // 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 @@ -114,11 +142,15 @@ func getPlanDetailsGetPlanIdAttributeTypeOk(arg PlanDetailsGetPlanIdAttributeTyp 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 /* @@ -126,8 +158,10 @@ type PlanDetailsGetPlanIdRetType = string */ // 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 @@ -135,14 +169,19 @@ func getPlanDetailsGetRegionAttributeTypeOk(arg PlanDetailsGetRegionAttributeTyp 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"` @@ -163,6 +202,7 @@ type PlanDetails struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -171,12 +211,14 @@ func NewPlanDetails() *PlanDetails { // 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 @@ -184,22 +226,26 @@ func (o *PlanDetails) GetDescription() (res PlanDetailsGetDescriptionRetType) { // 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 @@ -207,22 +253,26 @@ func (o *PlanDetails) GetFlavorName() (res PlanDetailsGetFlavorNameRetType) { // 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 @@ -230,22 +280,26 @@ func (o *PlanDetails) GetMaxConnections() (res PlanDetailsGetMaxConnectionsRetTy // 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 @@ -253,22 +307,26 @@ func (o *PlanDetails) GetName() (res PlanDetailsGetNameRetType) { // 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 @@ -276,22 +334,26 @@ func (o *PlanDetails) GetPlanId() (res PlanDetailsGetPlanIdRetType) { // 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 @@ -299,21 +361,25 @@ func (o *PlanDetails) GetRegion() (res PlanDetailsGetRegionRetType) { // 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 { @@ -337,37 +403,45 @@ func (o PlanDetails) ToMap() (map[string]interface{}, error) { 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_security_group.go b/services/loadbalancer/model_security_group.go index c74772b7f..c89daf484 100644 --- a/services/loadbalancer/model_security_group.go +++ b/services/loadbalancer/model_security_group.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &SecurityGroup{} */ // 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 @@ -31,11 +34,15 @@ func getSecurityGroupGetIdAttributeTypeOk(arg SecurityGroupGetIdAttributeType) ( 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 /* @@ -43,8 +50,10 @@ type SecurityGroupGetIdRetType = string */ // 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 @@ -52,14 +61,19 @@ func getSecurityGroupGetNameAttributeTypeOk(arg SecurityGroupGetNameAttributeTyp 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"` @@ -71,6 +85,7 @@ type SecurityGroup struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -79,12 +94,14 @@ func NewSecurityGroup() *SecurityGroup { // 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 @@ -92,22 +109,26 @@ func (o *SecurityGroup) GetId() (res SecurityGroupGetIdRetType) { // 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 @@ -115,21 +136,25 @@ func (o *SecurityGroup) GetName() (res SecurityGroupGetNameRetType) { // 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 { @@ -141,37 +166,45 @@ func (o SecurityGroup) ToMap() (map[string]interface{}, error) { 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_server_name_indicator.go b/services/loadbalancer/model_server_name_indicator.go index 3f2a0f029..5ada4d567 100644 --- a/services/loadbalancer/model_server_name_indicator.go +++ b/services/loadbalancer/model_server_name_indicator.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ServerNameIndicator{} */ // 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 @@ -31,14 +34,19 @@ func getServerNameIndicatorGetNameAttributeTypeOk(arg ServerNameIndicatorGetName 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"` @@ -48,6 +56,7 @@ type ServerNameIndicator struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -56,12 +65,14 @@ func NewServerNameIndicator() *ServerNameIndicator { // 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 @@ -69,21 +80,25 @@ func (o *ServerNameIndicator) GetName() (res ServerNameIndicatorGetNameRetType) // 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 { @@ -92,37 +107,45 @@ func (o ServerNameIndicator) ToMap() (map[string]interface{}, error) { 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_session_persistence.go b/services/loadbalancer/model_session_persistence.go index c91c7cf8c..c7f2e06f0 100644 --- a/services/loadbalancer/model_session_persistence.go +++ b/services/loadbalancer/model_session_persistence.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &SessionPersistence{} */ // 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 @@ -33,11 +40,13 @@ func getSessionPersistencegetUseSourceIpAddressAttributeTypeOk(arg SessionPersis 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"` @@ -47,6 +56,7 @@ type SessionPersistence struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -55,12 +65,14 @@ func NewSessionPersistence() *SessionPersistence { // 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 @@ -68,21 +80,25 @@ func (o *SessionPersistence) GetUseSourceIpAddress() (res SessionPersistencegetU // 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 { @@ -91,37 +107,45 @@ func (o SessionPersistence) ToMap() (map[string]interface{}, error) { 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_status.go b/services/loadbalancer/model_status.go index 3ad068b7c..1f2012391 100644 --- a/services/loadbalancer/model_status.go +++ b/services/loadbalancer/model_status.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Status{} */ // 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 @@ -33,6 +40,7 @@ func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret Status 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 } @@ -42,10 +50,16 @@ func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGe */ // 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 @@ -53,6 +67,7 @@ func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret 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 } @@ -62,8 +77,10 @@ func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val St */ // 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 @@ -71,14 +88,19 @@ func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret 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. @@ -93,6 +115,7 @@ type Status struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -101,12 +124,14 @@ func NewStatus() *Status { // 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 @@ -114,22 +139,26 @@ func (o *Status) GetCode() (res StatusGetCodeRetType) { // 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 @@ -137,22 +166,26 @@ func (o *Status) GetDetails() (res StatusGetDetailsRetType) { // 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 @@ -160,21 +193,25 @@ func (o *Status) GetMessage() (res StatusGetMessageRetType) { // 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 { @@ -189,37 +226,45 @@ func (o Status) ToMap() (map[string]interface{}, error) { 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_target.go b/services/loadbalancer/model_target.go index 528ad0c19..8fae7e9e5 100644 --- a/services/loadbalancer/model_target.go +++ b/services/loadbalancer/model_target.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Target{} */ // 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 @@ -31,11 +34,15 @@ func getTargetGetDisplayNameAttributeTypeOk(arg TargetGetDisplayNameAttributeTyp 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 /* @@ -43,8 +50,10 @@ type TargetGetDisplayNameRetType = string */ // 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 @@ -52,14 +61,19 @@ func getTargetGetIpAttributeTypeOk(arg TargetGetIpAttributeType) (ret TargetGetI 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"` @@ -71,6 +85,7 @@ type Target struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -79,12 +94,14 @@ func NewTarget() *Target { // 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 @@ -92,22 +109,26 @@ func (o *Target) GetDisplayName() (res TargetGetDisplayNameRetType) { // 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 @@ -115,21 +136,25 @@ func (o *Target) GetIp() (res TargetGetIpRetType) { // 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 { @@ -141,37 +166,45 @@ func (o Target) ToMap() (map[string]interface{}, error) { 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 index ba7a6ef96..e696393e2 100644 --- a/services/loadbalancer/model_target_pool.go +++ b/services/loadbalancer/model_target_pool.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &TargetPool{} */ // 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 @@ -33,6 +40,7 @@ func getTargetPoolGetActiveHealthCheckAttributeTypeOk(arg TargetPoolGetActiveHea 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 } @@ -42,8 +50,10 @@ func setTargetPoolGetActiveHealthCheckAttributeType(arg *TargetPoolGetActiveHeal */ // 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 @@ -51,11 +61,15 @@ func getTargetPoolGetNameAttributeTypeOk(arg TargetPoolGetNameAttributeType) (re 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 /* @@ -63,10 +77,16 @@ type TargetPoolGetNameRetType = string */ // 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 @@ -74,6 +94,7 @@ func getTargetPoolGetSessionPersistenceAttributeTypeOk(arg TargetPoolGetSessionP 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 } @@ -83,10 +104,16 @@ func setTargetPoolGetSessionPersistenceAttributeType(arg *TargetPoolGetSessionPe */ // 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 @@ -94,6 +121,7 @@ func getTargetPoolGetTargetPortAttributeTypeOk(arg TargetPoolGetTargetPortAttrib 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 } @@ -103,10 +131,16 @@ func setTargetPoolGetTargetPortAttributeType(arg *TargetPoolGetTargetPortAttribu */ // 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 @@ -114,11 +148,13 @@ func getTargetPoolGetTargetsAttributeTypeOk(arg TargetPoolGetTargetsAttributeTyp 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 @@ -135,6 +171,7 @@ type TargetPool struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -143,12 +180,14 @@ func NewTargetPool() *TargetPool { // 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 @@ -156,22 +195,26 @@ func (o *TargetPool) GetActiveHealthCheck() (res TargetPoolGetActiveHealthCheckR // 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 @@ -179,22 +222,26 @@ func (o *TargetPool) GetName() (res TargetPoolGetNameRetType) { // 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 @@ -202,22 +249,26 @@ func (o *TargetPool) GetSessionPersistence() (res TargetPoolGetSessionPersistenc // 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 @@ -225,22 +276,26 @@ func (o *TargetPool) GetTargetPort() (res TargetPoolGetTargetPortRetType) { // 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 @@ -248,21 +303,25 @@ func (o *TargetPool) GetTargets() (res TargetPoolGetTargetsRetType) { // 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 { @@ -283,37 +342,45 @@ func (o TargetPool) ToMap() (map[string]interface{}, error) { 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_tls_config.go b/services/loadbalancer/model_tls_config.go index 0791ef657..a24f76c6a 100644 --- a/services/loadbalancer/model_tls_config.go +++ b/services/loadbalancer/model_tls_config.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &TlsConfig{} */ // 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 @@ -31,11 +34,15 @@ func getTlsConfigGetCustomCaAttributeTypeOk(arg TlsConfigGetCustomCaAttributeTyp 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 /* @@ -43,10 +50,16 @@ type TlsConfigGetCustomCaRetType = string */ // 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 @@ -54,6 +67,7 @@ func getTlsConfiggetEnabledAttributeTypeOk(arg TlsConfiggetEnabledAttributeType) 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 } @@ -63,10 +77,16 @@ func setTlsConfiggetEnabledAttributeType(arg *TlsConfiggetEnabledAttributeType, */ // 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 @@ -74,11 +94,13 @@ func getTlsConfiggetSkipCertificateValidationAttributeTypeOk(arg TlsConfiggetSki 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"` @@ -92,6 +114,7 @@ type TlsConfig struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -100,12 +123,14 @@ func NewTlsConfig() *TlsConfig { // 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 @@ -113,22 +138,26 @@ func (o *TlsConfig) GetCustomCa() (res TlsConfigGetCustomCaRetType) { // 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 @@ -136,22 +165,26 @@ func (o *TlsConfig) GetEnabled() (res TlsConfiggetEnabledRetType) { // 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 @@ -159,21 +192,25 @@ func (o *TlsConfig) GetSkipCertificateValidation() (res TlsConfiggetSkipCertific // 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 { @@ -188,37 +225,45 @@ func (o TlsConfig) ToMap() (map[string]interface{}, error) { 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_update_credentials_payload.go b/services/loadbalancer/model_update_credentials_payload.go index cc54f3cf4..2d02bf3f4 100644 --- a/services/loadbalancer/model_update_credentials_payload.go +++ b/services/loadbalancer/model_update_credentials_payload.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateCredentialsPayload{} */ // 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 @@ -31,11 +34,15 @@ func getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg UpdateCredenti 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 /* @@ -43,8 +50,10 @@ type UpdateCredentialsPayloadGetDisplayNameRetType = string */ // 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 @@ -52,11 +61,15 @@ func getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(arg UpdateCredentials 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 /* @@ -64,8 +77,10 @@ type UpdateCredentialsPayloadGetPasswordRetType = string */ // 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 @@ -73,14 +88,19 @@ func getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(arg UpdateCredentials 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"` @@ -94,6 +114,7 @@ type UpdateCredentialsPayload struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -102,12 +123,14 @@ func NewUpdateCredentialsPayload() *UpdateCredentialsPayload { // 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 @@ -115,22 +138,26 @@ func (o *UpdateCredentialsPayload) GetDisplayName() (res UpdateCredentialsPayloa // 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 @@ -138,22 +165,26 @@ func (o *UpdateCredentialsPayload) GetPassword() (res UpdateCredentialsPayloadGe // 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 @@ -161,21 +192,25 @@ func (o *UpdateCredentialsPayload) GetUsername() (res UpdateCredentialsPayloadGe // 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 { @@ -190,37 +225,45 @@ func (o UpdateCredentialsPayload) ToMap() (map[string]interface{}, error) { 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_response.go b/services/loadbalancer/model_update_credentials_response.go index 09093807f..e13dd16b9 100644 --- a/services/loadbalancer/model_update_credentials_response.go +++ b/services/loadbalancer/model_update_credentials_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateCredentialsResponse{} */ // 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 @@ -33,11 +40,13 @@ func getUpdateCredentialsResponseGetCredentialAttributeTypeOk(arg UpdateCredenti 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"` } @@ -46,6 +55,7 @@ type UpdateCredentialsResponse struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -54,12 +64,14 @@ func NewUpdateCredentialsResponse() *UpdateCredentialsResponse { // 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 @@ -67,21 +79,25 @@ func (o *UpdateCredentialsResponse) GetCredential() (res UpdateCredentialsRespon // 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 { @@ -90,37 +106,45 @@ func (o UpdateCredentialsResponse) ToMap() (map[string]interface{}, error) { 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_load_balancer_payload.go b/services/loadbalancer/model_update_load_balancer_payload.go index d160115ab..c2ff18c00 100644 --- a/services/loadbalancer/model_update_load_balancer_payload.go +++ b/services/loadbalancer/model_update_load_balancer_payload.go @@ -8,6 +8,7 @@ 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 ( @@ -23,10 +24,16 @@ var _ MappedNullable = &UpdateLoadBalancerPayload{} */ // 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 @@ -34,6 +41,7 @@ func getUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttribut 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 } @@ -43,10 +51,16 @@ func setUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttribut */ // 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 @@ -54,6 +68,7 @@ func getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg UpdateLoadBalancer 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 } @@ -63,8 +78,10 @@ func setUpdateLoadBalancerPayloadGetErrorsAttributeType(arg *UpdateLoadBalancerP */ // 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 @@ -72,11 +89,15 @@ func getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg UpdateLoa 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 /* @@ -84,10 +105,16 @@ type UpdateLoadBalancerPayloadGetExternalAddressRetType = string */ // 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 @@ -95,6 +122,7 @@ func getUpdateLoadBalancerPayloadGetLabelsAttributeTypeOk(arg UpdateLoadBalancer 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 } @@ -104,10 +132,16 @@ func setUpdateLoadBalancerPayloadGetLabelsAttributeType(arg *UpdateLoadBalancerP */ // 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 @@ -115,6 +149,7 @@ func getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(arg UpdateLoadBalan 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 } @@ -124,10 +159,16 @@ func setUpdateLoadBalancerPayloadGetListenersAttributeType(arg *UpdateLoadBalanc */ // 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 @@ -135,6 +176,7 @@ func getUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(arg 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 } @@ -144,8 +186,10 @@ func setUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(arg * */ // 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 @@ -153,11 +197,15 @@ func getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(arg UpdateLoadBalancerPa 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 /* @@ -165,10 +213,16 @@ type UpdateLoadBalancerPayloadGetNameRetType = string */ // 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 @@ -176,6 +230,7 @@ func getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg UpdateLoadBalanc 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 } @@ -185,10 +240,16 @@ func setUpdateLoadBalancerPayloadGetNetworksAttributeType(arg *UpdateLoadBalance */ // 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 @@ -196,6 +257,7 @@ func getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg UpdateLoadBalance 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 } @@ -205,8 +267,10 @@ func setUpdateLoadBalancerPayloadGetOptionsAttributeType(arg *UpdateLoadBalancer */ // 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 @@ -214,11 +278,15 @@ func getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg UpdateLoadBalancer 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 /* @@ -226,8 +294,10 @@ type UpdateLoadBalancerPayloadGetPlanIdRetType = string */ // 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 @@ -235,11 +305,15 @@ func getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg UpdateLoad 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 /* @@ -247,8 +321,10 @@ type UpdateLoadBalancerPayloadGetPrivateAddressRetType = string */ // 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 @@ -256,11 +332,15 @@ func getUpdateLoadBalancerPayloadGetRegionAttributeTypeOk(arg UpdateLoadBalancer 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 /* @@ -271,18 +351,25 @@ type UpdateLoadBalancerPayloadGetRegionRetType = string // 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" - UPDATELOADBALANCERPAYLOADSTATUS_PENDING UpdateLoadBalancerPayloadStatus = "STATUS_PENDING" - UPDATELOADBALANCERPAYLOADSTATUS_READY UpdateLoadBalancerPayloadStatus = "STATUS_READY" - 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_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", @@ -291,6 +378,7 @@ var AllowedUpdateLoadBalancerPayloadStatusEnumValues = []UpdateLoadBalancerPaylo "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 @@ -318,6 +406,7 @@ func (v *UpdateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { // 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() { @@ -328,6 +417,7 @@ func NewUpdateLoadBalancerPayloadStatusFromValue(v UpdateLoadBalancerPayloadStat } // 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 { @@ -338,50 +428,65 @@ func (v UpdateLoadBalancerPayloadStatus) IsValid() bool { } // 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 @@ -389,6 +494,7 @@ func getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(arg UpdateLoadBalancer 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 } @@ -398,10 +504,16 @@ func setUpdateLoadBalancerPayloadGetStatusAttributeType(arg *UpdateLoadBalancerP */ // 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 @@ -409,6 +521,7 @@ func getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg UpdateLoadBal 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 } @@ -418,10 +531,16 @@ func setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *UpdateLoadBala */ // 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 @@ -429,6 +548,7 @@ func getUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(arg Updat 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 } @@ -438,8 +558,10 @@ func setUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(arg *Update */ // 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 @@ -447,14 +569,19 @@ func getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(arg UpdateLoadBalance 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"` @@ -490,6 +617,7 @@ type UpdateLoadBalancerPayload struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -498,12 +626,14 @@ func NewUpdateLoadBalancerPayload() *UpdateLoadBalancerPayload { // 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 @@ -511,22 +641,26 @@ func (o *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() (r // 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 @@ -534,22 +668,26 @@ func (o *UpdateLoadBalancerPayload) GetErrors() (res UpdateLoadBalancerPayloadGe // 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 @@ -557,22 +695,26 @@ func (o *UpdateLoadBalancerPayload) GetExternalAddress() (res UpdateLoadBalancer // 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 @@ -580,22 +722,26 @@ func (o *UpdateLoadBalancerPayload) GetLabels() (res UpdateLoadBalancerPayloadGe // 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 @@ -603,22 +749,26 @@ func (o *UpdateLoadBalancerPayload) GetListeners() (res UpdateLoadBalancerPayloa // 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 @@ -626,22 +776,26 @@ func (o *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroup() (res UpdateLo // 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 @@ -649,22 +803,26 @@ func (o *UpdateLoadBalancerPayload) GetName() (res UpdateLoadBalancerPayloadGetN // 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 @@ -672,22 +830,26 @@ func (o *UpdateLoadBalancerPayload) GetNetworks() (res UpdateLoadBalancerPayload // 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 @@ -695,22 +857,26 @@ func (o *UpdateLoadBalancerPayload) GetOptions() (res UpdateLoadBalancerPayloadG // 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 @@ -718,22 +884,26 @@ func (o *UpdateLoadBalancerPayload) GetPlanId() (res UpdateLoadBalancerPayloadGe // 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 @@ -741,22 +911,26 @@ func (o *UpdateLoadBalancerPayload) GetPrivateAddress() (res UpdateLoadBalancerP // 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 @@ -764,22 +938,26 @@ func (o *UpdateLoadBalancerPayload) GetRegion() (res UpdateLoadBalancerPayloadGe // 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 @@ -787,22 +965,26 @@ func (o *UpdateLoadBalancerPayload) GetStatus() (res UpdateLoadBalancerPayloadGe // 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 @@ -810,22 +992,26 @@ func (o *UpdateLoadBalancerPayload) GetTargetPools() (res UpdateLoadBalancerPayl // 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 @@ -833,22 +1019,26 @@ func (o *UpdateLoadBalancerPayload) GetTargetSecurityGroup() (res UpdateLoadBala // 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 @@ -856,21 +1046,25 @@ func (o *UpdateLoadBalancerPayload) GetVersion() (res UpdateLoadBalancerPayloadG // 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 { @@ -924,37 +1118,45 @@ func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { 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_target_pool_payload.go b/services/loadbalancer/model_update_target_pool_payload.go index c43a31819..361db01c3 100644 --- a/services/loadbalancer/model_update_target_pool_payload.go +++ b/services/loadbalancer/model_update_target_pool_payload.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateTargetPoolPayload{} */ // 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 @@ -33,6 +40,7 @@ func getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(arg UpdateTar 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 } @@ -42,8 +50,10 @@ func setUpdateTargetPoolPayloadGetActiveHealthCheckAttributeType(arg *UpdateTarg */ // 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 @@ -51,11 +61,15 @@ func getUpdateTargetPoolPayloadGetNameAttributeTypeOk(arg UpdateTargetPoolPayloa 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 /* @@ -63,10 +77,16 @@ type UpdateTargetPoolPayloadGetNameRetType = string */ // 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 @@ -74,6 +94,7 @@ func getUpdateTargetPoolPayloadGetSessionPersistenceAttributeTypeOk(arg UpdateTa 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 } @@ -83,10 +104,16 @@ func setUpdateTargetPoolPayloadGetSessionPersistenceAttributeType(arg *UpdateTar */ // 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 @@ -94,6 +121,7 @@ func getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(arg UpdateTargetPool 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 } @@ -103,10 +131,16 @@ func setUpdateTargetPoolPayloadGetTargetPortAttributeType(arg *UpdateTargetPoolP */ // 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 @@ -114,11 +148,13 @@ func getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(arg UpdateTargetPoolPay 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 @@ -135,6 +171,7 @@ type UpdateTargetPoolPayload struct { // This constructor will assign default values to properties that have it defined, // 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 @@ -143,12 +180,14 @@ func NewUpdateTargetPoolPayload() *UpdateTargetPoolPayload { // 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 @@ -156,22 +195,26 @@ func (o *UpdateTargetPoolPayload) GetActiveHealthCheck() (res UpdateTargetPoolPa // 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 @@ -179,22 +222,26 @@ func (o *UpdateTargetPoolPayload) GetName() (res UpdateTargetPoolPayloadGetNameR // 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 @@ -202,22 +249,26 @@ func (o *UpdateTargetPoolPayload) GetSessionPersistence() (res UpdateTargetPoolP // 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 @@ -225,22 +276,26 @@ func (o *UpdateTargetPoolPayload) GetTargetPort() (res UpdateTargetPoolPayloadGe // 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 @@ -248,21 +303,25 @@ func (o *UpdateTargetPoolPayload) GetTargets() (res UpdateTargetPoolPayloadGetTa // 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 { @@ -283,37 +342,45 @@ func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { 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/oas_commit b/services/loadbalancer/oas_commit index 6a2a7d7b4..bf3189995 100644 --- a/services/loadbalancer/oas_commit +++ b/services/loadbalancer/oas_commit @@ -1 +1 @@ -10774896634990c655a523f5f0fabd6e2be9e216 +3e9c109388be83b40c16d8cb5ab146aa314eb6e8 diff --git a/services/loadbalancer/utils.go b/services/loadbalancer/utils.go index 74e46e339..c9e10724e 100644 --- a/services/loadbalancer/utils.go +++ b/services/loadbalancer/utils.go @@ -18,341 +18,419 @@ import ( ) // 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 @@ -369,13 +447,16 @@ func IsNil(i interface{}) bool { 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 { diff --git a/services/loadbalancer/v1api/api_default.go b/services/loadbalancer/v1api/api_default.go new file mode 100644 index 000000000..42e0ef111 --- /dev/null +++ b/services/loadbalancer/v1api/api_default.go @@ -0,0 +1,2644 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + CreateCredentials Create credentials for observability of the Load Balancer + + Create credentials can be used to store existing credentials, which are valid to be used for Load Balancer Observability. + This means, e.g. when using ARGUS, that credentials first must be created for that ARGUS instance (by using their API) 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 + @return ApiCreateCredentialsRequest + */ + CreateCredentials(ctx context.Context, projectId string) ApiCreateCredentialsRequest + + // CreateCredentialsExecute executes the request + // @return CreateCredentialsResponse + CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*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 + @return ApiCreateLoadBalancerRequest + */ + CreateLoadBalancer(ctx context.Context, projectId string) ApiCreateLoadBalancerRequest + + // CreateLoadBalancerExecute executes the request + // @return LoadBalancer + CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*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 credentialsRef + @return ApiDeleteCredentialsRequest + */ + DeleteCredentials(ctx context.Context, projectId string, credentialsRef string) ApiDeleteCredentialsRequest + + // DeleteCredentialsExecute executes the request + // @return map[string]interface{} + DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (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 name + @return ApiDeleteLoadBalancerRequest + */ + DeleteLoadBalancer(ctx context.Context, projectId string, name string) ApiDeleteLoadBalancerRequest + + // DeleteLoadBalancerExecute executes the request + // @return map[string]interface{} + DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) + + /* + DisableService Disables the functionality of load balancers for the project specified. + + DEPRECATED! Disabling the load balancer functionality is now automatic. The endpoint is kept for compatibility. + Disable will disable the load balancer functionality for the project specified. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiDisableServiceRequest + + Deprecated + */ + DisableService(ctx context.Context, projectId string) ApiDisableServiceRequest + + // DisableServiceExecute executes the request + // @return map[string]interface{} + // Deprecated + DisableServiceExecute(r ApiDisableServiceRequest) (map[string]interface{}, error) + + /* + EnableService Enables the functionality of load balancers for the project specified. + + DEPRECATED! Use CreateLoadBalancer directly instead. + Enable will enable the load balancer functionality for the project specified. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiEnableServiceRequest + + Deprecated + */ + EnableService(ctx context.Context, projectId string) ApiEnableServiceRequest + + // EnableServiceExecute executes the request + // @return map[string]interface{} + // Deprecated + EnableServiceExecute(r ApiEnableServiceRequest) (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 credentialsRef + @return ApiGetCredentialsRequest + */ + GetCredentials(ctx context.Context, projectId string, credentialsRef string) ApiGetCredentialsRequest + + // GetCredentialsExecute executes the request + // @return GetCredentialsResponse + GetCredentialsExecute(r ApiGetCredentialsRequest) (*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 name + @return ApiGetLoadBalancerRequest + */ + GetLoadBalancer(ctx context.Context, projectId string, name string) ApiGetLoadBalancerRequest + + // GetLoadBalancerExecute executes the request + // @return LoadBalancer + GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) + + /* + GetQuota Get the quota for Load Balancers in a project. + + Retrieves the configured Load Balancer quota for the project. Limit can be changed via service request. + There can be 3 times as many observability credentials as Load Balancers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiGetQuotaRequest + */ + GetQuota(ctx context.Context, projectId string) ApiGetQuotaRequest + + // GetQuotaExecute executes the request + // @return GetQuotaResponse + GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) + + /* + GetServiceStatus Return the status of load balancer functionality for the project specified. + + DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. + Status will return the load balancer functionality status for the project specified. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiGetServiceStatusRequest + + Deprecated + */ + GetServiceStatus(ctx context.Context, projectId string) ApiGetServiceStatusRequest + + // GetServiceStatusExecute executes the request + // @return GetServiceStatusResponse + // Deprecated + GetServiceStatusExecute(r ApiGetServiceStatusRequest) (*GetServiceStatusResponse, 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 + @return ApiListCredentialsRequest + */ + ListCredentials(ctx context.Context, projectId string) ApiListCredentialsRequest + + // ListCredentialsExecute executes the request + // @return ListCredentialsResponse + ListCredentialsExecute(r ApiListCredentialsRequest) (*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 + @return ApiListLoadBalancersRequest + */ + ListLoadBalancers(ctx context.Context, projectId string) ApiListLoadBalancersRequest + + // ListLoadBalancersExecute executes the request + // @return ListLoadBalancersResponse + ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*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(). + @return ApiListPlansRequest + */ + ListPlans(ctx context.Context) ApiListPlansRequest + + // ListPlansExecute executes the request + // @return ListPlansResponse + ListPlansExecute(r ApiListPlansRequest) (*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 credentialsRef + @return ApiUpdateCredentialsRequest + */ + UpdateCredentials(ctx context.Context, projectId string, credentialsRef string) ApiUpdateCredentialsRequest + + // UpdateCredentialsExecute executes the request + // @return UpdateCredentialsResponse + UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*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 name + @return ApiUpdateLoadBalancerRequest + */ + UpdateLoadBalancer(ctx context.Context, projectId string, name string) ApiUpdateLoadBalancerRequest + + // UpdateLoadBalancerExecute executes the request + // @return LoadBalancer + UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*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 name + @param targetPoolName + @return ApiUpdateTargetPoolRequest + */ + UpdateTargetPool(ctx context.Context, projectId string, name string, targetPoolName string) ApiUpdateTargetPoolRequest + + // UpdateTargetPoolExecute executes the request + // @return TargetPool + UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCreateCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + createCredentialsPayload *CreateCredentialsPayload + xRequestID *string +} + +func (r ApiCreateCredentialsRequest) CreateCredentialsPayload(createCredentialsPayload CreateCredentialsPayload) ApiCreateCredentialsRequest { + r.createCredentialsPayload = &createCredentialsPayload + return r +} + +func (r ApiCreateCredentialsRequest) XRequestID(xRequestID string) ApiCreateCredentialsRequest { + r.xRequestID = &xRequestID + return r +} + +func (r ApiCreateCredentialsRequest) Execute() (*CreateCredentialsResponse, error) { + return r.ApiService.CreateCredentialsExecute(r) +} + +/* +CreateCredentials Create credentials for observability of the Load Balancer + +Create credentials can be used to store existing credentials, which are valid to be used for Load Balancer Observability. + + This means, e.g. when using ARGUS, that credentials first must be created for that ARGUS instance (by using their API) 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 + @return ApiCreateCredentialsRequest +*/ +func (a *DefaultAPIService) CreateCredentials(ctx context.Context, projectId string) ApiCreateCredentialsRequest { + return ApiCreateCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return CreateCredentialsResponse +func (a *DefaultAPIService) CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateCredentialsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateCredentials") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/credentials" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createCredentialsPayload == nil { + return localVarReturnValue, reportError("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, "simple", "") + } + // body params + localVarPostBody = r.createCredentialsPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateLoadBalancerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + createLoadBalancerPayload *CreateLoadBalancerPayload + xRequestID *string +} + +func (r ApiCreateLoadBalancerRequest) CreateLoadBalancerPayload(createLoadBalancerPayload CreateLoadBalancerPayload) ApiCreateLoadBalancerRequest { + r.createLoadBalancerPayload = &createLoadBalancerPayload + return r +} + +func (r ApiCreateLoadBalancerRequest) XRequestID(xRequestID string) ApiCreateLoadBalancerRequest { + r.xRequestID = &xRequestID + return r +} + +func (r ApiCreateLoadBalancerRequest) Execute() (*LoadBalancer, error) { + return r.ApiService.CreateLoadBalancerExecute(r) +} + +/* +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 + @return ApiCreateLoadBalancerRequest +*/ +func (a *DefaultAPIService) CreateLoadBalancer(ctx context.Context, projectId string) ApiCreateLoadBalancerRequest { + return ApiCreateLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return LoadBalancer +func (a *DefaultAPIService) CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateLoadBalancer") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/load-balancers" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createLoadBalancerPayload == nil { + return localVarReturnValue, reportError("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, "simple", "") + } + // body params + localVarPostBody = r.createLoadBalancerPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + credentialsRef string +} + +func (r ApiDeleteCredentialsRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteCredentialsExecute(r) +} + +/* +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 credentialsRef + @return ApiDeleteCredentialsRequest +*/ +func (a *DefaultAPIService) DeleteCredentials(ctx context.Context, projectId string, credentialsRef string) ApiDeleteCredentialsRequest { + return ApiDeleteCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + credentialsRef: credentialsRef, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteCredentials") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/credentials/{credentialsRef}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteLoadBalancerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + name string +} + +func (r ApiDeleteLoadBalancerRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteLoadBalancerExecute(r) +} + +/* +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 name + @return ApiDeleteLoadBalancerRequest +*/ +func (a *DefaultAPIService) DeleteLoadBalancer(ctx context.Context, projectId string, name string) ApiDeleteLoadBalancerRequest { + return ApiDeleteLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + name: name, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteLoadBalancer") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/load-balancers/{name}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDisableServiceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiDisableServiceRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DisableServiceExecute(r) +} + +/* +DisableService Disables the functionality of load balancers for the project specified. + +DEPRECATED! Disabling the load balancer functionality is now automatic. The endpoint is kept for compatibility. + + Disable will disable the load balancer functionality for the project specified. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiDisableServiceRequest + +Deprecated +*/ +func (a *DefaultAPIService) DisableService(ctx context.Context, projectId string) ApiDisableServiceRequest { + return ApiDisableServiceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +// +// Deprecated +func (a *DefaultAPIService) DisableServiceExecute(r ApiDisableServiceRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DisableService") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiEnableServiceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + xRequestID *string +} + +func (r ApiEnableServiceRequest) XRequestID(xRequestID string) ApiEnableServiceRequest { + r.xRequestID = &xRequestID + return r +} + +func (r ApiEnableServiceRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.EnableServiceExecute(r) +} + +/* +EnableService Enables the functionality of load balancers for the project specified. + +DEPRECATED! Use CreateLoadBalancer directly instead. + + Enable will enable the load balancer functionality for the project specified. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiEnableServiceRequest + +Deprecated +*/ +func (a *DefaultAPIService) EnableService(ctx context.Context, projectId string) ApiEnableServiceRequest { + return ApiEnableServiceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +// +// Deprecated +func (a *DefaultAPIService) EnableServiceExecute(r ApiEnableServiceRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.EnableService") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + if r.xRequestID != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Request-ID", r.xRequestID, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + credentialsRef string +} + +func (r ApiGetCredentialsRequest) Execute() (*GetCredentialsResponse, error) { + return r.ApiService.GetCredentialsExecute(r) +} + +/* +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 credentialsRef + @return ApiGetCredentialsRequest +*/ +func (a *DefaultAPIService) GetCredentials(ctx context.Context, projectId string, credentialsRef string) ApiGetCredentialsRequest { + return ApiGetCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + credentialsRef: credentialsRef, + } +} + +// Execute executes the request +// +// @return GetCredentialsResponse +func (a *DefaultAPIService) GetCredentialsExecute(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetCredentialsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetCredentials") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/credentials/{credentialsRef}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetLoadBalancerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + name string +} + +func (r ApiGetLoadBalancerRequest) Execute() (*LoadBalancer, error) { + return r.ApiService.GetLoadBalancerExecute(r) +} + +/* +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 name + @return ApiGetLoadBalancerRequest +*/ +func (a *DefaultAPIService) GetLoadBalancer(ctx context.Context, projectId string, name string) ApiGetLoadBalancerRequest { + return ApiGetLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + name: name, + } +} + +// Execute executes the request +// +// @return LoadBalancer +func (a *DefaultAPIService) GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetLoadBalancer") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/load-balancers/{name}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetQuotaRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiGetQuotaRequest) Execute() (*GetQuotaResponse, error) { + return r.ApiService.GetQuotaExecute(r) +} + +/* +GetQuota Get the quota for Load Balancers in a project. + +Retrieves the configured Load Balancer quota for the project. Limit can be changed via service request. + + There can be 3 times as many observability credentials as Load Balancers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiGetQuotaRequest +*/ +func (a *DefaultAPIService) GetQuota(ctx context.Context, projectId string) ApiGetQuotaRequest { + return ApiGetQuotaRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return GetQuotaResponse +func (a *DefaultAPIService) GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetQuotaResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetQuota") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/quota" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetServiceStatusRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiGetServiceStatusRequest) Execute() (*GetServiceStatusResponse, error) { + return r.ApiService.GetServiceStatusExecute(r) +} + +/* +GetServiceStatus Return the status of load balancer functionality for the project specified. + +DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. + + Status will return the load balancer functionality status for the project specified. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiGetServiceStatusRequest + +Deprecated +*/ +func (a *DefaultAPIService) GetServiceStatus(ctx context.Context, projectId string) ApiGetServiceStatusRequest { + return ApiGetServiceStatusRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return GetServiceStatusResponse +// +// Deprecated +func (a *DefaultAPIService) GetServiceStatusExecute(r ApiGetServiceStatusRequest) (*GetServiceStatusResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetServiceStatusResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetServiceStatus") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiListCredentialsRequest) Execute() (*ListCredentialsResponse, error) { + return r.ApiService.ListCredentialsExecute(r) +} + +/* +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 + @return ApiListCredentialsRequest +*/ +func (a *DefaultAPIService) ListCredentials(ctx context.Context, projectId string) ApiListCredentialsRequest { + return ApiListCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListCredentialsResponse +func (a *DefaultAPIService) ListCredentialsExecute(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCredentialsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListCredentials") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/credentials" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListLoadBalancersRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + pageSize *string + pageId *string +} + +// page_size specifies how many load balancers should be returned on this page. Must be a positive number <= 1000 +func (r ApiListLoadBalancersRequest) 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 +func (r ApiListLoadBalancersRequest) PageId(pageId string) ApiListLoadBalancersRequest { + r.pageId = &pageId + return r +} + +func (r ApiListLoadBalancersRequest) Execute() (*ListLoadBalancersResponse, error) { + return r.ApiService.ListLoadBalancersExecute(r) +} + +/* +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 + @return ApiListLoadBalancersRequest +*/ +func (a *DefaultAPIService) ListLoadBalancers(ctx context.Context, projectId string) ApiListLoadBalancersRequest { + return ApiListLoadBalancersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListLoadBalancersResponse +func (a *DefaultAPIService) ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListLoadBalancersResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListLoadBalancers") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/load-balancers" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "form", "") + } + if r.pageId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageId", r.pageId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListPlansRequest struct { + ctx context.Context + ApiService DefaultAPI +} + +func (r ApiListPlansRequest) Execute() (*ListPlansResponse, error) { + return r.ApiService.ListPlansExecute(r) +} + +/* +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(). + @return ApiListPlansRequest +*/ +func (a *DefaultAPIService) ListPlans(ctx context.Context) ApiListPlansRequest { + return ApiListPlansRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListPlansResponse +func (a *DefaultAPIService) ListPlansExecute(r ApiListPlansRequest) (*ListPlansResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListPlansResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListPlans") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/plans" + + 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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + credentialsRef string + updateCredentialsPayload *UpdateCredentialsPayload +} + +func (r ApiUpdateCredentialsRequest) UpdateCredentialsPayload(updateCredentialsPayload UpdateCredentialsPayload) ApiUpdateCredentialsRequest { + r.updateCredentialsPayload = &updateCredentialsPayload + return r +} + +func (r ApiUpdateCredentialsRequest) Execute() (*UpdateCredentialsResponse, error) { + return r.ApiService.UpdateCredentialsExecute(r) +} + +/* +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 credentialsRef + @return ApiUpdateCredentialsRequest +*/ +func (a *DefaultAPIService) UpdateCredentials(ctx context.Context, projectId string, credentialsRef string) ApiUpdateCredentialsRequest { + return ApiUpdateCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + credentialsRef: credentialsRef, + } +} + +// Execute executes the request +// +// @return UpdateCredentialsResponse +func (a *DefaultAPIService) UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateCredentialsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateCredentials") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/credentials/{credentialsRef}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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, reportError("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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateLoadBalancerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + name string + updateLoadBalancerPayload *UpdateLoadBalancerPayload +} + +func (r ApiUpdateLoadBalancerRequest) UpdateLoadBalancerPayload(updateLoadBalancerPayload UpdateLoadBalancerPayload) ApiUpdateLoadBalancerRequest { + r.updateLoadBalancerPayload = &updateLoadBalancerPayload + return r +} + +func (r ApiUpdateLoadBalancerRequest) Execute() (*LoadBalancer, error) { + return r.ApiService.UpdateLoadBalancerExecute(r) +} + +/* +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 name + @return ApiUpdateLoadBalancerRequest +*/ +func (a *DefaultAPIService) UpdateLoadBalancer(ctx context.Context, projectId string, name string) ApiUpdateLoadBalancerRequest { + return ApiUpdateLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + name: name, + } +} + +// Execute executes the request +// +// @return LoadBalancer +func (a *DefaultAPIService) UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateLoadBalancer") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/load-balancers/{name}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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, reportError("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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateTargetPoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + name string + targetPoolName string + updateTargetPoolPayload *UpdateTargetPoolPayload +} + +func (r ApiUpdateTargetPoolRequest) UpdateTargetPoolPayload(updateTargetPoolPayload UpdateTargetPoolPayload) ApiUpdateTargetPoolRequest { + r.updateTargetPoolPayload = &updateTargetPoolPayload + return r +} + +func (r ApiUpdateTargetPoolRequest) Execute() (*TargetPool, error) { + return r.ApiService.UpdateTargetPoolExecute(r) +} + +/* +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 name + @param targetPoolName + @return ApiUpdateTargetPoolRequest +*/ +func (a *DefaultAPIService) UpdateTargetPool(ctx context.Context, projectId string, name string, targetPoolName string) ApiUpdateTargetPoolRequest { + return ApiUpdateTargetPoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + name: name, + targetPoolName: targetPoolName, + } +} + +// Execute executes the request +// +// @return TargetPool +func (a *DefaultAPIService) UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TargetPool + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateTargetPool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/load-balancers/{name}/target-pools/{targetPoolName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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, reportError("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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/services/loadbalancer/v1api/api_default_mock.go b/services/loadbalancer/v1api/api_default_mock.go new file mode 100644 index 000000000..17bc11060 --- /dev/null +++ b/services/loadbalancer/v1api/api_default_mock.go @@ -0,0 +1,353 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // CreateCredentialsExecuteMock can be populated to implement the behavior of the CreateCredentialsExecute function of this mock + CreateCredentialsExecuteMock *func(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) + // CreateLoadBalancerExecuteMock can be populated to implement the behavior of the CreateLoadBalancerExecute function of this mock + CreateLoadBalancerExecuteMock *func(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) + // DeleteCredentialsExecuteMock can be populated to implement the behavior of the DeleteCredentialsExecute function of this mock + DeleteCredentialsExecuteMock *func(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) + // DeleteLoadBalancerExecuteMock can be populated to implement the behavior of the DeleteLoadBalancerExecute function of this mock + DeleteLoadBalancerExecuteMock *func(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) + // Deprecated: DisableServiceExecuteMock can be populated to implement the behavior of the DisableServiceExecute function of this mock + DisableServiceExecuteMock *func(r ApiDisableServiceRequest) (map[string]interface{}, error) + // Deprecated: EnableServiceExecuteMock can be populated to implement the behavior of the EnableServiceExecute function of this mock + EnableServiceExecuteMock *func(r ApiEnableServiceRequest) (map[string]interface{}, error) + // GetCredentialsExecuteMock can be populated to implement the behavior of the GetCredentialsExecute function of this mock + GetCredentialsExecuteMock *func(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) + // GetLoadBalancerExecuteMock can be populated to implement the behavior of the GetLoadBalancerExecute function of this mock + GetLoadBalancerExecuteMock *func(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) + // GetQuotaExecuteMock can be populated to implement the behavior of the GetQuotaExecute function of this mock + GetQuotaExecuteMock *func(r ApiGetQuotaRequest) (*GetQuotaResponse, error) + // Deprecated: GetServiceStatusExecuteMock can be populated to implement the behavior of the GetServiceStatusExecute function of this mock + GetServiceStatusExecuteMock *func(r ApiGetServiceStatusRequest) (*GetServiceStatusResponse, error) + // ListCredentialsExecuteMock can be populated to implement the behavior of the ListCredentialsExecute function of this mock + ListCredentialsExecuteMock *func(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) + // ListLoadBalancersExecuteMock can be populated to implement the behavior of the ListLoadBalancersExecute function of this mock + ListLoadBalancersExecuteMock *func(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) + // ListPlansExecuteMock can be populated to implement the behavior of the ListPlansExecute function of this mock + ListPlansExecuteMock *func(r ApiListPlansRequest) (*ListPlansResponse, error) + // UpdateCredentialsExecuteMock can be populated to implement the behavior of the UpdateCredentialsExecute function of this mock + UpdateCredentialsExecuteMock *func(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) + // UpdateLoadBalancerExecuteMock can be populated to implement the behavior of the UpdateLoadBalancerExecute function of this mock + UpdateLoadBalancerExecuteMock *func(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) + // UpdateTargetPoolExecuteMock can be populated to implement the behavior of the UpdateTargetPoolExecute function of this mock + UpdateTargetPoolExecuteMock *func(r ApiUpdateTargetPoolRequest) (*TargetPool, error) +} + +func (a DefaultAPIServiceMock) CreateCredentials(ctx context.Context, projectId string) ApiCreateCredentialsRequest { + return ApiCreateCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// CreateCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) { + if a.CreateCredentialsExecuteMock == nil { + var localVarReturnValue *CreateCredentialsResponse + return localVarReturnValue, nil + } + + return (*a.CreateCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateLoadBalancer(ctx context.Context, projectId string) ApiCreateLoadBalancerRequest { + return ApiCreateLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// CreateLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) { + if a.CreateLoadBalancerExecuteMock == nil { + var localVarReturnValue *LoadBalancer + return localVarReturnValue, nil + } + + return (*a.CreateLoadBalancerExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteCredentials(ctx context.Context, projectId string, credentialsRef string) ApiDeleteCredentialsRequest { + return ApiDeleteCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + credentialsRef: credentialsRef, + } +} + +// DeleteCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) { + if a.DeleteCredentialsExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteLoadBalancer(ctx context.Context, projectId string, name string) ApiDeleteLoadBalancerRequest { + return ApiDeleteLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + name: name, + } +} + +// DeleteLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) { + if a.DeleteLoadBalancerExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteLoadBalancerExecuteMock)(r) +} + +// Deprecated +func (a DefaultAPIServiceMock) DisableService(ctx context.Context, projectId string) ApiDisableServiceRequest { + return ApiDisableServiceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Deprecated: DisableServiceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DisableServiceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DisableServiceExecute(r ApiDisableServiceRequest) (map[string]interface{}, error) { + if a.DisableServiceExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DisableServiceExecuteMock)(r) +} + +// Deprecated +func (a DefaultAPIServiceMock) EnableService(ctx context.Context, projectId string) ApiEnableServiceRequest { + return ApiEnableServiceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Deprecated: EnableServiceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the EnableServiceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) EnableServiceExecute(r ApiEnableServiceRequest) (map[string]interface{}, error) { + if a.EnableServiceExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.EnableServiceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetCredentials(ctx context.Context, projectId string, credentialsRef string) ApiGetCredentialsRequest { + return ApiGetCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + credentialsRef: credentialsRef, + } +} + +// GetCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetCredentialsExecute(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) { + if a.GetCredentialsExecuteMock == nil { + var localVarReturnValue *GetCredentialsResponse + return localVarReturnValue, nil + } + + return (*a.GetCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetLoadBalancer(ctx context.Context, projectId string, name string) ApiGetLoadBalancerRequest { + return ApiGetLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + name: name, + } +} + +// GetLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) { + if a.GetLoadBalancerExecuteMock == nil { + var localVarReturnValue *LoadBalancer + return localVarReturnValue, nil + } + + return (*a.GetLoadBalancerExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetQuota(ctx context.Context, projectId string) ApiGetQuotaRequest { + return ApiGetQuotaRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// GetQuotaExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetQuotaExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) { + if a.GetQuotaExecuteMock == nil { + var localVarReturnValue *GetQuotaResponse + return localVarReturnValue, nil + } + + return (*a.GetQuotaExecuteMock)(r) +} + +// Deprecated +func (a DefaultAPIServiceMock) GetServiceStatus(ctx context.Context, projectId string) ApiGetServiceStatusRequest { + return ApiGetServiceStatusRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Deprecated: GetServiceStatusExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetServiceStatusExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetServiceStatusExecute(r ApiGetServiceStatusRequest) (*GetServiceStatusResponse, error) { + if a.GetServiceStatusExecuteMock == nil { + var localVarReturnValue *GetServiceStatusResponse + return localVarReturnValue, nil + } + + return (*a.GetServiceStatusExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListCredentials(ctx context.Context, projectId string) ApiListCredentialsRequest { + return ApiListCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListCredentialsExecute(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) { + if a.ListCredentialsExecuteMock == nil { + var localVarReturnValue *ListCredentialsResponse + return localVarReturnValue, nil + } + + return (*a.ListCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListLoadBalancers(ctx context.Context, projectId string) ApiListLoadBalancersRequest { + return ApiListLoadBalancersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListLoadBalancersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListLoadBalancersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) { + if a.ListLoadBalancersExecuteMock == nil { + var localVarReturnValue *ListLoadBalancersResponse + return localVarReturnValue, nil + } + + return (*a.ListLoadBalancersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListPlans(ctx context.Context) ApiListPlansRequest { + return ApiListPlansRequest{ + ApiService: a, + ctx: ctx, + } +} + +// ListPlansExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListPlansExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListPlansExecute(r ApiListPlansRequest) (*ListPlansResponse, error) { + if a.ListPlansExecuteMock == nil { + var localVarReturnValue *ListPlansResponse + return localVarReturnValue, nil + } + + return (*a.ListPlansExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateCredentials(ctx context.Context, projectId string, credentialsRef string) ApiUpdateCredentialsRequest { + return ApiUpdateCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + credentialsRef: credentialsRef, + } +} + +// UpdateCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) { + if a.UpdateCredentialsExecuteMock == nil { + var localVarReturnValue *UpdateCredentialsResponse + return localVarReturnValue, nil + } + + return (*a.UpdateCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateLoadBalancer(ctx context.Context, projectId string, name string) ApiUpdateLoadBalancerRequest { + return ApiUpdateLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + name: name, + } +} + +// UpdateLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) { + if a.UpdateLoadBalancerExecuteMock == nil { + var localVarReturnValue *LoadBalancer + return localVarReturnValue, nil + } + + return (*a.UpdateLoadBalancerExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateTargetPool(ctx context.Context, projectId string, name string, targetPoolName string) ApiUpdateTargetPoolRequest { + return ApiUpdateTargetPoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + name: name, + targetPoolName: targetPoolName, + } +} + +// UpdateTargetPoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateTargetPoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) { + if a.UpdateTargetPoolExecuteMock == nil { + var localVarReturnValue *TargetPool + return localVarReturnValue, nil + } + + return (*a.UpdateTargetPoolExecuteMock)(r) +} diff --git a/services/loadbalancer/v1api/client.go b/services/loadbalancer/v1api/client.go new file mode 100644 index 000000000..b3f27cf59 --- /dev/null +++ b/services/loadbalancer/v1api/client.go @@ -0,0 +1,658 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/stackitcloud/stackit-sdk-go/core/auth" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the STACKIT Network Load Balancer API API v1.7.2 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *config.Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultAPI DefaultAPI +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { + cfg := NewConfiguration() + + for _, option := range opts { + err := option(cfg) + if err != nil { + return nil, fmt.Errorf("configuring the client: %w", err) + } + } + + err := config.ConfigureRegion(cfg) + if err != nil { + return nil, fmt.Errorf("configuring region: %w", err) + } + + if cfg.HTTPClient == nil { + cfg.HTTPClient = &http.Client{} + } + + authRoundTripper, err := auth.SetupAuth(cfg) + if err != nil { + return nil, fmt.Errorf("setting up authentication: %w", err) + } + + roundTripper := authRoundTripper + if cfg.Middleware != nil { + roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) + } + + cfg.HTTPClient.Transport = roundTripper + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.DefaultAPI = (*DefaultAPIService)(&c.common) + + return c, nil +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *config.Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/loadbalancer/v1api/configuration.go b/services/loadbalancer/v1api/configuration.go new file mode 100644 index 000000000..30e5d720d --- /dev/null +++ b/services/loadbalancer/v1api/configuration.go @@ -0,0 +1,40 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *config.Configuration { + cfg := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "stackit-sdk-go/loadbalancer", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://load-balancer.api.{region}stackit.cloud", + Description: "No description provided", + Variables: map[string]config.ServerVariable{ + "region": { + Description: "No description provided", + DefaultValue: "eu01.", + EnumValues: []string{ + "eu01.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + return cfg +} diff --git a/services/loadbalancer/v1api/model_active_health_check.go b/services/loadbalancer/v1api/model_active_health_check.go new file mode 100644 index 000000000..dae3a9c3d --- /dev/null +++ b/services/loadbalancer/v1api/model_active_health_check.go @@ -0,0 +1,273 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ActiveHealthCheck type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActiveHealthCheck{} + +// ActiveHealthCheck struct for ActiveHealthCheck +type ActiveHealthCheck struct { + // Healthy threshold of the health checking + HealthyThreshold *int32 `json:"healthyThreshold,omitempty"` + // Interval duration of health checking in seconds + Interval *string `json:"interval,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` + // Interval duration threshold of the health checking in seconds + IntervalJitter *string `json:"intervalJitter,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` + // Active health checking timeout duration in seconds + Timeout *string `json:"timeout,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` + // Unhealthy threshold of the health checking + UnhealthyThreshold *int32 `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 +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 +func NewActiveHealthCheckWithDefaults() *ActiveHealthCheck { + this := ActiveHealthCheck{} + return &this +} + +// GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetHealthyThreshold() int32 { + if o == nil || IsNil(o.HealthyThreshold) { + var ret int32 + return ret + } + return *o.HealthyThreshold +} + +// GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetHealthyThresholdOk() (*int32, bool) { + if o == nil || IsNil(o.HealthyThreshold) { + return nil, false + } + return o.HealthyThreshold, true +} + +// HasHealthyThreshold returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasHealthyThreshold() bool { + if o != nil && !IsNil(o.HealthyThreshold) { + return true + } + + return false +} + +// SetHealthyThreshold gets a reference to the given int32 and assigns it to the HealthyThreshold field. +func (o *ActiveHealthCheck) SetHealthyThreshold(v int32) { + o.HealthyThreshold = &v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetInterval() string { + if o == nil || IsNil(o.Interval) { + var ret string + return ret + } + return *o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetIntervalOk() (*string, bool) { + if o == nil || IsNil(o.Interval) { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasInterval() bool { + if o != nil && !IsNil(o.Interval) { + return true + } + + return false +} + +// SetInterval gets a reference to the given string and assigns it to the Interval field. +func (o *ActiveHealthCheck) SetInterval(v string) { + o.Interval = &v +} + +// GetIntervalJitter returns the IntervalJitter field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetIntervalJitter() string { + if o == nil || IsNil(o.IntervalJitter) { + var ret string + return ret + } + return *o.IntervalJitter +} + +// GetIntervalJitterOk returns a tuple with the IntervalJitter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetIntervalJitterOk() (*string, bool) { + if o == nil || IsNil(o.IntervalJitter) { + return nil, false + } + return o.IntervalJitter, true +} + +// HasIntervalJitter returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasIntervalJitter() bool { + if o != nil && !IsNil(o.IntervalJitter) { + return true + } + + return false +} + +// SetIntervalJitter gets a reference to the given string and assigns it to the IntervalJitter field. +func (o *ActiveHealthCheck) SetIntervalJitter(v string) { + o.IntervalJitter = &v +} + +// GetTimeout returns the Timeout field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetTimeout() string { + if o == nil || IsNil(o.Timeout) { + var ret string + return ret + } + return *o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.Timeout) { + return nil, false + } + return o.Timeout, true +} + +// HasTimeout returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasTimeout() bool { + if o != nil && !IsNil(o.Timeout) { + return true + } + + return false +} + +// SetTimeout gets a reference to the given string and assigns it to the Timeout field. +func (o *ActiveHealthCheck) SetTimeout(v string) { + o.Timeout = &v +} + +// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetUnhealthyThreshold() int32 { + if o == nil || IsNil(o.UnhealthyThreshold) { + var ret int32 + return ret + } + return *o.UnhealthyThreshold +} + +// GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (*int32, bool) { + if o == nil || IsNil(o.UnhealthyThreshold) { + return nil, false + } + return o.UnhealthyThreshold, true +} + +// HasUnhealthyThreshold returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasUnhealthyThreshold() bool { + if o != nil && !IsNil(o.UnhealthyThreshold) { + return true + } + + return false +} + +// SetUnhealthyThreshold gets a reference to the given int32 and assigns it to the UnhealthyThreshold field. +func (o *ActiveHealthCheck) SetUnhealthyThreshold(v int32) { + o.UnhealthyThreshold = &v +} + +func (o ActiveHealthCheck) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.HealthyThreshold) { + toSerialize["healthyThreshold"] = o.HealthyThreshold + } + if !IsNil(o.Interval) { + toSerialize["interval"] = o.Interval + } + if !IsNil(o.IntervalJitter) { + toSerialize["intervalJitter"] = o.IntervalJitter + } + if !IsNil(o.Timeout) { + toSerialize["timeout"] = o.Timeout + } + if !IsNil(o.UnhealthyThreshold) { + toSerialize["unhealthyThreshold"] = o.UnhealthyThreshold + } + return toSerialize, nil +} + +type NullableActiveHealthCheck struct { + value *ActiveHealthCheck + isSet bool +} + +func (v NullableActiveHealthCheck) Get() *ActiveHealthCheck { + return v.value +} + +func (v *NullableActiveHealthCheck) Set(val *ActiveHealthCheck) { + v.value = val + v.isSet = true +} + +func (v NullableActiveHealthCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableActiveHealthCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActiveHealthCheck(val *ActiveHealthCheck) *NullableActiveHealthCheck { + return &NullableActiveHealthCheck{value: val, isSet: true} +} + +func (v NullableActiveHealthCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActiveHealthCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_create_credentials_payload.go b/services/loadbalancer/v1api/model_create_credentials_payload.go new file mode 100644 index 000000000..cc6807188 --- /dev/null +++ b/services/loadbalancer/v1api/model_create_credentials_payload.go @@ -0,0 +1,199 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateCredentialsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCredentialsPayload{} + +// CreateCredentialsPayload struct for CreateCredentialsPayload +type CreateCredentialsPayload struct { + // Credential name + DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` + // A valid password used for an existing ARGUS instance, which is used during basic auth. + Password *string `json:"password,omitempty"` + // A valid username used for an existing ARGUS instance, which is used during basic auth. + Username *string `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 +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 +func NewCreateCredentialsPayloadWithDefaults() *CreateCredentialsPayload { + this := CreateCredentialsPayload{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *CreateCredentialsPayload) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *CreateCredentialsPayload) SetPassword(v string) { + o.Password = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreateCredentialsPayload) SetUsername(v string) { + o.Username = &v +} + +func (o CreateCredentialsPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableCreateCredentialsPayload struct { + value *CreateCredentialsPayload + isSet bool +} + +func (v NullableCreateCredentialsPayload) Get() *CreateCredentialsPayload { + return v.value +} + +func (v *NullableCreateCredentialsPayload) Set(val *CreateCredentialsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCredentialsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCredentialsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCredentialsPayload(val *CreateCredentialsPayload) *NullableCreateCredentialsPayload { + return &NullableCreateCredentialsPayload{value: val, isSet: true} +} + +func (v NullableCreateCredentialsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCredentialsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_create_credentials_response.go b/services/loadbalancer/v1api/model_create_credentials_response.go new file mode 100644 index 000000000..83a76a382 --- /dev/null +++ b/services/loadbalancer/v1api/model_create_credentials_response.go @@ -0,0 +1,124 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCredentialsResponse{} + +// CreateCredentialsResponse struct for CreateCredentialsResponse +type CreateCredentialsResponse struct { + Credential *CredentialsResponse `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 +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 +func NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse { + this := CreateCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *CreateCredentialsResponse) GetCredential() CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret CredentialsResponse + return ret + } + return *o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *CreateCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *CreateCredentialsResponse) SetCredential(v CredentialsResponse) { + o.Credential = &v +} + +func (o CreateCredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableCreateCredentialsResponse struct { + value *CreateCredentialsResponse + isSet bool +} + +func (v NullableCreateCredentialsResponse) Get() *CreateCredentialsResponse { + return v.value +} + +func (v *NullableCreateCredentialsResponse) Set(val *CreateCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCredentialsResponse(val *CreateCredentialsResponse) *NullableCreateCredentialsResponse { + return &NullableCreateCredentialsResponse{value: val, isSet: true} +} + +func (v NullableCreateCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_create_load_balancer_payload.go b/services/loadbalancer/v1api/model_create_load_balancer_payload.go new file mode 100644 index 000000000..88a6f66f0 --- /dev/null +++ b/services/loadbalancer/v1api/model_create_load_balancer_payload.go @@ -0,0 +1,493 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateLoadBalancerPayload{} + +// CreateLoadBalancerPayload struct for CreateLoadBalancerPayload +type CreateLoadBalancerPayload struct { + // Reports all errors a load balancer has. + Errors []LoadBalancerError `json:"errors,omitempty"` + // External load balancer IP address where this load balancer is exposed. Not changeable after creation. + ExternalAddress *string `json:"externalAddress,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 []Listener `json:"listeners,omitempty"` + // Load balancer name. Not changeable after creation. + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. + Networks []Network `json:"networks,omitempty"` + Options *LoadBalancerOptions `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 *string `json:"planId,omitempty"` + // Transient private load balancer IP address that can change any time. + PrivateAddress *string `json:"privateAddress,omitempty"` + Status *string `json:"status,omitempty"` + // List of all target pools which will be used in the load balancer. Limited to 20. + TargetPools []TargetPool `json:"targetPools,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 *string `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 +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 +func NewCreateLoadBalancerPayloadWithDefaults() *CreateLoadBalancerPayload { + this := CreateLoadBalancerPayload{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetErrors() []LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret []LoadBalancerError + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetErrorsOk() ([]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *CreateLoadBalancerPayload) SetErrors(v []LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetExternalAddress() string { + if o == nil || IsNil(o.ExternalAddress) { + var ret string + return ret + } + return *o.ExternalAddress +} + +// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetExternalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *CreateLoadBalancerPayload) SetExternalAddress(v string) { + o.ExternalAddress = &v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetListeners() []Listener { + if o == nil || IsNil(o.Listeners) { + var ret []Listener + return ret + } + return o.Listeners +} + +// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetListenersOk() ([]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *CreateLoadBalancerPayload) SetListeners(v []Listener) { + o.Listeners = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateLoadBalancerPayload) SetName(v string) { + o.Name = &v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetNetworks() []Network { + if o == nil || IsNil(o.Networks) { + var ret []Network + return ret + } + return o.Networks +} + +// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetNetworksOk() ([]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *CreateLoadBalancerPayload) SetNetworks(v []Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetOptions() LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret LoadBalancerOptions + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetOptionsOk() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *CreateLoadBalancerPayload) SetOptions(v LoadBalancerOptions) { + o.Options = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *CreateLoadBalancerPayload) SetPlanId(v string) { + o.PlanId = &v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetPrivateAddress() string { + if o == nil || IsNil(o.PrivateAddress) { + var ret string + return ret + } + return *o.PrivateAddress +} + +// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetPrivateAddressOk() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *CreateLoadBalancerPayload) SetPrivateAddress(v string) { + o.PrivateAddress = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CreateLoadBalancerPayload) SetStatus(v string) { + o.Status = &v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetTargetPools() []TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret []TargetPool + return ret + } + return o.TargetPools +} + +// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetTargetPoolsOk() ([]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *CreateLoadBalancerPayload) SetTargetPools(v []TargetPool) { + o.TargetPools = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *CreateLoadBalancerPayload) SetVersion(v string) { + o.Version = &v +} + +func (o CreateLoadBalancerPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableCreateLoadBalancerPayload struct { + value *CreateLoadBalancerPayload + isSet bool +} + +func (v NullableCreateLoadBalancerPayload) Get() *CreateLoadBalancerPayload { + return v.value +} + +func (v *NullableCreateLoadBalancerPayload) Set(val *CreateLoadBalancerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateLoadBalancerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateLoadBalancerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateLoadBalancerPayload(val *CreateLoadBalancerPayload) *NullableCreateLoadBalancerPayload { + return &NullableCreateLoadBalancerPayload{value: val, isSet: true} +} + +func (v NullableCreateLoadBalancerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateLoadBalancerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_credentials_response.go b/services/loadbalancer/v1api/model_credentials_response.go new file mode 100644 index 000000000..ec3b45ffa --- /dev/null +++ b/services/loadbalancer/v1api/model_credentials_response.go @@ -0,0 +1,199 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialsResponse{} + +// CredentialsResponse struct for CredentialsResponse +type CredentialsResponse struct { + // The credentials reference can be used for observability of the Load Balancer. + CredentialsRef *string `json:"credentialsRef,omitempty"` + // Credential name + DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + // The username used for the ARGUS instance + Username *string `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 +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 +func NewCredentialsResponseWithDefaults() *CredentialsResponse { + this := CredentialsResponse{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *CredentialsResponse) GetCredentialsRef() string { + if o == nil || IsNil(o.CredentialsRef) { + var ret string + return ret + } + return *o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *CredentialsResponse) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *CredentialsResponse) SetCredentialsRef(v string) { + o.CredentialsRef = &v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *CredentialsResponse) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *CredentialsResponse) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *CredentialsResponse) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CredentialsResponse) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CredentialsResponse) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CredentialsResponse) SetUsername(v string) { + o.Username = &v +} + +func (o CredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableCredentialsResponse struct { + value *CredentialsResponse + isSet bool +} + +func (v NullableCredentialsResponse) Get() *CredentialsResponse { + return v.value +} + +func (v *NullableCredentialsResponse) Set(val *CredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialsResponse(val *CredentialsResponse) *NullableCredentialsResponse { + return &NullableCredentialsResponse{value: val, isSet: true} +} + +func (v NullableCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_get_credentials_response.go b/services/loadbalancer/v1api/model_get_credentials_response.go new file mode 100644 index 000000000..6dd28cfd1 --- /dev/null +++ b/services/loadbalancer/v1api/model_get_credentials_response.go @@ -0,0 +1,124 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetCredentialsResponse{} + +// GetCredentialsResponse struct for GetCredentialsResponse +type GetCredentialsResponse struct { + Credential *CredentialsResponse `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 +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 +func NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse { + this := GetCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *GetCredentialsResponse) GetCredential() CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret CredentialsResponse + return ret + } + return *o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *GetCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *GetCredentialsResponse) SetCredential(v CredentialsResponse) { + o.Credential = &v +} + +func (o GetCredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableGetCredentialsResponse struct { + value *GetCredentialsResponse + isSet bool +} + +func (v NullableGetCredentialsResponse) Get() *GetCredentialsResponse { + return v.value +} + +func (v *NullableGetCredentialsResponse) Set(val *GetCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCredentialsResponse(val *GetCredentialsResponse) *NullableGetCredentialsResponse { + return &NullableGetCredentialsResponse{value: val, isSet: true} +} + +func (v NullableGetCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_get_quota_response.go b/services/loadbalancer/v1api/model_get_quota_response.go new file mode 100644 index 000000000..fce2c95bb --- /dev/null +++ b/services/loadbalancer/v1api/model_get_quota_response.go @@ -0,0 +1,162 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetQuotaResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetQuotaResponse{} + +// GetQuotaResponse struct for GetQuotaResponse +type GetQuotaResponse struct { + // The maximum number of load balancing servers in this project. Unlimited if set to -1. + MaxLoadBalancers *int32 `json:"maxLoadBalancers,omitempty"` + // Project identifier + ProjectId *string `json:"projectId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"` +} + +// 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 +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 +func NewGetQuotaResponseWithDefaults() *GetQuotaResponse { + this := GetQuotaResponse{} + return &this +} + +// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetMaxLoadBalancers() int32 { + if o == nil || IsNil(o.MaxLoadBalancers) { + var ret int32 + return ret + } + return *o.MaxLoadBalancers +} + +// GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (*int32, bool) { + if o == nil || IsNil(o.MaxLoadBalancers) { + return nil, false + } + return o.MaxLoadBalancers, true +} + +// HasMaxLoadBalancers returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasMaxLoadBalancers() bool { + if o != nil && !IsNil(o.MaxLoadBalancers) { + return true + } + + return false +} + +// SetMaxLoadBalancers gets a reference to the given int32 and assigns it to the MaxLoadBalancers field. +func (o *GetQuotaResponse) SetMaxLoadBalancers(v int32) { + o.MaxLoadBalancers = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GetQuotaResponse) SetProjectId(v string) { + o.ProjectId = &v +} + +func (o GetQuotaResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MaxLoadBalancers) { + toSerialize["maxLoadBalancers"] = o.MaxLoadBalancers + } + if !IsNil(o.ProjectId) { + toSerialize["projectId"] = o.ProjectId + } + return toSerialize, nil +} + +type NullableGetQuotaResponse struct { + value *GetQuotaResponse + isSet bool +} + +func (v NullableGetQuotaResponse) Get() *GetQuotaResponse { + return v.value +} + +func (v *NullableGetQuotaResponse) Set(val *GetQuotaResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetQuotaResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetQuotaResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetQuotaResponse(val *GetQuotaResponse) *NullableGetQuotaResponse { + return &NullableGetQuotaResponse{value: val, isSet: true} +} + +func (v NullableGetQuotaResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetQuotaResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_get_service_status_response.go b/services/loadbalancer/v1api/model_get_service_status_response.go new file mode 100644 index 000000000..93f32eb97 --- /dev/null +++ b/services/loadbalancer/v1api/model_get_service_status_response.go @@ -0,0 +1,125 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetServiceStatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetServiceStatusResponse{} + +// GetServiceStatusResponse Response with customer project status. +type GetServiceStatusResponse struct { + // status of the project + Status *string `json:"status,omitempty"` +} + +// NewGetServiceStatusResponse instantiates a new GetServiceStatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetServiceStatusResponse() *GetServiceStatusResponse { + this := GetServiceStatusResponse{} + return &this +} + +// NewGetServiceStatusResponseWithDefaults instantiates a new GetServiceStatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetServiceStatusResponseWithDefaults() *GetServiceStatusResponse { + this := GetServiceStatusResponse{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetServiceStatusResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetServiceStatusResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetServiceStatusResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *GetServiceStatusResponse) SetStatus(v string) { + o.Status = &v +} + +func (o GetServiceStatusResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetServiceStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableGetServiceStatusResponse struct { + value *GetServiceStatusResponse + isSet bool +} + +func (v NullableGetServiceStatusResponse) Get() *GetServiceStatusResponse { + return v.value +} + +func (v *NullableGetServiceStatusResponse) Set(val *GetServiceStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetServiceStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetServiceStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetServiceStatusResponse(val *GetServiceStatusResponse) *NullableGetServiceStatusResponse { + return &NullableGetServiceStatusResponse{value: val, isSet: true} +} + +func (v NullableGetServiceStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetServiceStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_google_protobuf_any.go b/services/loadbalancer/v1api/model_google_protobuf_any.go new file mode 100644 index 000000000..3261989cb --- /dev/null +++ b/services/loadbalancer/v1api/model_google_protobuf_any.go @@ -0,0 +1,154 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GoogleProtobufAny{} + +// GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +type GoogleProtobufAny struct { + // The type of the serialized message. + Type *string `json:"@type,omitempty"` + AdditionalProperties map[string]interface{} +} + +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 +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 +func NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny { + this := GoogleProtobufAny{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GoogleProtobufAny) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleProtobufAny) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GoogleProtobufAny) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GoogleProtobufAny) SetType(v string) { + o.Type = &v +} + +func (o GoogleProtobufAny) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["@type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GoogleProtobufAny) UnmarshalJSON(data []byte) (err error) { + varGoogleProtobufAny := _GoogleProtobufAny{} + + err = json.Unmarshal(data, &varGoogleProtobufAny) + + if err != nil { + return err + } + + *o = GoogleProtobufAny(varGoogleProtobufAny) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "@type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGoogleProtobufAny struct { + value *GoogleProtobufAny + isSet bool +} + +func (v NullableGoogleProtobufAny) Get() *GoogleProtobufAny { + return v.value +} + +func (v *NullableGoogleProtobufAny) Set(val *GoogleProtobufAny) { + v.value = val + v.isSet = true +} + +func (v NullableGoogleProtobufAny) IsSet() bool { + return v.isSet +} + +func (v *NullableGoogleProtobufAny) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGoogleProtobufAny(val *GoogleProtobufAny) *NullableGoogleProtobufAny { + return &NullableGoogleProtobufAny{value: val, isSet: true} +} + +func (v NullableGoogleProtobufAny) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGoogleProtobufAny) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_list_credentials_response.go b/services/loadbalancer/v1api/model_list_credentials_response.go new file mode 100644 index 000000000..56a2ff02e --- /dev/null +++ b/services/loadbalancer/v1api/model_list_credentials_response.go @@ -0,0 +1,124 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCredentialsResponse{} + +// ListCredentialsResponse struct for ListCredentialsResponse +type ListCredentialsResponse struct { + Credentials []CredentialsResponse `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 +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 +func NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { + this := ListCredentialsResponse{} + return &this +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *ListCredentialsResponse) GetCredentials() []CredentialsResponse { + if o == nil || IsNil(o.Credentials) { + var ret []CredentialsResponse + return ret + } + return o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCredentialsResponse) GetCredentialsOk() ([]CredentialsResponse, bool) { + if o == nil || IsNil(o.Credentials) { + return nil, false + } + return o.Credentials, true +} + +// HasCredentials returns a boolean if a field has been set. +func (o *ListCredentialsResponse) HasCredentials() bool { + if o != nil && !IsNil(o.Credentials) { + return true + } + + return false +} + +// SetCredentials gets a reference to the given []CredentialsResponse and assigns it to the Credentials field. +func (o *ListCredentialsResponse) SetCredentials(v []CredentialsResponse) { + o.Credentials = v +} + +func (o ListCredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credentials) { + toSerialize["credentials"] = o.Credentials + } + return toSerialize, nil +} + +type NullableListCredentialsResponse struct { + value *ListCredentialsResponse + isSet bool +} + +func (v NullableListCredentialsResponse) Get() *ListCredentialsResponse { + return v.value +} + +func (v *NullableListCredentialsResponse) Set(val *ListCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCredentialsResponse(val *ListCredentialsResponse) *NullableListCredentialsResponse { + return &NullableListCredentialsResponse{value: val, isSet: true} +} + +func (v NullableListCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_list_load_balancers_response.go b/services/loadbalancer/v1api/model_list_load_balancers_response.go new file mode 100644 index 000000000..3628f3ef0 --- /dev/null +++ b/services/loadbalancer/v1api/model_list_load_balancers_response.go @@ -0,0 +1,161 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListLoadBalancersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListLoadBalancersResponse{} + +// ListLoadBalancersResponse struct for ListLoadBalancersResponse +type ListLoadBalancersResponse struct { + LoadBalancers []LoadBalancer `json:"loadBalancers,omitempty"` + // Continue token from the ListLoadBalancerResponse with Limit option + NextPageId *string `json:"nextPageId,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` +} + +// 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 +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 +func NewListLoadBalancersResponseWithDefaults() *ListLoadBalancersResponse { + this := ListLoadBalancersResponse{} + return &this +} + +// GetLoadBalancers returns the LoadBalancers field value if set, zero value otherwise. +func (o *ListLoadBalancersResponse) GetLoadBalancers() []LoadBalancer { + if o == nil || IsNil(o.LoadBalancers) { + var ret []LoadBalancer + return ret + } + return o.LoadBalancers +} + +// GetLoadBalancersOk returns a tuple with the LoadBalancers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLoadBalancersResponse) GetLoadBalancersOk() ([]LoadBalancer, bool) { + if o == nil || IsNil(o.LoadBalancers) { + return nil, false + } + return o.LoadBalancers, true +} + +// HasLoadBalancers returns a boolean if a field has been set. +func (o *ListLoadBalancersResponse) HasLoadBalancers() bool { + if o != nil && !IsNil(o.LoadBalancers) { + return true + } + + return false +} + +// SetLoadBalancers gets a reference to the given []LoadBalancer and assigns it to the LoadBalancers field. +func (o *ListLoadBalancersResponse) SetLoadBalancers(v []LoadBalancer) { + o.LoadBalancers = v +} + +// GetNextPageId returns the NextPageId field value if set, zero value otherwise. +func (o *ListLoadBalancersResponse) GetNextPageId() string { + if o == nil || IsNil(o.NextPageId) { + var ret string + return ret + } + return *o.NextPageId +} + +// GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLoadBalancersResponse) GetNextPageIdOk() (*string, bool) { + if o == nil || IsNil(o.NextPageId) { + return nil, false + } + return o.NextPageId, true +} + +// HasNextPageId returns a boolean if a field has been set. +func (o *ListLoadBalancersResponse) HasNextPageId() bool { + if o != nil && !IsNil(o.NextPageId) { + return true + } + + return false +} + +// SetNextPageId gets a reference to the given string and assigns it to the NextPageId field. +func (o *ListLoadBalancersResponse) SetNextPageId(v string) { + o.NextPageId = &v +} + +func (o ListLoadBalancersResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LoadBalancers) { + toSerialize["loadBalancers"] = o.LoadBalancers + } + if !IsNil(o.NextPageId) { + toSerialize["nextPageId"] = o.NextPageId + } + return toSerialize, nil +} + +type NullableListLoadBalancersResponse struct { + value *ListLoadBalancersResponse + isSet bool +} + +func (v NullableListLoadBalancersResponse) Get() *ListLoadBalancersResponse { + return v.value +} + +func (v *NullableListLoadBalancersResponse) Set(val *ListLoadBalancersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListLoadBalancersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListLoadBalancersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListLoadBalancersResponse(val *ListLoadBalancersResponse) *NullableListLoadBalancersResponse { + return &NullableListLoadBalancersResponse{value: val, isSet: true} +} + +func (v NullableListLoadBalancersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListLoadBalancersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_list_plans_response.go b/services/loadbalancer/v1api/model_list_plans_response.go new file mode 100644 index 000000000..b9d1bca54 --- /dev/null +++ b/services/loadbalancer/v1api/model_list_plans_response.go @@ -0,0 +1,124 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListPlansResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPlansResponse{} + +// ListPlansResponse struct for ListPlansResponse +type ListPlansResponse struct { + ValidPlans []PlanDetails `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 +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 +func NewListPlansResponseWithDefaults() *ListPlansResponse { + this := ListPlansResponse{} + return &this +} + +// GetValidPlans returns the ValidPlans field value if set, zero value otherwise. +func (o *ListPlansResponse) GetValidPlans() []PlanDetails { + if o == nil || IsNil(o.ValidPlans) { + var ret []PlanDetails + return ret + } + return o.ValidPlans +} + +// GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListPlansResponse) GetValidPlansOk() ([]PlanDetails, bool) { + if o == nil || IsNil(o.ValidPlans) { + return nil, false + } + return o.ValidPlans, true +} + +// HasValidPlans returns a boolean if a field has been set. +func (o *ListPlansResponse) HasValidPlans() bool { + if o != nil && !IsNil(o.ValidPlans) { + return true + } + + return false +} + +// SetValidPlans gets a reference to the given []PlanDetails and assigns it to the ValidPlans field. +func (o *ListPlansResponse) SetValidPlans(v []PlanDetails) { + o.ValidPlans = v +} + +func (o ListPlansResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListPlansResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ValidPlans) { + toSerialize["validPlans"] = o.ValidPlans + } + return toSerialize, nil +} + +type NullableListPlansResponse struct { + value *ListPlansResponse + isSet bool +} + +func (v NullableListPlansResponse) Get() *ListPlansResponse { + return v.value +} + +func (v *NullableListPlansResponse) Set(val *ListPlansResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListPlansResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListPlansResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListPlansResponse(val *ListPlansResponse) *NullableListPlansResponse { + return &NullableListPlansResponse{value: val, isSet: true} +} + +func (v NullableListPlansResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListPlansResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_listener.go b/services/loadbalancer/v1api/model_listener.go new file mode 100644 index 000000000..c03962eb6 --- /dev/null +++ b/services/loadbalancer/v1api/model_listener.go @@ -0,0 +1,381 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Listener type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Listener{} + +// Listener struct for Listener +type Listener struct { + DisplayName *string `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 *string `json:"name,omitempty"` + // Port number where we listen for traffic + Port *int32 `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 *string `json:"protocol,omitempty"` + // Server Name Idicators config for domains to be routed to the desired target pool for this listener. + ServerNameIndicators []ServerNameIndicator `json:"serverNameIndicators,omitempty"` + // Reference target pool by target pool name. + TargetPool *string `json:"targetPool,omitempty"` + Tcp *OptionsTCP `json:"tcp,omitempty"` + Udp *OptionsUDP `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 +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 +func NewListenerWithDefaults() *Listener { + this := Listener{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *Listener) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *Listener) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *Listener) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Listener) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Listener) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Listener) SetName(v string) { + o.Name = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *Listener) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *Listener) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *Listener) SetPort(v int32) { + o.Port = &v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *Listener) GetProtocol() string { + if o == nil || IsNil(o.Protocol) { + var ret string + return ret + } + return *o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetProtocolOk() (*string, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *Listener) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given string and assigns it to the Protocol field. +func (o *Listener) SetProtocol(v string) { + o.Protocol = &v +} + +// GetServerNameIndicators returns the ServerNameIndicators field value if set, zero value otherwise. +func (o *Listener) GetServerNameIndicators() []ServerNameIndicator { + if o == nil || IsNil(o.ServerNameIndicators) { + var ret []ServerNameIndicator + return ret + } + return o.ServerNameIndicators +} + +// GetServerNameIndicatorsOk returns a tuple with the ServerNameIndicators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetServerNameIndicatorsOk() ([]ServerNameIndicator, bool) { + if o == nil || IsNil(o.ServerNameIndicators) { + return nil, false + } + return o.ServerNameIndicators, true +} + +// HasServerNameIndicators returns a boolean if a field has been set. +func (o *Listener) HasServerNameIndicators() bool { + if o != nil && !IsNil(o.ServerNameIndicators) { + return true + } + + return false +} + +// SetServerNameIndicators gets a reference to the given []ServerNameIndicator and assigns it to the ServerNameIndicators field. +func (o *Listener) SetServerNameIndicators(v []ServerNameIndicator) { + o.ServerNameIndicators = v +} + +// GetTargetPool returns the TargetPool field value if set, zero value otherwise. +func (o *Listener) GetTargetPool() string { + if o == nil || IsNil(o.TargetPool) { + var ret string + return ret + } + return *o.TargetPool +} + +// GetTargetPoolOk returns a tuple with the TargetPool field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetTargetPoolOk() (*string, bool) { + if o == nil || IsNil(o.TargetPool) { + return nil, false + } + return o.TargetPool, true +} + +// HasTargetPool returns a boolean if a field has been set. +func (o *Listener) HasTargetPool() bool { + if o != nil && !IsNil(o.TargetPool) { + return true + } + + return false +} + +// SetTargetPool gets a reference to the given string and assigns it to the TargetPool field. +func (o *Listener) SetTargetPool(v string) { + o.TargetPool = &v +} + +// GetTcp returns the Tcp field value if set, zero value otherwise. +func (o *Listener) GetTcp() OptionsTCP { + if o == nil || IsNil(o.Tcp) { + var ret OptionsTCP + return ret + } + return *o.Tcp +} + +// GetTcpOk returns a tuple with the Tcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetTcpOk() (*OptionsTCP, bool) { + if o == nil || IsNil(o.Tcp) { + return nil, false + } + return o.Tcp, true +} + +// HasTcp returns a boolean if a field has been set. +func (o *Listener) HasTcp() bool { + if o != nil && !IsNil(o.Tcp) { + return true + } + + return false +} + +// SetTcp gets a reference to the given OptionsTCP and assigns it to the Tcp field. +func (o *Listener) SetTcp(v OptionsTCP) { + o.Tcp = &v +} + +// GetUdp returns the Udp field value if set, zero value otherwise. +func (o *Listener) GetUdp() OptionsUDP { + if o == nil || IsNil(o.Udp) { + var ret OptionsUDP + return ret + } + return *o.Udp +} + +// GetUdpOk returns a tuple with the Udp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetUdpOk() (*OptionsUDP, bool) { + if o == nil || IsNil(o.Udp) { + return nil, false + } + return o.Udp, true +} + +// HasUdp returns a boolean if a field has been set. +func (o *Listener) HasUdp() bool { + if o != nil && !IsNil(o.Udp) { + return true + } + + return false +} + +// SetUdp gets a reference to the given OptionsUDP and assigns it to the Udp field. +func (o *Listener) SetUdp(v OptionsUDP) { + o.Udp = &v +} + +func (o Listener) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Listener) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.ServerNameIndicators) { + toSerialize["serverNameIndicators"] = o.ServerNameIndicators + } + if !IsNil(o.TargetPool) { + toSerialize["targetPool"] = o.TargetPool + } + if !IsNil(o.Tcp) { + toSerialize["tcp"] = o.Tcp + } + if !IsNil(o.Udp) { + toSerialize["udp"] = o.Udp + } + return toSerialize, nil +} + +type NullableListener struct { + value *Listener + isSet bool +} + +func (v NullableListener) Get() *Listener { + return v.value +} + +func (v *NullableListener) Set(val *Listener) { + v.value = val + v.isSet = true +} + +func (v NullableListener) IsSet() bool { + return v.isSet +} + +func (v *NullableListener) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListener(val *Listener) *NullableListener { + return &NullableListener{value: val, isSet: true} +} + +func (v NullableListener) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListener) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_load_balancer.go b/services/loadbalancer/v1api/model_load_balancer.go new file mode 100644 index 000000000..6ab1357c0 --- /dev/null +++ b/services/loadbalancer/v1api/model_load_balancer.go @@ -0,0 +1,493 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancer{} + +// LoadBalancer struct for LoadBalancer +type LoadBalancer struct { + // Reports all errors a load balancer has. + Errors []LoadBalancerError `json:"errors,omitempty"` + // External load balancer IP address where this load balancer is exposed. Not changeable after creation. + ExternalAddress *string `json:"externalAddress,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 []Listener `json:"listeners,omitempty"` + // Load balancer name. Not changeable after creation. + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. + Networks []Network `json:"networks,omitempty"` + Options *LoadBalancerOptions `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 *string `json:"planId,omitempty"` + // Transient private load balancer IP address that can change any time. + PrivateAddress *string `json:"privateAddress,omitempty"` + Status *string `json:"status,omitempty"` + // List of all target pools which will be used in the load balancer. Limited to 20. + TargetPools []TargetPool `json:"targetPools,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 *string `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 +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 +func NewLoadBalancerWithDefaults() *LoadBalancer { + this := LoadBalancer{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *LoadBalancer) GetErrors() []LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret []LoadBalancerError + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetErrorsOk() ([]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *LoadBalancer) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *LoadBalancer) SetErrors(v []LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *LoadBalancer) GetExternalAddress() string { + if o == nil || IsNil(o.ExternalAddress) { + var ret string + return ret + } + return *o.ExternalAddress +} + +// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetExternalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *LoadBalancer) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *LoadBalancer) SetExternalAddress(v string) { + o.ExternalAddress = &v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *LoadBalancer) GetListeners() []Listener { + if o == nil || IsNil(o.Listeners) { + var ret []Listener + return ret + } + return o.Listeners +} + +// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetListenersOk() ([]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *LoadBalancer) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *LoadBalancer) SetListeners(v []Listener) { + o.Listeners = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LoadBalancer) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *LoadBalancer) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *LoadBalancer) SetName(v string) { + o.Name = &v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *LoadBalancer) GetNetworks() []Network { + if o == nil || IsNil(o.Networks) { + var ret []Network + return ret + } + return o.Networks +} + +// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetNetworksOk() ([]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *LoadBalancer) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *LoadBalancer) SetNetworks(v []Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *LoadBalancer) GetOptions() LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret LoadBalancerOptions + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetOptionsOk() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *LoadBalancer) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *LoadBalancer) SetOptions(v LoadBalancerOptions) { + o.Options = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *LoadBalancer) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *LoadBalancer) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *LoadBalancer) SetPlanId(v string) { + o.PlanId = &v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *LoadBalancer) GetPrivateAddress() string { + if o == nil || IsNil(o.PrivateAddress) { + var ret string + return ret + } + return *o.PrivateAddress +} + +// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetPrivateAddressOk() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *LoadBalancer) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *LoadBalancer) SetPrivateAddress(v string) { + o.PrivateAddress = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LoadBalancer) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *LoadBalancer) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *LoadBalancer) SetStatus(v string) { + o.Status = &v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *LoadBalancer) GetTargetPools() []TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret []TargetPool + return ret + } + return o.TargetPools +} + +// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetTargetPoolsOk() ([]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *LoadBalancer) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *LoadBalancer) SetTargetPools(v []TargetPool) { + o.TargetPools = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *LoadBalancer) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *LoadBalancer) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *LoadBalancer) SetVersion(v string) { + o.Version = &v +} + +func (o LoadBalancer) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableLoadBalancer struct { + value *LoadBalancer + isSet bool +} + +func (v NullableLoadBalancer) Get() *LoadBalancer { + return v.value +} + +func (v *NullableLoadBalancer) Set(val *LoadBalancer) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancer) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancer(val *LoadBalancer) *NullableLoadBalancer { + return &NullableLoadBalancer{value: val, isSet: true} +} + +func (v NullableLoadBalancer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_load_balancer_error.go b/services/loadbalancer/v1api/model_load_balancer_error.go new file mode 100644 index 000000000..be1dba95a --- /dev/null +++ b/services/loadbalancer/v1api/model_load_balancer_error.go @@ -0,0 +1,162 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the LoadBalancerError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerError{} + +// LoadBalancerError struct for LoadBalancerError +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 *string `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 *string `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 +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 +func NewLoadBalancerErrorWithDefaults() *LoadBalancerError { + this := LoadBalancerError{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LoadBalancerError) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerError) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *LoadBalancerError) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *LoadBalancerError) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *LoadBalancerError) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerError) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *LoadBalancerError) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *LoadBalancerError) SetType(v string) { + o.Type = &v +} + +func (o LoadBalancerError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableLoadBalancerError struct { + value *LoadBalancerError + isSet bool +} + +func (v NullableLoadBalancerError) Get() *LoadBalancerError { + return v.value +} + +func (v *NullableLoadBalancerError) Set(val *LoadBalancerError) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerError) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerError(val *LoadBalancerError) *NullableLoadBalancerError { + return &NullableLoadBalancerError{value: val, isSet: true} +} + +func (v NullableLoadBalancerError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_load_balancer_options.go b/services/loadbalancer/v1api/model_load_balancer_options.go new file mode 100644 index 000000000..5fed5b263 --- /dev/null +++ b/services/loadbalancer/v1api/model_load_balancer_options.go @@ -0,0 +1,233 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the LoadBalancerOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerOptions{} + +// LoadBalancerOptions Defines any optional functionality you want to have enabled on your load balancer. +type LoadBalancerOptions struct { + AccessControl *LoadbalancerOptionAccessControl `json:"accessControl,omitempty"` + EphemeralAddress *bool `json:"ephemeralAddress,omitempty"` + Observability *LoadbalancerOptionObservability `json:"observability,omitempty"` + // Load Balancer is accessible only via a private network ip address. Not changeable after creation. + PrivateNetworkOnly *bool `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 +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 +func NewLoadBalancerOptionsWithDefaults() *LoadBalancerOptions { + this := LoadBalancerOptions{} + return &this +} + +// GetAccessControl returns the AccessControl field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetAccessControl() LoadbalancerOptionAccessControl { + if o == nil || IsNil(o.AccessControl) { + var ret LoadbalancerOptionAccessControl + return ret + } + return *o.AccessControl +} + +// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetAccessControlOk() (*LoadbalancerOptionAccessControl, bool) { + if o == nil || IsNil(o.AccessControl) { + return nil, false + } + return o.AccessControl, true +} + +// HasAccessControl returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasAccessControl() bool { + if o != nil && !IsNil(o.AccessControl) { + return true + } + + return false +} + +// SetAccessControl gets a reference to the given LoadbalancerOptionAccessControl and assigns it to the AccessControl field. +func (o *LoadBalancerOptions) SetAccessControl(v LoadbalancerOptionAccessControl) { + o.AccessControl = &v +} + +// GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetEphemeralAddress() bool { + if o == nil || IsNil(o.EphemeralAddress) { + var ret bool + return ret + } + return *o.EphemeralAddress +} + +// GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetEphemeralAddressOk() (*bool, bool) { + if o == nil || IsNil(o.EphemeralAddress) { + return nil, false + } + return o.EphemeralAddress, true +} + +// HasEphemeralAddress returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasEphemeralAddress() bool { + if o != nil && !IsNil(o.EphemeralAddress) { + return true + } + + return false +} + +// SetEphemeralAddress gets a reference to the given bool and assigns it to the EphemeralAddress field. +func (o *LoadBalancerOptions) SetEphemeralAddress(v bool) { + o.EphemeralAddress = &v +} + +// GetObservability returns the Observability field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetObservability() LoadbalancerOptionObservability { + if o == nil || IsNil(o.Observability) { + var ret LoadbalancerOptionObservability + return ret + } + return *o.Observability +} + +// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetObservabilityOk() (*LoadbalancerOptionObservability, bool) { + if o == nil || IsNil(o.Observability) { + return nil, false + } + return o.Observability, true +} + +// HasObservability returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasObservability() bool { + if o != nil && !IsNil(o.Observability) { + return true + } + + return false +} + +// SetObservability gets a reference to the given LoadbalancerOptionObservability and assigns it to the Observability field. +func (o *LoadBalancerOptions) SetObservability(v LoadbalancerOptionObservability) { + o.Observability = &v +} + +// GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetPrivateNetworkOnly() bool { + if o == nil || IsNil(o.PrivateNetworkOnly) { + var ret bool + return ret + } + return *o.PrivateNetworkOnly +} + +// GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.PrivateNetworkOnly) { + return nil, false + } + return o.PrivateNetworkOnly, true +} + +// HasPrivateNetworkOnly returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasPrivateNetworkOnly() bool { + if o != nil && !IsNil(o.PrivateNetworkOnly) { + return true + } + + return false +} + +// SetPrivateNetworkOnly gets a reference to the given bool and assigns it to the PrivateNetworkOnly field. +func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v bool) { + o.PrivateNetworkOnly = &v +} + +func (o LoadBalancerOptions) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessControl) { + toSerialize["accessControl"] = o.AccessControl + } + if !IsNil(o.EphemeralAddress) { + toSerialize["ephemeralAddress"] = o.EphemeralAddress + } + if !IsNil(o.Observability) { + toSerialize["observability"] = o.Observability + } + if !IsNil(o.PrivateNetworkOnly) { + toSerialize["privateNetworkOnly"] = o.PrivateNetworkOnly + } + return toSerialize, nil +} + +type NullableLoadBalancerOptions struct { + value *LoadBalancerOptions + isSet bool +} + +func (v NullableLoadBalancerOptions) Get() *LoadBalancerOptions { + return v.value +} + +func (v *NullableLoadBalancerOptions) Set(val *LoadBalancerOptions) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerOptions(val *LoadBalancerOptions) *NullableLoadBalancerOptions { + return &NullableLoadBalancerOptions{value: val, isSet: true} +} + +func (v NullableLoadBalancerOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_loadbalancer_option_access_control.go b/services/loadbalancer/v1api/model_loadbalancer_option_access_control.go new file mode 100644 index 000000000..a1b07f9a2 --- /dev/null +++ b/services/loadbalancer/v1api/model_loadbalancer_option_access_control.go @@ -0,0 +1,125 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionAccessControl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionAccessControl{} + +// LoadbalancerOptionAccessControl Use this option to limit the IP ranges that can use the load balancer. +type LoadbalancerOptionAccessControl struct { + // Load Balancer is accessible only from an IP address in this range + AllowedSourceRanges []string `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 +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 +func NewLoadbalancerOptionAccessControlWithDefaults() *LoadbalancerOptionAccessControl { + this := LoadbalancerOptionAccessControl{} + return &this +} + +// GetAllowedSourceRanges returns the AllowedSourceRanges field value if set, zero value otherwise. +func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() []string { + if o == nil || IsNil(o.AllowedSourceRanges) { + var ret []string + return ret + } + return o.AllowedSourceRanges +} + +// GetAllowedSourceRangesOk returns a tuple with the AllowedSourceRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() ([]string, bool) { + if o == nil || IsNil(o.AllowedSourceRanges) { + return nil, false + } + return o.AllowedSourceRanges, true +} + +// HasAllowedSourceRanges returns a boolean if a field has been set. +func (o *LoadbalancerOptionAccessControl) HasAllowedSourceRanges() bool { + if o != nil && !IsNil(o.AllowedSourceRanges) { + return true + } + + return false +} + +// SetAllowedSourceRanges gets a reference to the given []string and assigns it to the AllowedSourceRanges field. +func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v []string) { + o.AllowedSourceRanges = v +} + +func (o LoadbalancerOptionAccessControl) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowedSourceRanges) { + toSerialize["allowedSourceRanges"] = o.AllowedSourceRanges + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionAccessControl struct { + value *LoadbalancerOptionAccessControl + isSet bool +} + +func (v NullableLoadbalancerOptionAccessControl) Get() *LoadbalancerOptionAccessControl { + return v.value +} + +func (v *NullableLoadbalancerOptionAccessControl) Set(val *LoadbalancerOptionAccessControl) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionAccessControl) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionAccessControl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionAccessControl(val *LoadbalancerOptionAccessControl) *NullableLoadbalancerOptionAccessControl { + return &NullableLoadbalancerOptionAccessControl{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionAccessControl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionAccessControl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_loadbalancer_option_logs.go b/services/loadbalancer/v1api/model_loadbalancer_option_logs.go new file mode 100644 index 000000000..495e0494b --- /dev/null +++ b/services/loadbalancer/v1api/model_loadbalancer_option_logs.go @@ -0,0 +1,162 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionLogs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionLogs{} + +// LoadbalancerOptionLogs struct for LoadbalancerOptionLogs +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 *string `json:"credentialsRef,omitempty"` + // The ARGUS/Loki remote write Push URL you want the logs to be shipped to. + PushUrl *string `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 +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 +func NewLoadbalancerOptionLogsWithDefaults() *LoadbalancerOptionLogs { + this := LoadbalancerOptionLogs{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *LoadbalancerOptionLogs) GetCredentialsRef() string { + if o == nil || IsNil(o.CredentialsRef) { + var ret string + return ret + } + return *o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *LoadbalancerOptionLogs) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *LoadbalancerOptionLogs) SetCredentialsRef(v string) { + o.CredentialsRef = &v +} + +// GetPushUrl returns the PushUrl field value if set, zero value otherwise. +func (o *LoadbalancerOptionLogs) GetPushUrl() string { + if o == nil || IsNil(o.PushUrl) { + var ret string + return ret + } + return *o.PushUrl +} + +// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionLogs) GetPushUrlOk() (*string, bool) { + if o == nil || IsNil(o.PushUrl) { + return nil, false + } + return o.PushUrl, true +} + +// HasPushUrl returns a boolean if a field has been set. +func (o *LoadbalancerOptionLogs) HasPushUrl() bool { + if o != nil && !IsNil(o.PushUrl) { + return true + } + + return false +} + +// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. +func (o *LoadbalancerOptionLogs) SetPushUrl(v string) { + o.PushUrl = &v +} + +func (o LoadbalancerOptionLogs) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.PushUrl) { + toSerialize["pushUrl"] = o.PushUrl + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionLogs struct { + value *LoadbalancerOptionLogs + isSet bool +} + +func (v NullableLoadbalancerOptionLogs) Get() *LoadbalancerOptionLogs { + return v.value +} + +func (v *NullableLoadbalancerOptionLogs) Set(val *LoadbalancerOptionLogs) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionLogs) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionLogs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionLogs(val *LoadbalancerOptionLogs) *NullableLoadbalancerOptionLogs { + return &NullableLoadbalancerOptionLogs{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionLogs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionLogs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_loadbalancer_option_metrics.go b/services/loadbalancer/v1api/model_loadbalancer_option_metrics.go new file mode 100644 index 000000000..738c3b314 --- /dev/null +++ b/services/loadbalancer/v1api/model_loadbalancer_option_metrics.go @@ -0,0 +1,162 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionMetrics{} + +// LoadbalancerOptionMetrics struct for LoadbalancerOptionMetrics +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 *string `json:"credentialsRef,omitempty"` + // The ARGUS/Prometheus remote write Push URL you want the metrics to be shipped to. + PushUrl *string `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 +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 +func NewLoadbalancerOptionMetricsWithDefaults() *LoadbalancerOptionMetrics { + this := LoadbalancerOptionMetrics{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *LoadbalancerOptionMetrics) GetCredentialsRef() string { + if o == nil || IsNil(o.CredentialsRef) { + var ret string + return ret + } + return *o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *LoadbalancerOptionMetrics) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v string) { + o.CredentialsRef = &v +} + +// GetPushUrl returns the PushUrl field value if set, zero value otherwise. +func (o *LoadbalancerOptionMetrics) GetPushUrl() string { + if o == nil || IsNil(o.PushUrl) { + var ret string + return ret + } + return *o.PushUrl +} + +// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (*string, bool) { + if o == nil || IsNil(o.PushUrl) { + return nil, false + } + return o.PushUrl, true +} + +// HasPushUrl returns a boolean if a field has been set. +func (o *LoadbalancerOptionMetrics) HasPushUrl() bool { + if o != nil && !IsNil(o.PushUrl) { + return true + } + + return false +} + +// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. +func (o *LoadbalancerOptionMetrics) SetPushUrl(v string) { + o.PushUrl = &v +} + +func (o LoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.PushUrl) { + toSerialize["pushUrl"] = o.PushUrl + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionMetrics struct { + value *LoadbalancerOptionMetrics + isSet bool +} + +func (v NullableLoadbalancerOptionMetrics) Get() *LoadbalancerOptionMetrics { + return v.value +} + +func (v *NullableLoadbalancerOptionMetrics) Set(val *LoadbalancerOptionMetrics) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionMetrics) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionMetrics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionMetrics(val *LoadbalancerOptionMetrics) *NullableLoadbalancerOptionMetrics { + return &NullableLoadbalancerOptionMetrics{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionMetrics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_loadbalancer_option_observability.go b/services/loadbalancer/v1api/model_loadbalancer_option_observability.go new file mode 100644 index 000000000..7d0ef49a8 --- /dev/null +++ b/services/loadbalancer/v1api/model_loadbalancer_option_observability.go @@ -0,0 +1,160 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionObservability type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionObservability{} + +// LoadbalancerOptionObservability We offer Load Balancer metrics observability via ARGUS or external solutions. Not changeable after creation. +type LoadbalancerOptionObservability struct { + Logs *LoadbalancerOptionLogs `json:"logs,omitempty"` + Metrics *LoadbalancerOptionMetrics `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 +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 +func NewLoadbalancerOptionObservabilityWithDefaults() *LoadbalancerOptionObservability { + this := LoadbalancerOptionObservability{} + return &this +} + +// GetLogs returns the Logs field value if set, zero value otherwise. +func (o *LoadbalancerOptionObservability) GetLogs() LoadbalancerOptionLogs { + if o == nil || IsNil(o.Logs) { + var ret LoadbalancerOptionLogs + return ret + } + return *o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionObservability) GetLogsOk() (*LoadbalancerOptionLogs, bool) { + if o == nil || IsNil(o.Logs) { + return nil, false + } + return o.Logs, true +} + +// HasLogs returns a boolean if a field has been set. +func (o *LoadbalancerOptionObservability) HasLogs() bool { + if o != nil && !IsNil(o.Logs) { + return true + } + + return false +} + +// SetLogs gets a reference to the given LoadbalancerOptionLogs and assigns it to the Logs field. +func (o *LoadbalancerOptionObservability) SetLogs(v LoadbalancerOptionLogs) { + o.Logs = &v +} + +// GetMetrics returns the Metrics field value if set, zero value otherwise. +func (o *LoadbalancerOptionObservability) GetMetrics() LoadbalancerOptionMetrics { + if o == nil || IsNil(o.Metrics) { + var ret LoadbalancerOptionMetrics + return ret + } + return *o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionObservability) GetMetricsOk() (*LoadbalancerOptionMetrics, bool) { + if o == nil || IsNil(o.Metrics) { + return nil, false + } + return o.Metrics, true +} + +// HasMetrics returns a boolean if a field has been set. +func (o *LoadbalancerOptionObservability) HasMetrics() bool { + if o != nil && !IsNil(o.Metrics) { + return true + } + + return false +} + +// SetMetrics gets a reference to the given LoadbalancerOptionMetrics and assigns it to the Metrics field. +func (o *LoadbalancerOptionObservability) SetMetrics(v LoadbalancerOptionMetrics) { + o.Metrics = &v +} + +func (o LoadbalancerOptionObservability) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Logs) { + toSerialize["logs"] = o.Logs + } + if !IsNil(o.Metrics) { + toSerialize["metrics"] = o.Metrics + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionObservability struct { + value *LoadbalancerOptionObservability + isSet bool +} + +func (v NullableLoadbalancerOptionObservability) Get() *LoadbalancerOptionObservability { + return v.value +} + +func (v *NullableLoadbalancerOptionObservability) Set(val *LoadbalancerOptionObservability) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionObservability) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionObservability) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionObservability(val *LoadbalancerOptionObservability) *NullableLoadbalancerOptionObservability { + return &NullableLoadbalancerOptionObservability{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionObservability) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionObservability) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_network.go b/services/loadbalancer/v1api/model_network.go new file mode 100644 index 000000000..efa8929df --- /dev/null +++ b/services/loadbalancer/v1api/model_network.go @@ -0,0 +1,162 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Network type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Network{} + +// Network struct for Network +type Network struct { + // Openstack network ID + NetworkId *string `json:"networkId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"` + // The role defines how the load balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. + Role *string `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 +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 +func NewNetworkWithDefaults() *Network { + this := Network{} + return &this +} + +// GetNetworkId returns the NetworkId field value if set, zero value otherwise. +func (o *Network) GetNetworkId() string { + if o == nil || IsNil(o.NetworkId) { + var ret string + return ret + } + return *o.NetworkId +} + +// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetNetworkIdOk() (*string, bool) { + if o == nil || IsNil(o.NetworkId) { + return nil, false + } + return o.NetworkId, true +} + +// HasNetworkId returns a boolean if a field has been set. +func (o *Network) HasNetworkId() bool { + if o != nil && !IsNil(o.NetworkId) { + return true + } + + return false +} + +// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. +func (o *Network) SetNetworkId(v string) { + o.NetworkId = &v +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *Network) GetRole() string { + if o == nil || IsNil(o.Role) { + var ret string + return ret + } + return *o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetRoleOk() (*string, bool) { + if o == nil || IsNil(o.Role) { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *Network) HasRole() bool { + if o != nil && !IsNil(o.Role) { + return true + } + + return false +} + +// SetRole gets a reference to the given string and assigns it to the Role field. +func (o *Network) SetRole(v string) { + o.Role = &v +} + +func (o Network) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Network) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NetworkId) { + toSerialize["networkId"] = o.NetworkId + } + if !IsNil(o.Role) { + toSerialize["role"] = o.Role + } + return toSerialize, nil +} + +type NullableNetwork struct { + value *Network + isSet bool +} + +func (v NullableNetwork) Get() *Network { + return v.value +} + +func (v *NullableNetwork) Set(val *Network) { + v.value = val + v.isSet = true +} + +func (v NullableNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetwork(val *Network) *NullableNetwork { + return &NullableNetwork{value: val, isSet: true} +} + +func (v NullableNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_options_tcp.go b/services/loadbalancer/v1api/model_options_tcp.go new file mode 100644 index 000000000..b70a897e8 --- /dev/null +++ b/services/loadbalancer/v1api/model_options_tcp.go @@ -0,0 +1,125 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the OptionsTCP type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptionsTCP{} + +// 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. +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 *string `json:"idleTimeout,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` +} + +// 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 +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 +func NewOptionsTCPWithDefaults() *OptionsTCP { + this := OptionsTCP{} + return &this +} + +// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise. +func (o *OptionsTCP) GetIdleTimeout() string { + if o == nil || IsNil(o.IdleTimeout) { + var ret string + return ret + } + return *o.IdleTimeout +} + +// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptionsTCP) GetIdleTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.IdleTimeout) { + return nil, false + } + return o.IdleTimeout, true +} + +// HasIdleTimeout returns a boolean if a field has been set. +func (o *OptionsTCP) HasIdleTimeout() bool { + if o != nil && !IsNil(o.IdleTimeout) { + return true + } + + return false +} + +// SetIdleTimeout gets a reference to the given string and assigns it to the IdleTimeout field. +func (o *OptionsTCP) SetIdleTimeout(v string) { + o.IdleTimeout = &v +} + +func (o OptionsTCP) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OptionsTCP) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IdleTimeout) { + toSerialize["idleTimeout"] = o.IdleTimeout + } + return toSerialize, nil +} + +type NullableOptionsTCP struct { + value *OptionsTCP + isSet bool +} + +func (v NullableOptionsTCP) Get() *OptionsTCP { + return v.value +} + +func (v *NullableOptionsTCP) Set(val *OptionsTCP) { + v.value = val + v.isSet = true +} + +func (v NullableOptionsTCP) IsSet() bool { + return v.isSet +} + +func (v *NullableOptionsTCP) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptionsTCP(val *OptionsTCP) *NullableOptionsTCP { + return &NullableOptionsTCP{value: val, isSet: true} +} + +func (v NullableOptionsTCP) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptionsTCP) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_options_udp.go b/services/loadbalancer/v1api/model_options_udp.go new file mode 100644 index 000000000..e958e4f54 --- /dev/null +++ b/services/loadbalancer/v1api/model_options_udp.go @@ -0,0 +1,125 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the OptionsUDP type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptionsUDP{} + +// OptionsUDP ProtocolOptionsUDP options to be configured for the PROTOCOL_UDP protocol. +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 *string `json:"idleTimeout,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` +} + +// 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 +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 +func NewOptionsUDPWithDefaults() *OptionsUDP { + this := OptionsUDP{} + return &this +} + +// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise. +func (o *OptionsUDP) GetIdleTimeout() string { + if o == nil || IsNil(o.IdleTimeout) { + var ret string + return ret + } + return *o.IdleTimeout +} + +// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptionsUDP) GetIdleTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.IdleTimeout) { + return nil, false + } + return o.IdleTimeout, true +} + +// HasIdleTimeout returns a boolean if a field has been set. +func (o *OptionsUDP) HasIdleTimeout() bool { + if o != nil && !IsNil(o.IdleTimeout) { + return true + } + + return false +} + +// SetIdleTimeout gets a reference to the given string and assigns it to the IdleTimeout field. +func (o *OptionsUDP) SetIdleTimeout(v string) { + o.IdleTimeout = &v +} + +func (o OptionsUDP) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OptionsUDP) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IdleTimeout) { + toSerialize["idleTimeout"] = o.IdleTimeout + } + return toSerialize, nil +} + +type NullableOptionsUDP struct { + value *OptionsUDP + isSet bool +} + +func (v NullableOptionsUDP) Get() *OptionsUDP { + return v.value +} + +func (v *NullableOptionsUDP) Set(val *OptionsUDP) { + v.value = val + v.isSet = true +} + +func (v NullableOptionsUDP) IsSet() bool { + return v.isSet +} + +func (v *NullableOptionsUDP) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptionsUDP(val *OptionsUDP) *NullableOptionsUDP { + return &NullableOptionsUDP{value: val, isSet: true} +} + +func (v NullableOptionsUDP) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptionsUDP) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_plan_details.go b/services/loadbalancer/v1api/model_plan_details.go new file mode 100644 index 000000000..3dde25dc2 --- /dev/null +++ b/services/loadbalancer/v1api/model_plan_details.go @@ -0,0 +1,273 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the PlanDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlanDetails{} + +// PlanDetails struct for PlanDetails +type PlanDetails struct { + // Description + Description *string `json:"description,omitempty"` + // Flavor Name + FlavorName *string `json:"flavorName,omitempty"` + // Maximum number of concurrent connections per load balancer VM instance. + MaxConnections *int32 `json:"maxConnections,omitempty"` + // Service Plan Name + Name *string `json:"name,omitempty"` + // Service Plan Identifier + PlanId *string `json:"planId,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 +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 +func NewPlanDetailsWithDefaults() *PlanDetails { + this := PlanDetails{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PlanDetails) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PlanDetails) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PlanDetails) SetDescription(v string) { + o.Description = &v +} + +// GetFlavorName returns the FlavorName field value if set, zero value otherwise. +func (o *PlanDetails) GetFlavorName() string { + if o == nil || IsNil(o.FlavorName) { + var ret string + return ret + } + return *o.FlavorName +} + +// GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetFlavorNameOk() (*string, bool) { + if o == nil || IsNil(o.FlavorName) { + return nil, false + } + return o.FlavorName, true +} + +// HasFlavorName returns a boolean if a field has been set. +func (o *PlanDetails) HasFlavorName() bool { + if o != nil && !IsNil(o.FlavorName) { + return true + } + + return false +} + +// SetFlavorName gets a reference to the given string and assigns it to the FlavorName field. +func (o *PlanDetails) SetFlavorName(v string) { + o.FlavorName = &v +} + +// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise. +func (o *PlanDetails) GetMaxConnections() int32 { + if o == nil || IsNil(o.MaxConnections) { + var ret int32 + return ret + } + return *o.MaxConnections +} + +// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetMaxConnectionsOk() (*int32, bool) { + if o == nil || IsNil(o.MaxConnections) { + return nil, false + } + return o.MaxConnections, true +} + +// HasMaxConnections returns a boolean if a field has been set. +func (o *PlanDetails) HasMaxConnections() bool { + if o != nil && !IsNil(o.MaxConnections) { + return true + } + + return false +} + +// SetMaxConnections gets a reference to the given int32 and assigns it to the MaxConnections field. +func (o *PlanDetails) SetMaxConnections(v int32) { + o.MaxConnections = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PlanDetails) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PlanDetails) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PlanDetails) SetName(v string) { + o.Name = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *PlanDetails) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *PlanDetails) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *PlanDetails) SetPlanId(v string) { + o.PlanId = &v +} + +func (o PlanDetails) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlanDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.FlavorName) { + toSerialize["flavorName"] = o.FlavorName + } + if !IsNil(o.MaxConnections) { + toSerialize["maxConnections"] = o.MaxConnections + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + return toSerialize, nil +} + +type NullablePlanDetails struct { + value *PlanDetails + isSet bool +} + +func (v NullablePlanDetails) Get() *PlanDetails { + return v.value +} + +func (v *NullablePlanDetails) Set(val *PlanDetails) { + v.value = val + v.isSet = true +} + +func (v NullablePlanDetails) IsSet() bool { + return v.isSet +} + +func (v *NullablePlanDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlanDetails(val *PlanDetails) *NullablePlanDetails { + return &NullablePlanDetails{value: val, isSet: true} +} + +func (v NullablePlanDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlanDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_server_name_indicator.go b/services/loadbalancer/v1api/model_server_name_indicator.go new file mode 100644 index 000000000..24cdd9e22 --- /dev/null +++ b/services/loadbalancer/v1api/model_server_name_indicator.go @@ -0,0 +1,125 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ServerNameIndicator type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerNameIndicator{} + +// ServerNameIndicator struct for ServerNameIndicator +type ServerNameIndicator struct { + // The domain name for this SNI config. + Name *string `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 +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 +func NewServerNameIndicatorWithDefaults() *ServerNameIndicator { + this := ServerNameIndicator{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ServerNameIndicator) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNameIndicator) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ServerNameIndicator) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ServerNameIndicator) SetName(v string) { + o.Name = &v +} + +func (o ServerNameIndicator) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServerNameIndicator) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableServerNameIndicator struct { + value *ServerNameIndicator + isSet bool +} + +func (v NullableServerNameIndicator) Get() *ServerNameIndicator { + return v.value +} + +func (v *NullableServerNameIndicator) Set(val *ServerNameIndicator) { + v.value = val + v.isSet = true +} + +func (v NullableServerNameIndicator) IsSet() bool { + return v.isSet +} + +func (v *NullableServerNameIndicator) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerNameIndicator(val *ServerNameIndicator) *NullableServerNameIndicator { + return &NullableServerNameIndicator{value: val, isSet: true} +} + +func (v NullableServerNameIndicator) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerNameIndicator) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_session_persistence.go b/services/loadbalancer/v1api/model_session_persistence.go new file mode 100644 index 000000000..066c06365 --- /dev/null +++ b/services/loadbalancer/v1api/model_session_persistence.go @@ -0,0 +1,125 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the SessionPersistence type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionPersistence{} + +// SessionPersistence struct for SessionPersistence +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 *bool `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 +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 +func NewSessionPersistenceWithDefaults() *SessionPersistence { + this := SessionPersistence{} + return &this +} + +// GetUseSourceIpAddress returns the UseSourceIpAddress field value if set, zero value otherwise. +func (o *SessionPersistence) GetUseSourceIpAddress() bool { + if o == nil || IsNil(o.UseSourceIpAddress) { + var ret bool + return ret + } + return *o.UseSourceIpAddress +} + +// GetUseSourceIpAddressOk returns a tuple with the UseSourceIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionPersistence) GetUseSourceIpAddressOk() (*bool, bool) { + if o == nil || IsNil(o.UseSourceIpAddress) { + return nil, false + } + return o.UseSourceIpAddress, true +} + +// HasUseSourceIpAddress returns a boolean if a field has been set. +func (o *SessionPersistence) HasUseSourceIpAddress() bool { + if o != nil && !IsNil(o.UseSourceIpAddress) { + return true + } + + return false +} + +// SetUseSourceIpAddress gets a reference to the given bool and assigns it to the UseSourceIpAddress field. +func (o *SessionPersistence) SetUseSourceIpAddress(v bool) { + o.UseSourceIpAddress = &v +} + +func (o SessionPersistence) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionPersistence) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.UseSourceIpAddress) { + toSerialize["useSourceIpAddress"] = o.UseSourceIpAddress + } + return toSerialize, nil +} + +type NullableSessionPersistence struct { + value *SessionPersistence + isSet bool +} + +func (v NullableSessionPersistence) Get() *SessionPersistence { + return v.value +} + +func (v *NullableSessionPersistence) Set(val *SessionPersistence) { + v.value = val + v.isSet = true +} + +func (v NullableSessionPersistence) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionPersistence) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionPersistence(val *SessionPersistence) *NullableSessionPersistence { + return &NullableSessionPersistence{value: val, isSet: true} +} + +func (v NullableSessionPersistence) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionPersistence) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_status.go b/services/loadbalancer/v1api/model_status.go new file mode 100644 index 000000000..4930ced0c --- /dev/null +++ b/services/loadbalancer/v1api/model_status.go @@ -0,0 +1,199 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Status type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Status{} + +// 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). +type Status struct { + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + Code *int32 `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 []GoogleProtobufAny `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 *string `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 +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 +func NewStatusWithDefaults() *Status { + this := Status{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Status) GetCode() int32 { + if o == nil || IsNil(o.Code) { + var ret int32 + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetCodeOk() (*int32, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Status) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *Status) SetCode(v int32) { + o.Code = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Status) GetDetails() []GoogleProtobufAny { + if o == nil || IsNil(o.Details) { + var ret []GoogleProtobufAny + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetDetailsOk() ([]GoogleProtobufAny, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *Status) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field. +func (o *Status) SetDetails(v []GoogleProtobufAny) { + o.Details = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Status) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Status) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Status) SetMessage(v string) { + o.Message = &v +} + +func (o Status) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Status) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableStatus struct { + value *Status + isSet bool +} + +func (v NullableStatus) Get() *Status { + return v.value +} + +func (v *NullableStatus) Set(val *Status) { + v.value = val + v.isSet = true +} + +func (v NullableStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatus(val *Status) *NullableStatus { + return &NullableStatus{value: val, isSet: true} +} + +func (v NullableStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_target.go b/services/loadbalancer/v1api/model_target.go new file mode 100644 index 000000000..6d10e03b3 --- /dev/null +++ b/services/loadbalancer/v1api/model_target.go @@ -0,0 +1,162 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Target type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Target{} + +// Target struct for Target +type Target struct { + // Target name + DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-zA-Z](?:(?:[0-9a-zA-Z]|-){0,61}[0-9a-zA-Z])?$"` + // Target IP. Must by unique within a target pool. + Ip *string `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 +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 +func NewTargetWithDefaults() *Target { + this := Target{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *Target) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Target) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *Target) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *Target) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *Target) GetIp() string { + if o == nil || IsNil(o.Ip) { + var ret string + return ret + } + return *o.Ip +} + +// GetIpOk returns a tuple with the Ip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Target) GetIpOk() (*string, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *Target) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given string and assigns it to the Ip field. +func (o *Target) SetIp(v string) { + o.Ip = &v +} + +func (o Target) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Target) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + return toSerialize, nil +} + +type NullableTarget struct { + value *Target + isSet bool +} + +func (v NullableTarget) Get() *Target { + return v.value +} + +func (v *NullableTarget) Set(val *Target) { + v.value = val + v.isSet = true +} + +func (v NullableTarget) IsSet() bool { + return v.isSet +} + +func (v *NullableTarget) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTarget(val *Target) *NullableTarget { + return &NullableTarget{value: val, isSet: true} +} + +func (v NullableTarget) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTarget) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_target_pool.go b/services/loadbalancer/v1api/model_target_pool.go new file mode 100644 index 000000000..695040d0b --- /dev/null +++ b/services/loadbalancer/v1api/model_target_pool.go @@ -0,0 +1,271 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the TargetPool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TargetPool{} + +// TargetPool struct for TargetPool +type TargetPool struct { + ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` + // Target pool name + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + SessionPersistence *SessionPersistence `json:"sessionPersistence,omitempty"` + // The number identifying the port where each target listens for traffic. + TargetPort *int32 `json:"targetPort,omitempty"` + // List of all targets which will be used in the pool. Limited to 250. + Targets []Target `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 +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 +func NewTargetPoolWithDefaults() *TargetPool { + this := TargetPool{} + return &this +} + +// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. +func (o *TargetPool) GetActiveHealthCheck() ActiveHealthCheck { + if o == nil || IsNil(o.ActiveHealthCheck) { + var ret ActiveHealthCheck + return ret + } + return *o.ActiveHealthCheck +} + +// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { + if o == nil || IsNil(o.ActiveHealthCheck) { + return nil, false + } + return o.ActiveHealthCheck, true +} + +// HasActiveHealthCheck returns a boolean if a field has been set. +func (o *TargetPool) HasActiveHealthCheck() bool { + if o != nil && !IsNil(o.ActiveHealthCheck) { + return true + } + + return false +} + +// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. +func (o *TargetPool) SetActiveHealthCheck(v ActiveHealthCheck) { + o.ActiveHealthCheck = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TargetPool) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TargetPool) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TargetPool) SetName(v string) { + o.Name = &v +} + +// GetSessionPersistence returns the SessionPersistence field value if set, zero value otherwise. +func (o *TargetPool) GetSessionPersistence() SessionPersistence { + if o == nil || IsNil(o.SessionPersistence) { + var ret SessionPersistence + return ret + } + return *o.SessionPersistence +} + +// GetSessionPersistenceOk returns a tuple with the SessionPersistence field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetSessionPersistenceOk() (*SessionPersistence, bool) { + if o == nil || IsNil(o.SessionPersistence) { + return nil, false + } + return o.SessionPersistence, true +} + +// HasSessionPersistence returns a boolean if a field has been set. +func (o *TargetPool) HasSessionPersistence() bool { + if o != nil && !IsNil(o.SessionPersistence) { + return true + } + + return false +} + +// SetSessionPersistence gets a reference to the given SessionPersistence and assigns it to the SessionPersistence field. +func (o *TargetPool) SetSessionPersistence(v SessionPersistence) { + o.SessionPersistence = &v +} + +// GetTargetPort returns the TargetPort field value if set, zero value otherwise. +func (o *TargetPool) GetTargetPort() int32 { + if o == nil || IsNil(o.TargetPort) { + var ret int32 + return ret + } + return *o.TargetPort +} + +// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetTargetPortOk() (*int32, bool) { + if o == nil || IsNil(o.TargetPort) { + return nil, false + } + return o.TargetPort, true +} + +// HasTargetPort returns a boolean if a field has been set. +func (o *TargetPool) HasTargetPort() bool { + if o != nil && !IsNil(o.TargetPort) { + return true + } + + return false +} + +// SetTargetPort gets a reference to the given int32 and assigns it to the TargetPort field. +func (o *TargetPool) SetTargetPort(v int32) { + o.TargetPort = &v +} + +// GetTargets returns the Targets field value if set, zero value otherwise. +func (o *TargetPool) GetTargets() []Target { + if o == nil || IsNil(o.Targets) { + var ret []Target + return ret + } + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetTargetsOk() ([]Target, bool) { + if o == nil || IsNil(o.Targets) { + return nil, false + } + return o.Targets, true +} + +// HasTargets returns a boolean if a field has been set. +func (o *TargetPool) HasTargets() bool { + if o != nil && !IsNil(o.Targets) { + return true + } + + return false +} + +// SetTargets gets a reference to the given []Target and assigns it to the Targets field. +func (o *TargetPool) SetTargets(v []Target) { + o.Targets = v +} + +func (o TargetPool) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TargetPool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActiveHealthCheck) { + toSerialize["activeHealthCheck"] = o.ActiveHealthCheck + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SessionPersistence) { + toSerialize["sessionPersistence"] = o.SessionPersistence + } + if !IsNil(o.TargetPort) { + toSerialize["targetPort"] = o.TargetPort + } + if !IsNil(o.Targets) { + toSerialize["targets"] = o.Targets + } + return toSerialize, nil +} + +type NullableTargetPool struct { + value *TargetPool + isSet bool +} + +func (v NullableTargetPool) Get() *TargetPool { + return v.value +} + +func (v *NullableTargetPool) Set(val *TargetPool) { + v.value = val + v.isSet = true +} + +func (v NullableTargetPool) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetPool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetPool(val *TargetPool) *NullableTargetPool { + return &NullableTargetPool{value: val, isSet: true} +} + +func (v NullableTargetPool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetPool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_update_credentials_payload.go b/services/loadbalancer/v1api/model_update_credentials_payload.go new file mode 100644 index 000000000..c3ca3f047 --- /dev/null +++ b/services/loadbalancer/v1api/model_update_credentials_payload.go @@ -0,0 +1,199 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateCredentialsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateCredentialsPayload{} + +// UpdateCredentialsPayload struct for UpdateCredentialsPayload +type UpdateCredentialsPayload struct { + // Credential name + DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` + // A valid password used for an existing ARGUS instance, which is used during basic auth. + Password *string `json:"password,omitempty"` + // A valid username used for an existing ARGUS instance, which is used during basic auth. + Username *string `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 +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 +func NewUpdateCredentialsPayloadWithDefaults() *UpdateCredentialsPayload { + this := UpdateCredentialsPayload{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *UpdateCredentialsPayload) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *UpdateCredentialsPayload) SetPassword(v string) { + o.Password = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *UpdateCredentialsPayload) SetUsername(v string) { + o.Username = &v +} + +func (o UpdateCredentialsPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateCredentialsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUpdateCredentialsPayload struct { + value *UpdateCredentialsPayload + isSet bool +} + +func (v NullableUpdateCredentialsPayload) Get() *UpdateCredentialsPayload { + return v.value +} + +func (v *NullableUpdateCredentialsPayload) Set(val *UpdateCredentialsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCredentialsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCredentialsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCredentialsPayload(val *UpdateCredentialsPayload) *NullableUpdateCredentialsPayload { + return &NullableUpdateCredentialsPayload{value: val, isSet: true} +} + +func (v NullableUpdateCredentialsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCredentialsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_update_credentials_response.go b/services/loadbalancer/v1api/model_update_credentials_response.go new file mode 100644 index 000000000..1084e7404 --- /dev/null +++ b/services/loadbalancer/v1api/model_update_credentials_response.go @@ -0,0 +1,124 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateCredentialsResponse{} + +// UpdateCredentialsResponse struct for UpdateCredentialsResponse +type UpdateCredentialsResponse struct { + Credential *CredentialsResponse `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 +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 +func NewUpdateCredentialsResponseWithDefaults() *UpdateCredentialsResponse { + this := UpdateCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *UpdateCredentialsResponse) GetCredential() CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret CredentialsResponse + return ret + } + return *o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *UpdateCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *UpdateCredentialsResponse) SetCredential(v CredentialsResponse) { + o.Credential = &v +} + +func (o UpdateCredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableUpdateCredentialsResponse struct { + value *UpdateCredentialsResponse + isSet bool +} + +func (v NullableUpdateCredentialsResponse) Get() *UpdateCredentialsResponse { + return v.value +} + +func (v *NullableUpdateCredentialsResponse) Set(val *UpdateCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCredentialsResponse(val *UpdateCredentialsResponse) *NullableUpdateCredentialsResponse { + return &NullableUpdateCredentialsResponse{value: val, isSet: true} +} + +func (v NullableUpdateCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_update_load_balancer_payload.go b/services/loadbalancer/v1api/model_update_load_balancer_payload.go new file mode 100644 index 000000000..f46de7b16 --- /dev/null +++ b/services/loadbalancer/v1api/model_update_load_balancer_payload.go @@ -0,0 +1,493 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateLoadBalancerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateLoadBalancerPayload{} + +// UpdateLoadBalancerPayload struct for UpdateLoadBalancerPayload +type UpdateLoadBalancerPayload struct { + // Reports all errors a load balancer has. + Errors []LoadBalancerError `json:"errors,omitempty"` + // External load balancer IP address where this load balancer is exposed. Not changeable after creation. + ExternalAddress *string `json:"externalAddress,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 []Listener `json:"listeners,omitempty"` + // Load balancer name. Not changeable after creation. + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. + Networks []Network `json:"networks,omitempty"` + Options *LoadBalancerOptions `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 *string `json:"planId,omitempty"` + // Transient private load balancer IP address that can change any time. + PrivateAddress *string `json:"privateAddress,omitempty"` + Status *string `json:"status,omitempty"` + // List of all target pools which will be used in the load balancer. Limited to 20. + TargetPools []TargetPool `json:"targetPools,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 *string `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 +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 +func NewUpdateLoadBalancerPayloadWithDefaults() *UpdateLoadBalancerPayload { + this := UpdateLoadBalancerPayload{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetErrors() []LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret []LoadBalancerError + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetErrorsOk() ([]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *UpdateLoadBalancerPayload) SetErrors(v []LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetExternalAddress() string { + if o == nil || IsNil(o.ExternalAddress) { + var ret string + return ret + } + return *o.ExternalAddress +} + +// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetExternalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *UpdateLoadBalancerPayload) SetExternalAddress(v string) { + o.ExternalAddress = &v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetListeners() []Listener { + if o == nil || IsNil(o.Listeners) { + var ret []Listener + return ret + } + return o.Listeners +} + +// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetListenersOk() ([]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *UpdateLoadBalancerPayload) SetListeners(v []Listener) { + o.Listeners = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateLoadBalancerPayload) SetName(v string) { + o.Name = &v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetNetworks() []Network { + if o == nil || IsNil(o.Networks) { + var ret []Network + return ret + } + return o.Networks +} + +// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetNetworksOk() ([]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *UpdateLoadBalancerPayload) SetNetworks(v []Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetOptions() LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret LoadBalancerOptions + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetOptionsOk() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *UpdateLoadBalancerPayload) SetOptions(v LoadBalancerOptions) { + o.Options = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *UpdateLoadBalancerPayload) SetPlanId(v string) { + o.PlanId = &v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetPrivateAddress() string { + if o == nil || IsNil(o.PrivateAddress) { + var ret string + return ret + } + return *o.PrivateAddress +} + +// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetPrivateAddressOk() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v string) { + o.PrivateAddress = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *UpdateLoadBalancerPayload) SetStatus(v string) { + o.Status = &v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetTargetPools() []TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret []TargetPool + return ret + } + return o.TargetPools +} + +// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetTargetPoolsOk() ([]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *UpdateLoadBalancerPayload) SetTargetPools(v []TargetPool) { + o.TargetPools = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *UpdateLoadBalancerPayload) SetVersion(v string) { + o.Version = &v +} + +func (o UpdateLoadBalancerPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableUpdateLoadBalancerPayload struct { + value *UpdateLoadBalancerPayload + isSet bool +} + +func (v NullableUpdateLoadBalancerPayload) Get() *UpdateLoadBalancerPayload { + return v.value +} + +func (v *NullableUpdateLoadBalancerPayload) Set(val *UpdateLoadBalancerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateLoadBalancerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateLoadBalancerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateLoadBalancerPayload(val *UpdateLoadBalancerPayload) *NullableUpdateLoadBalancerPayload { + return &NullableUpdateLoadBalancerPayload{value: val, isSet: true} +} + +func (v NullableUpdateLoadBalancerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateLoadBalancerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/model_update_target_pool_payload.go b/services/loadbalancer/v1api/model_update_target_pool_payload.go new file mode 100644 index 000000000..77ebe61f5 --- /dev/null +++ b/services/loadbalancer/v1api/model_update_target_pool_payload.go @@ -0,0 +1,271 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateTargetPoolPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateTargetPoolPayload{} + +// UpdateTargetPoolPayload struct for UpdateTargetPoolPayload +type UpdateTargetPoolPayload struct { + ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` + // Target pool name + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + SessionPersistence *SessionPersistence `json:"sessionPersistence,omitempty"` + // The number identifying the port where each target listens for traffic. + TargetPort *int32 `json:"targetPort,omitempty"` + // List of all targets which will be used in the pool. Limited to 250. + Targets []Target `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 +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 +func NewUpdateTargetPoolPayloadWithDefaults() *UpdateTargetPoolPayload { + this := UpdateTargetPoolPayload{} + return &this +} + +// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetActiveHealthCheck() ActiveHealthCheck { + if o == nil || IsNil(o.ActiveHealthCheck) { + var ret ActiveHealthCheck + return ret + } + return *o.ActiveHealthCheck +} + +// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { + if o == nil || IsNil(o.ActiveHealthCheck) { + return nil, false + } + return o.ActiveHealthCheck, true +} + +// HasActiveHealthCheck returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasActiveHealthCheck() bool { + if o != nil && !IsNil(o.ActiveHealthCheck) { + return true + } + + return false +} + +// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. +func (o *UpdateTargetPoolPayload) SetActiveHealthCheck(v ActiveHealthCheck) { + o.ActiveHealthCheck = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateTargetPoolPayload) SetName(v string) { + o.Name = &v +} + +// GetSessionPersistence returns the SessionPersistence field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetSessionPersistence() SessionPersistence { + if o == nil || IsNil(o.SessionPersistence) { + var ret SessionPersistence + return ret + } + return *o.SessionPersistence +} + +// GetSessionPersistenceOk returns a tuple with the SessionPersistence field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetSessionPersistenceOk() (*SessionPersistence, bool) { + if o == nil || IsNil(o.SessionPersistence) { + return nil, false + } + return o.SessionPersistence, true +} + +// HasSessionPersistence returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasSessionPersistence() bool { + if o != nil && !IsNil(o.SessionPersistence) { + return true + } + + return false +} + +// SetSessionPersistence gets a reference to the given SessionPersistence and assigns it to the SessionPersistence field. +func (o *UpdateTargetPoolPayload) SetSessionPersistence(v SessionPersistence) { + o.SessionPersistence = &v +} + +// GetTargetPort returns the TargetPort field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetTargetPort() int32 { + if o == nil || IsNil(o.TargetPort) { + var ret int32 + return ret + } + return *o.TargetPort +} + +// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetTargetPortOk() (*int32, bool) { + if o == nil || IsNil(o.TargetPort) { + return nil, false + } + return o.TargetPort, true +} + +// HasTargetPort returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasTargetPort() bool { + if o != nil && !IsNil(o.TargetPort) { + return true + } + + return false +} + +// SetTargetPort gets a reference to the given int32 and assigns it to the TargetPort field. +func (o *UpdateTargetPoolPayload) SetTargetPort(v int32) { + o.TargetPort = &v +} + +// GetTargets returns the Targets field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetTargets() []Target { + if o == nil || IsNil(o.Targets) { + var ret []Target + return ret + } + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetTargetsOk() ([]Target, bool) { + if o == nil || IsNil(o.Targets) { + return nil, false + } + return o.Targets, true +} + +// HasTargets returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasTargets() bool { + if o != nil && !IsNil(o.Targets) { + return true + } + + return false +} + +// SetTargets gets a reference to the given []Target and assigns it to the Targets field. +func (o *UpdateTargetPoolPayload) SetTargets(v []Target) { + o.Targets = v +} + +func (o UpdateTargetPoolPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActiveHealthCheck) { + toSerialize["activeHealthCheck"] = o.ActiveHealthCheck + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SessionPersistence) { + toSerialize["sessionPersistence"] = o.SessionPersistence + } + if !IsNil(o.TargetPort) { + toSerialize["targetPort"] = o.TargetPort + } + if !IsNil(o.Targets) { + toSerialize["targets"] = o.Targets + } + return toSerialize, nil +} + +type NullableUpdateTargetPoolPayload struct { + value *UpdateTargetPoolPayload + isSet bool +} + +func (v NullableUpdateTargetPoolPayload) Get() *UpdateTargetPoolPayload { + return v.value +} + +func (v *NullableUpdateTargetPoolPayload) Set(val *UpdateTargetPoolPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateTargetPoolPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateTargetPoolPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateTargetPoolPayload(val *UpdateTargetPoolPayload) *NullableUpdateTargetPoolPayload { + return &NullableUpdateTargetPoolPayload{value: val, isSet: true} +} + +func (v NullableUpdateTargetPoolPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateTargetPoolPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v1api/response.go b/services/loadbalancer/v1api/response.go new file mode 100644 index 000000000..4c152ed5f --- /dev/null +++ b/services/loadbalancer/v1api/response.go @@ -0,0 +1,47 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/loadbalancer/v1api/utils.go b/services/loadbalancer/v1api/utils.go new file mode 100644 index 000000000..82ac3ee19 --- /dev/null +++ b/services/loadbalancer/v1api/utils.go @@ -0,0 +1,361 @@ +/* +STACKIT Network Load Balancer API + +### DEPRECATED! 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: 1.7.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/services/loadbalancer/v2api/api_default.go b/services/loadbalancer/v2api/api_default.go new file mode 100644 index 000000000..c5b961058 --- /dev/null +++ b/services/loadbalancer/v2api/api_default.go @@ -0,0 +1,2217 @@ +/* +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 v2api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + 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 + */ + CreateCredentials(ctx context.Context, projectId string, region string) ApiCreateCredentialsRequest + + // CreateCredentialsExecute executes the request + // @return CreateCredentialsResponse + CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*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 + */ + CreateLoadBalancer(ctx context.Context, projectId string, region string) ApiCreateLoadBalancerRequest + + // CreateLoadBalancerExecute executes the request + // @return LoadBalancer + CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*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 + */ + DeleteCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiDeleteCredentialsRequest + + // DeleteCredentialsExecute executes the request + // @return map[string]interface{} + DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (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 + */ + DeleteLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiDeleteLoadBalancerRequest + + // DeleteLoadBalancerExecute executes the request + // @return map[string]interface{} + DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (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 + */ + GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiGetCredentialsRequest + + // GetCredentialsExecute executes the request + // @return GetCredentialsResponse + GetCredentialsExecute(r ApiGetCredentialsRequest) (*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 + */ + GetLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiGetLoadBalancerRequest + + // GetLoadBalancerExecute executes the request + // @return LoadBalancer + GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) + + /* + GetQuota Get the quota of Load Balancers in a project. + + Retrieves the configured Load Balancer quota for the project. Limit can be changed via service request. + There can be 3 times as many observability credentials as Load Balancers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiGetQuotaRequest + */ + GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest + + // GetQuotaExecute executes the request + // @return GetQuotaResponse + GetQuotaExecute(r ApiGetQuotaRequest) (*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 + */ + ListCredentials(ctx context.Context, projectId string, region string) ApiListCredentialsRequest + + // ListCredentialsExecute executes the request + // @return ListCredentialsResponse + ListCredentialsExecute(r ApiListCredentialsRequest) (*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 + */ + ListLoadBalancers(ctx context.Context, projectId string, region string) ApiListLoadBalancersRequest + + // ListLoadBalancersExecute executes the request + // @return ListLoadBalancersResponse + ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*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 + */ + ListPlans(ctx context.Context, region string) ApiListPlansRequest + + // ListPlansExecute executes the request + // @return ListPlansResponse + ListPlansExecute(r ApiListPlansRequest) (*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 + */ + UpdateCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiUpdateCredentialsRequest + + // UpdateCredentialsExecute executes the request + // @return UpdateCredentialsResponse + UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*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 + */ + UpdateLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiUpdateLoadBalancerRequest + + // UpdateLoadBalancerExecute executes the request + // @return LoadBalancer + UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*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 + */ + UpdateTargetPool(ctx context.Context, projectId string, region string, name string, targetPoolName string) ApiUpdateTargetPoolRequest + + // UpdateTargetPoolExecute executes the request + // @return TargetPool + UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCreateCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + createCredentialsPayload *CreateCredentialsPayload + xRequestID *string +} + +func (r ApiCreateCredentialsRequest) CreateCredentialsPayload(createCredentialsPayload CreateCredentialsPayload) ApiCreateCredentialsRequest { + r.createCredentialsPayload = &createCredentialsPayload + return r +} + +func (r ApiCreateCredentialsRequest) XRequestID(xRequestID string) ApiCreateCredentialsRequest { + r.xRequestID = &xRequestID + return r +} + +func (r ApiCreateCredentialsRequest) Execute() (*CreateCredentialsResponse, error) { + return r.ApiService.CreateCredentialsExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) CreateCredentials(ctx context.Context, projectId string, region string) ApiCreateCredentialsRequest { + return ApiCreateCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return CreateCredentialsResponse +func (a *DefaultAPIService) CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateCredentialsResponse + ) + + localBasePath, err := a.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, reportError("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, "simple", "") + } + // body params + localVarPostBody = r.createCredentialsPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateLoadBalancerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + createLoadBalancerPayload *CreateLoadBalancerPayload + xRequestID *string +} + +func (r ApiCreateLoadBalancerRequest) CreateLoadBalancerPayload(createLoadBalancerPayload CreateLoadBalancerPayload) ApiCreateLoadBalancerRequest { + r.createLoadBalancerPayload = &createLoadBalancerPayload + return r +} + +func (r ApiCreateLoadBalancerRequest) XRequestID(xRequestID string) ApiCreateLoadBalancerRequest { + r.xRequestID = &xRequestID + return r +} + +func (r ApiCreateLoadBalancerRequest) Execute() (*LoadBalancer, error) { + return r.ApiService.CreateLoadBalancerExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) CreateLoadBalancer(ctx context.Context, projectId string, region string) ApiCreateLoadBalancerRequest { + return ApiCreateLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return LoadBalancer +func (a *DefaultAPIService) CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancer + ) + + localBasePath, err := a.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, reportError("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, "simple", "") + } + // body params + localVarPostBody = r.createLoadBalancerPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + credentialsRef string +} + +func (r ApiDeleteCredentialsRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteCredentialsExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) DeleteCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiDeleteCredentialsRequest { + return ApiDeleteCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + credentialsRef: credentialsRef, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteLoadBalancerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + name string +} + +func (r ApiDeleteLoadBalancerRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteLoadBalancerExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) DeleteLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiDeleteLoadBalancerRequest { + return ApiDeleteLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + name: name, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + credentialsRef string +} + +func (r ApiGetCredentialsRequest) Execute() (*GetCredentialsResponse, error) { + return r.ApiService.GetCredentialsExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiGetCredentialsRequest { + return ApiGetCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + credentialsRef: credentialsRef, + } +} + +// Execute executes the request +// +// @return GetCredentialsResponse +func (a *DefaultAPIService) GetCredentialsExecute(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetCredentialsResponse + ) + + localBasePath, err := a.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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetLoadBalancerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + name string +} + +func (r ApiGetLoadBalancerRequest) Execute() (*LoadBalancer, error) { + return r.ApiService.GetLoadBalancerExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) GetLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiGetLoadBalancerRequest { + return ApiGetLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + name: name, + } +} + +// Execute executes the request +// +// @return LoadBalancer +func (a *DefaultAPIService) GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancer + ) + + localBasePath, err := a.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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetQuotaRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiGetQuotaRequest) Execute() (*GetQuotaResponse, error) { + return r.ApiService.GetQuotaExecute(r) +} + +/* +GetQuota Get the quota of Load Balancers in a project. + +Retrieves the configured Load Balancer quota for the project. Limit can be changed via service request. + + There can be 3 times as many observability credentials as Load Balancers. + + @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 *DefaultAPIService) GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest { + return ApiGetQuotaRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return GetQuotaResponse +func (a *DefaultAPIService) GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetQuotaResponse + ) + + localBasePath, err := a.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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListCredentialsRequest) Execute() (*ListCredentialsResponse, error) { + return r.ApiService.ListCredentialsExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) ListCredentials(ctx context.Context, projectId string, region string) ApiListCredentialsRequest { + return ApiListCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListCredentialsResponse +func (a *DefaultAPIService) ListCredentialsExecute(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCredentialsResponse + ) + + localBasePath, err := a.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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListLoadBalancersRequest struct { + ctx context.Context + ApiService DefaultAPI + 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 +func (r ApiListLoadBalancersRequest) 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 +func (r ApiListLoadBalancersRequest) PageId(pageId string) ApiListLoadBalancersRequest { + r.pageId = &pageId + return r +} + +func (r ApiListLoadBalancersRequest) Execute() (*ListLoadBalancersResponse, error) { + return r.ApiService.ListLoadBalancersExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) ListLoadBalancers(ctx context.Context, projectId string, region string) ApiListLoadBalancersRequest { + return ApiListLoadBalancersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListLoadBalancersResponse +func (a *DefaultAPIService) ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListLoadBalancersResponse + ) + + localBasePath, err := a.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, "form", "") + } + if r.pageId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageId", r.pageId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListPlansRequest struct { + ctx context.Context + ApiService DefaultAPI + region string +} + +func (r ApiListPlansRequest) Execute() (*ListPlansResponse, error) { + return r.ApiService.ListPlansExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) ListPlans(ctx context.Context, region string) ApiListPlansRequest { + return ApiListPlansRequest{ + ApiService: a, + ctx: ctx, + region: region, + } +} + +// Execute executes the request +// +// @return ListPlansResponse +func (a *DefaultAPIService) ListPlansExecute(r ApiListPlansRequest) (*ListPlansResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListPlansResponse + ) + + localBasePath, err := a.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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateCredentialsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + credentialsRef string + updateCredentialsPayload *UpdateCredentialsPayload +} + +func (r ApiUpdateCredentialsRequest) UpdateCredentialsPayload(updateCredentialsPayload UpdateCredentialsPayload) ApiUpdateCredentialsRequest { + r.updateCredentialsPayload = &updateCredentialsPayload + return r +} + +func (r ApiUpdateCredentialsRequest) Execute() (*UpdateCredentialsResponse, error) { + return r.ApiService.UpdateCredentialsExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) UpdateCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiUpdateCredentialsRequest { + return ApiUpdateCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + credentialsRef: credentialsRef, + } +} + +// Execute executes the request +// +// @return UpdateCredentialsResponse +func (a *DefaultAPIService) UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateCredentialsResponse + ) + + localBasePath, err := a.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, reportError("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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateLoadBalancerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + name string + updateLoadBalancerPayload *UpdateLoadBalancerPayload +} + +func (r ApiUpdateLoadBalancerRequest) UpdateLoadBalancerPayload(updateLoadBalancerPayload UpdateLoadBalancerPayload) ApiUpdateLoadBalancerRequest { + r.updateLoadBalancerPayload = &updateLoadBalancerPayload + return r +} + +func (r ApiUpdateLoadBalancerRequest) Execute() (*LoadBalancer, error) { + return r.ApiService.UpdateLoadBalancerExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) UpdateLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiUpdateLoadBalancerRequest { + return ApiUpdateLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + name: name, + } +} + +// Execute executes the request +// +// @return LoadBalancer +func (a *DefaultAPIService) UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancer + ) + + localBasePath, err := a.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, reportError("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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateTargetPoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + name string + targetPoolName string + updateTargetPoolPayload *UpdateTargetPoolPayload +} + +func (r ApiUpdateTargetPoolRequest) UpdateTargetPoolPayload(updateTargetPoolPayload UpdateTargetPoolPayload) ApiUpdateTargetPoolRequest { + r.updateTargetPoolPayload = &updateTargetPoolPayload + return r +} + +func (r ApiUpdateTargetPoolRequest) Execute() (*TargetPool, error) { + return r.ApiService.UpdateTargetPoolExecute(r) +} + +/* +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 +*/ +func (a *DefaultAPIService) UpdateTargetPool(ctx context.Context, projectId string, region string, name string, targetPoolName string) ApiUpdateTargetPoolRequest { + return ApiUpdateTargetPoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + name: name, + targetPoolName: targetPoolName, + } +} + +// Execute executes the request +// +// @return TargetPool +func (a *DefaultAPIService) UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TargetPool + ) + + localBasePath, err := a.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, reportError("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 := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/services/loadbalancer/v2api/api_default_mock.go b/services/loadbalancer/v2api/api_default_mock.go new file mode 100644 index 000000000..3bd564a62 --- /dev/null +++ b/services/loadbalancer/v2api/api_default_mock.go @@ -0,0 +1,303 @@ +/* +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 v2api + +import ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // CreateCredentialsExecuteMock can be populated to implement the behavior of the CreateCredentialsExecute function of this mock + CreateCredentialsExecuteMock *func(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) + // CreateLoadBalancerExecuteMock can be populated to implement the behavior of the CreateLoadBalancerExecute function of this mock + CreateLoadBalancerExecuteMock *func(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) + // DeleteCredentialsExecuteMock can be populated to implement the behavior of the DeleteCredentialsExecute function of this mock + DeleteCredentialsExecuteMock *func(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) + // DeleteLoadBalancerExecuteMock can be populated to implement the behavior of the DeleteLoadBalancerExecute function of this mock + DeleteLoadBalancerExecuteMock *func(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) + // GetCredentialsExecuteMock can be populated to implement the behavior of the GetCredentialsExecute function of this mock + GetCredentialsExecuteMock *func(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) + // GetLoadBalancerExecuteMock can be populated to implement the behavior of the GetLoadBalancerExecute function of this mock + GetLoadBalancerExecuteMock *func(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) + // GetQuotaExecuteMock can be populated to implement the behavior of the GetQuotaExecute function of this mock + GetQuotaExecuteMock *func(r ApiGetQuotaRequest) (*GetQuotaResponse, error) + // ListCredentialsExecuteMock can be populated to implement the behavior of the ListCredentialsExecute function of this mock + ListCredentialsExecuteMock *func(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) + // ListLoadBalancersExecuteMock can be populated to implement the behavior of the ListLoadBalancersExecute function of this mock + ListLoadBalancersExecuteMock *func(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) + // ListPlansExecuteMock can be populated to implement the behavior of the ListPlansExecute function of this mock + ListPlansExecuteMock *func(r ApiListPlansRequest) (*ListPlansResponse, error) + // UpdateCredentialsExecuteMock can be populated to implement the behavior of the UpdateCredentialsExecute function of this mock + UpdateCredentialsExecuteMock *func(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) + // UpdateLoadBalancerExecuteMock can be populated to implement the behavior of the UpdateLoadBalancerExecute function of this mock + UpdateLoadBalancerExecuteMock *func(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) + // UpdateTargetPoolExecuteMock can be populated to implement the behavior of the UpdateTargetPoolExecute function of this mock + UpdateTargetPoolExecuteMock *func(r ApiUpdateTargetPoolRequest) (*TargetPool, error) +} + +func (a DefaultAPIServiceMock) CreateCredentials(ctx context.Context, projectId string, region string) ApiCreateCredentialsRequest { + return ApiCreateCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// CreateCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) { + if a.CreateCredentialsExecuteMock == nil { + var localVarReturnValue *CreateCredentialsResponse + return localVarReturnValue, nil + } + + return (*a.CreateCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateLoadBalancer(ctx context.Context, projectId string, region string) ApiCreateLoadBalancerRequest { + return ApiCreateLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// CreateLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) { + if a.CreateLoadBalancerExecuteMock == nil { + var localVarReturnValue *LoadBalancer + return localVarReturnValue, nil + } + + return (*a.CreateLoadBalancerExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiDeleteCredentialsRequest { + return ApiDeleteCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + credentialsRef: credentialsRef, + } +} + +// DeleteCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) { + if a.DeleteCredentialsExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiDeleteLoadBalancerRequest { + return ApiDeleteLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + name: name, + } +} + +// DeleteLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) { + if a.DeleteLoadBalancerExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteLoadBalancerExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiGetCredentialsRequest { + return ApiGetCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + credentialsRef: credentialsRef, + } +} + +// GetCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetCredentialsExecute(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) { + if a.GetCredentialsExecuteMock == nil { + var localVarReturnValue *GetCredentialsResponse + return localVarReturnValue, nil + } + + return (*a.GetCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiGetLoadBalancerRequest { + return ApiGetLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + name: name, + } +} + +// GetLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) { + if a.GetLoadBalancerExecuteMock == nil { + var localVarReturnValue *LoadBalancer + return localVarReturnValue, nil + } + + return (*a.GetLoadBalancerExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest { + return ApiGetQuotaRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// GetQuotaExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetQuotaExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) { + if a.GetQuotaExecuteMock == nil { + var localVarReturnValue *GetQuotaResponse + return localVarReturnValue, nil + } + + return (*a.GetQuotaExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListCredentials(ctx context.Context, projectId string, region string) ApiListCredentialsRequest { + return ApiListCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListCredentialsExecute(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) { + if a.ListCredentialsExecuteMock == nil { + var localVarReturnValue *ListCredentialsResponse + return localVarReturnValue, nil + } + + return (*a.ListCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListLoadBalancers(ctx context.Context, projectId string, region string) ApiListLoadBalancersRequest { + return ApiListLoadBalancersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListLoadBalancersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListLoadBalancersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) { + if a.ListLoadBalancersExecuteMock == nil { + var localVarReturnValue *ListLoadBalancersResponse + return localVarReturnValue, nil + } + + return (*a.ListLoadBalancersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListPlans(ctx context.Context, region string) ApiListPlansRequest { + return ApiListPlansRequest{ + ApiService: a, + ctx: ctx, + region: region, + } +} + +// ListPlansExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListPlansExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListPlansExecute(r ApiListPlansRequest) (*ListPlansResponse, error) { + if a.ListPlansExecuteMock == nil { + var localVarReturnValue *ListPlansResponse + return localVarReturnValue, nil + } + + return (*a.ListPlansExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiUpdateCredentialsRequest { + return ApiUpdateCredentialsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + credentialsRef: credentialsRef, + } +} + +// UpdateCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateCredentialsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) { + if a.UpdateCredentialsExecuteMock == nil { + var localVarReturnValue *UpdateCredentialsResponse + return localVarReturnValue, nil + } + + return (*a.UpdateCredentialsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiUpdateLoadBalancerRequest { + return ApiUpdateLoadBalancerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + name: name, + } +} + +// UpdateLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) { + if a.UpdateLoadBalancerExecuteMock == nil { + var localVarReturnValue *LoadBalancer + return localVarReturnValue, nil + } + + return (*a.UpdateLoadBalancerExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateTargetPool(ctx context.Context, projectId string, region string, name string, targetPoolName string) ApiUpdateTargetPoolRequest { + return ApiUpdateTargetPoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + name: name, + targetPoolName: targetPoolName, + } +} + +// UpdateTargetPoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateTargetPoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) { + if a.UpdateTargetPoolExecuteMock == nil { + var localVarReturnValue *TargetPool + return localVarReturnValue, nil + } + + return (*a.UpdateTargetPoolExecuteMock)(r) +} diff --git a/services/loadbalancer/v2api/client.go b/services/loadbalancer/v2api/client.go new file mode 100644 index 000000000..b0dadd8bc --- /dev/null +++ b/services/loadbalancer/v2api/client.go @@ -0,0 +1,658 @@ +/* +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 v2api + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/stackitcloud/stackit-sdk-go/core/auth" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the STACKIT Network Load Balancer API API v2.0.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *config.Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultAPI DefaultAPI +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { + cfg := NewConfiguration() + + for _, option := range opts { + err := option(cfg) + if err != nil { + return nil, fmt.Errorf("configuring the client: %w", err) + } + } + + err := config.ConfigureRegion(cfg) + if err != nil { + return nil, fmt.Errorf("configuring region: %w", err) + } + + if cfg.HTTPClient == nil { + cfg.HTTPClient = &http.Client{} + } + + authRoundTripper, err := auth.SetupAuth(cfg) + if err != nil { + return nil, fmt.Errorf("setting up authentication: %w", err) + } + + roundTripper := authRoundTripper + if cfg.Middleware != nil { + roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) + } + + cfg.HTTPClient.Transport = roundTripper + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.DefaultAPI = (*DefaultAPIService)(&c.common) + + return c, nil +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *config.Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/loadbalancer/v2api/configuration.go b/services/loadbalancer/v2api/configuration.go new file mode 100644 index 000000000..36fd83b29 --- /dev/null +++ b/services/loadbalancer/v2api/configuration.go @@ -0,0 +1,37 @@ +/* +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 v2api + +import ( + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *config.Configuration { + cfg := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "stackit-sdk-go/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/v2api/model_active_health_check.go b/services/loadbalancer/v2api/model_active_health_check.go new file mode 100644 index 000000000..e0e051bbd --- /dev/null +++ b/services/loadbalancer/v2api/model_active_health_check.go @@ -0,0 +1,346 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the ActiveHealthCheck type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActiveHealthCheck{} + +// ActiveHealthCheck struct for ActiveHealthCheck +type ActiveHealthCheck struct { + // Overrides the default port used for health check probes. + AltPort *int32 `json:"altPort,omitempty"` + // Healthy threshold of the health checking + HealthyThreshold *int32 `json:"healthyThreshold,omitempty"` + HttpHealthChecks *HttpHealthChecks `json:"httpHealthChecks,omitempty"` + // Interval duration of health checking in seconds + Interval *string `json:"interval,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` + // Interval duration threshold of the health checking in seconds + IntervalJitter *string `json:"intervalJitter,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` + // Active health checking timeout duration in seconds + Timeout *string `json:"timeout,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` + // Unhealthy threshold of the health checking + UnhealthyThreshold *int32 `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 +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 +func NewActiveHealthCheckWithDefaults() *ActiveHealthCheck { + this := ActiveHealthCheck{} + return &this +} + +// GetAltPort returns the AltPort field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetAltPort() int32 { + if o == nil || IsNil(o.AltPort) { + var ret int32 + return ret + } + return *o.AltPort +} + +// GetAltPortOk returns a tuple with the AltPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetAltPortOk() (*int32, bool) { + if o == nil || IsNil(o.AltPort) { + return nil, false + } + return o.AltPort, true +} + +// HasAltPort returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasAltPort() bool { + if o != nil && !IsNil(o.AltPort) { + return true + } + + return false +} + +// SetAltPort gets a reference to the given int32 and assigns it to the AltPort field. +func (o *ActiveHealthCheck) SetAltPort(v int32) { + o.AltPort = &v +} + +// GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetHealthyThreshold() int32 { + if o == nil || IsNil(o.HealthyThreshold) { + var ret int32 + return ret + } + return *o.HealthyThreshold +} + +// GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetHealthyThresholdOk() (*int32, bool) { + if o == nil || IsNil(o.HealthyThreshold) { + return nil, false + } + return o.HealthyThreshold, true +} + +// HasHealthyThreshold returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasHealthyThreshold() bool { + if o != nil && !IsNil(o.HealthyThreshold) { + return true + } + + return false +} + +// SetHealthyThreshold gets a reference to the given int32 and assigns it to the HealthyThreshold field. +func (o *ActiveHealthCheck) SetHealthyThreshold(v int32) { + o.HealthyThreshold = &v +} + +// GetHttpHealthChecks returns the HttpHealthChecks field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetHttpHealthChecks() HttpHealthChecks { + if o == nil || IsNil(o.HttpHealthChecks) { + var ret HttpHealthChecks + return ret + } + return *o.HttpHealthChecks +} + +// GetHttpHealthChecksOk returns a tuple with the HttpHealthChecks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetHttpHealthChecksOk() (*HttpHealthChecks, bool) { + if o == nil || IsNil(o.HttpHealthChecks) { + return nil, false + } + return o.HttpHealthChecks, true +} + +// HasHttpHealthChecks returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasHttpHealthChecks() bool { + if o != nil && !IsNil(o.HttpHealthChecks) { + return true + } + + return false +} + +// SetHttpHealthChecks gets a reference to the given HttpHealthChecks and assigns it to the HttpHealthChecks field. +func (o *ActiveHealthCheck) SetHttpHealthChecks(v HttpHealthChecks) { + o.HttpHealthChecks = &v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetInterval() string { + if o == nil || IsNil(o.Interval) { + var ret string + return ret + } + return *o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetIntervalOk() (*string, bool) { + if o == nil || IsNil(o.Interval) { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasInterval() bool { + if o != nil && !IsNil(o.Interval) { + return true + } + + return false +} + +// SetInterval gets a reference to the given string and assigns it to the Interval field. +func (o *ActiveHealthCheck) SetInterval(v string) { + o.Interval = &v +} + +// GetIntervalJitter returns the IntervalJitter field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetIntervalJitter() string { + if o == nil || IsNil(o.IntervalJitter) { + var ret string + return ret + } + return *o.IntervalJitter +} + +// GetIntervalJitterOk returns a tuple with the IntervalJitter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetIntervalJitterOk() (*string, bool) { + if o == nil || IsNil(o.IntervalJitter) { + return nil, false + } + return o.IntervalJitter, true +} + +// HasIntervalJitter returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasIntervalJitter() bool { + if o != nil && !IsNil(o.IntervalJitter) { + return true + } + + return false +} + +// SetIntervalJitter gets a reference to the given string and assigns it to the IntervalJitter field. +func (o *ActiveHealthCheck) SetIntervalJitter(v string) { + o.IntervalJitter = &v +} + +// GetTimeout returns the Timeout field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetTimeout() string { + if o == nil || IsNil(o.Timeout) { + var ret string + return ret + } + return *o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.Timeout) { + return nil, false + } + return o.Timeout, true +} + +// HasTimeout returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasTimeout() bool { + if o != nil && !IsNil(o.Timeout) { + return true + } + + return false +} + +// SetTimeout gets a reference to the given string and assigns it to the Timeout field. +func (o *ActiveHealthCheck) SetTimeout(v string) { + o.Timeout = &v +} + +// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetUnhealthyThreshold() int32 { + if o == nil || IsNil(o.UnhealthyThreshold) { + var ret int32 + return ret + } + return *o.UnhealthyThreshold +} + +// GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (*int32, bool) { + if o == nil || IsNil(o.UnhealthyThreshold) { + return nil, false + } + return o.UnhealthyThreshold, true +} + +// HasUnhealthyThreshold returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasUnhealthyThreshold() bool { + if o != nil && !IsNil(o.UnhealthyThreshold) { + return true + } + + return false +} + +// SetUnhealthyThreshold gets a reference to the given int32 and assigns it to the UnhealthyThreshold field. +func (o *ActiveHealthCheck) SetUnhealthyThreshold(v int32) { + o.UnhealthyThreshold = &v +} + +func (o ActiveHealthCheck) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AltPort) { + toSerialize["altPort"] = o.AltPort + } + if !IsNil(o.HealthyThreshold) { + toSerialize["healthyThreshold"] = o.HealthyThreshold + } + if !IsNil(o.HttpHealthChecks) { + toSerialize["httpHealthChecks"] = o.HttpHealthChecks + } + if !IsNil(o.Interval) { + toSerialize["interval"] = o.Interval + } + if !IsNil(o.IntervalJitter) { + toSerialize["intervalJitter"] = o.IntervalJitter + } + if !IsNil(o.Timeout) { + toSerialize["timeout"] = o.Timeout + } + if !IsNil(o.UnhealthyThreshold) { + toSerialize["unhealthyThreshold"] = o.UnhealthyThreshold + } + return toSerialize, nil +} + +type NullableActiveHealthCheck struct { + value *ActiveHealthCheck + isSet bool +} + +func (v NullableActiveHealthCheck) Get() *ActiveHealthCheck { + return v.value +} + +func (v *NullableActiveHealthCheck) Set(val *ActiveHealthCheck) { + v.value = val + v.isSet = true +} + +func (v NullableActiveHealthCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableActiveHealthCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActiveHealthCheck(val *ActiveHealthCheck) *NullableActiveHealthCheck { + return &NullableActiveHealthCheck{value: val, isSet: true} +} + +func (v NullableActiveHealthCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActiveHealthCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_create_credentials_payload.go b/services/loadbalancer/v2api/model_create_credentials_payload.go new file mode 100644 index 000000000..377ea2b87 --- /dev/null +++ b/services/loadbalancer/v2api/model_create_credentials_payload.go @@ -0,0 +1,199 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the CreateCredentialsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCredentialsPayload{} + +// CreateCredentialsPayload struct for CreateCredentialsPayload +type CreateCredentialsPayload struct { + // Credential name + DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` + // A valid password used for an existing STACKIT Observability instance, which is used during basic auth. + Password *string `json:"password,omitempty"` + // A valid username used for an existing STACKIT Observability instance, which is used during basic auth. + Username *string `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 +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 +func NewCreateCredentialsPayloadWithDefaults() *CreateCredentialsPayload { + this := CreateCredentialsPayload{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *CreateCredentialsPayload) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *CreateCredentialsPayload) SetPassword(v string) { + o.Password = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreateCredentialsPayload) SetUsername(v string) { + o.Username = &v +} + +func (o CreateCredentialsPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableCreateCredentialsPayload struct { + value *CreateCredentialsPayload + isSet bool +} + +func (v NullableCreateCredentialsPayload) Get() *CreateCredentialsPayload { + return v.value +} + +func (v *NullableCreateCredentialsPayload) Set(val *CreateCredentialsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCredentialsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCredentialsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCredentialsPayload(val *CreateCredentialsPayload) *NullableCreateCredentialsPayload { + return &NullableCreateCredentialsPayload{value: val, isSet: true} +} + +func (v NullableCreateCredentialsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCredentialsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_create_credentials_response.go b/services/loadbalancer/v2api/model_create_credentials_response.go new file mode 100644 index 000000000..6f858c499 --- /dev/null +++ b/services/loadbalancer/v2api/model_create_credentials_response.go @@ -0,0 +1,124 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCredentialsResponse{} + +// CreateCredentialsResponse struct for CreateCredentialsResponse +type CreateCredentialsResponse struct { + Credential *CredentialsResponse `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 +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 +func NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse { + this := CreateCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *CreateCredentialsResponse) GetCredential() CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret CredentialsResponse + return ret + } + return *o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *CreateCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *CreateCredentialsResponse) SetCredential(v CredentialsResponse) { + o.Credential = &v +} + +func (o CreateCredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableCreateCredentialsResponse struct { + value *CreateCredentialsResponse + isSet bool +} + +func (v NullableCreateCredentialsResponse) Get() *CreateCredentialsResponse { + return v.value +} + +func (v *NullableCreateCredentialsResponse) Set(val *CreateCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCredentialsResponse(val *CreateCredentialsResponse) *NullableCreateCredentialsResponse { + return &NullableCreateCredentialsResponse{value: val, isSet: true} +} + +func (v NullableCreateCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_create_load_balancer_payload.go b/services/loadbalancer/v2api/model_create_load_balancer_payload.go new file mode 100644 index 000000000..4997e29c4 --- /dev/null +++ b/services/loadbalancer/v2api/model_create_load_balancer_payload.go @@ -0,0 +1,678 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateLoadBalancerPayload{} + +// CreateLoadBalancerPayload struct for CreateLoadBalancerPayload +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 *bool `json:"disableTargetSecurityGroupAssignment,omitempty"` + // Reports all errors a load balancer has. + Errors []LoadBalancerError `json:"errors,omitempty"` + // External load balancer IP address where this load balancer is exposed. Not changeable after creation. + ExternalAddress *string `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 *map[string]string `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 []Listener `json:"listeners,omitempty"` + // Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. + LoadBalancerSecurityGroup *SecurityGroup `json:"loadBalancerSecurityGroup,omitempty"` + // Load balancer name. Not changeable after creation. + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. + Networks []Network `json:"networks,omitempty"` + Options *LoadBalancerOptions `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 *string `json:"planId,omitempty"` + // Transient private load balancer IP address that can change any time. + PrivateAddress *string `json:"privateAddress,omitempty"` + // Region of the LoadBalancer + Region *string `json:"region,omitempty"` + Status *string `json:"status,omitempty"` + // List of all target pools which will be used in the load balancer. Limited to 20. + TargetPools []TargetPool `json:"targetPools,omitempty"` + // Security Group that allows the targets to receive traffic from the LoadBalancer. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. + TargetSecurityGroup *SecurityGroup `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 *string `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 +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 +func NewCreateLoadBalancerPayloadWithDefaults() *CreateLoadBalancerPayload { + this := CreateLoadBalancerPayload{} + return &this +} + +// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() bool { + if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { + var ret bool + return ret + } + return *o.DisableTargetSecurityGroupAssignment +} + +// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (*bool, bool) { + if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { + return nil, false + } + return o.DisableTargetSecurityGroupAssignment, true +} + +// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool { + if o != nil && !IsNil(o.DisableTargetSecurityGroupAssignment) { + return true + } + + return false +} + +// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. +func (o *CreateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v bool) { + o.DisableTargetSecurityGroupAssignment = &v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetErrors() []LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret []LoadBalancerError + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetErrorsOk() ([]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *CreateLoadBalancerPayload) SetErrors(v []LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetExternalAddress() string { + if o == nil || IsNil(o.ExternalAddress) { + var ret string + return ret + } + return *o.ExternalAddress +} + +// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetExternalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *CreateLoadBalancerPayload) SetExternalAddress(v string) { + o.ExternalAddress = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateLoadBalancerPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetListeners() []Listener { + if o == nil || IsNil(o.Listeners) { + var ret []Listener + return ret + } + return o.Listeners +} + +// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetListenersOk() ([]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *CreateLoadBalancerPayload) SetListeners(v []Listener) { + o.Listeners = v +} + +// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroup() SecurityGroup { + if o == nil || IsNil(o.LoadBalancerSecurityGroup) { + var ret SecurityGroup + return ret + } + return *o.LoadBalancerSecurityGroup +} + +// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (*SecurityGroup, bool) { + if o == nil || IsNil(o.LoadBalancerSecurityGroup) { + return nil, false + } + return o.LoadBalancerSecurityGroup, true +} + +// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool { + if o != nil && !IsNil(o.LoadBalancerSecurityGroup) { + return true + } + + return false +} + +// SetLoadBalancerSecurityGroup gets a reference to the given SecurityGroup and assigns it to the LoadBalancerSecurityGroup field. +func (o *CreateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v SecurityGroup) { + o.LoadBalancerSecurityGroup = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateLoadBalancerPayload) SetName(v string) { + o.Name = &v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetNetworks() []Network { + if o == nil || IsNil(o.Networks) { + var ret []Network + return ret + } + return o.Networks +} + +// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetNetworksOk() ([]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *CreateLoadBalancerPayload) SetNetworks(v []Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetOptions() LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret LoadBalancerOptions + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetOptionsOk() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *CreateLoadBalancerPayload) SetOptions(v LoadBalancerOptions) { + o.Options = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *CreateLoadBalancerPayload) SetPlanId(v string) { + o.PlanId = &v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetPrivateAddress() string { + if o == nil || IsNil(o.PrivateAddress) { + var ret string + return ret + } + return *o.PrivateAddress +} + +// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetPrivateAddressOk() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *CreateLoadBalancerPayload) SetPrivateAddress(v string) { + o.PrivateAddress = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *CreateLoadBalancerPayload) SetRegion(v string) { + o.Region = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CreateLoadBalancerPayload) SetStatus(v string) { + o.Status = &v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetTargetPools() []TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret []TargetPool + return ret + } + return o.TargetPools +} + +// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetTargetPoolsOk() ([]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *CreateLoadBalancerPayload) SetTargetPools(v []TargetPool) { + o.TargetPools = v +} + +// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetTargetSecurityGroup() SecurityGroup { + if o == nil || IsNil(o.TargetSecurityGroup) { + var ret SecurityGroup + return ret + } + return *o.TargetSecurityGroup +} + +// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetTargetSecurityGroupOk() (*SecurityGroup, bool) { + if o == nil || IsNil(o.TargetSecurityGroup) { + return nil, false + } + return o.TargetSecurityGroup, true +} + +// HasTargetSecurityGroup returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasTargetSecurityGroup() bool { + if o != nil && !IsNil(o.TargetSecurityGroup) { + return true + } + + return false +} + +// SetTargetSecurityGroup gets a reference to the given SecurityGroup and assigns it to the TargetSecurityGroup field. +func (o *CreateLoadBalancerPayload) SetTargetSecurityGroup(v SecurityGroup) { + o.TargetSecurityGroup = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLoadBalancerPayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *CreateLoadBalancerPayload) SetVersion(v string) { + o.Version = &v +} + +func (o CreateLoadBalancerPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisableTargetSecurityGroupAssignment) { + toSerialize["disableTargetSecurityGroupAssignment"] = o.DisableTargetSecurityGroupAssignment + } + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.LoadBalancerSecurityGroup) { + toSerialize["loadBalancerSecurityGroup"] = o.LoadBalancerSecurityGroup + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.TargetSecurityGroup) { + toSerialize["targetSecurityGroup"] = o.TargetSecurityGroup + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableCreateLoadBalancerPayload struct { + value *CreateLoadBalancerPayload + isSet bool +} + +func (v NullableCreateLoadBalancerPayload) Get() *CreateLoadBalancerPayload { + return v.value +} + +func (v *NullableCreateLoadBalancerPayload) Set(val *CreateLoadBalancerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateLoadBalancerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateLoadBalancerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateLoadBalancerPayload(val *CreateLoadBalancerPayload) *NullableCreateLoadBalancerPayload { + return &NullableCreateLoadBalancerPayload{value: val, isSet: true} +} + +func (v NullableCreateLoadBalancerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateLoadBalancerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_credentials_response.go b/services/loadbalancer/v2api/model_credentials_response.go new file mode 100644 index 000000000..a494d14d0 --- /dev/null +++ b/services/loadbalancer/v2api/model_credentials_response.go @@ -0,0 +1,236 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialsResponse{} + +// CredentialsResponse struct for CredentialsResponse +type CredentialsResponse struct { + // The credentials reference can be used for observability of the Load Balancer. + CredentialsRef *string `json:"credentialsRef,omitempty"` + // Credential name + DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + // Region of the Credential + Region *string `json:"region,omitempty"` + // The username used for the STACKIT Observability instance + Username *string `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 +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 +func NewCredentialsResponseWithDefaults() *CredentialsResponse { + this := CredentialsResponse{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *CredentialsResponse) GetCredentialsRef() string { + if o == nil || IsNil(o.CredentialsRef) { + var ret string + return ret + } + return *o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *CredentialsResponse) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *CredentialsResponse) SetCredentialsRef(v string) { + o.CredentialsRef = &v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *CredentialsResponse) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *CredentialsResponse) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *CredentialsResponse) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *CredentialsResponse) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *CredentialsResponse) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *CredentialsResponse) SetRegion(v string) { + o.Region = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CredentialsResponse) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CredentialsResponse) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CredentialsResponse) SetUsername(v string) { + o.Username = &v +} + +func (o CredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableCredentialsResponse struct { + value *CredentialsResponse + isSet bool +} + +func (v NullableCredentialsResponse) Get() *CredentialsResponse { + return v.value +} + +func (v *NullableCredentialsResponse) Set(val *CredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialsResponse(val *CredentialsResponse) *NullableCredentialsResponse { + return &NullableCredentialsResponse{value: val, isSet: true} +} + +func (v NullableCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_get_credentials_response.go b/services/loadbalancer/v2api/model_get_credentials_response.go new file mode 100644 index 000000000..66098931e --- /dev/null +++ b/services/loadbalancer/v2api/model_get_credentials_response.go @@ -0,0 +1,124 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetCredentialsResponse{} + +// GetCredentialsResponse struct for GetCredentialsResponse +type GetCredentialsResponse struct { + Credential *CredentialsResponse `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 +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 +func NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse { + this := GetCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *GetCredentialsResponse) GetCredential() CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret CredentialsResponse + return ret + } + return *o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *GetCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *GetCredentialsResponse) SetCredential(v CredentialsResponse) { + o.Credential = &v +} + +func (o GetCredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableGetCredentialsResponse struct { + value *GetCredentialsResponse + isSet bool +} + +func (v NullableGetCredentialsResponse) Get() *GetCredentialsResponse { + return v.value +} + +func (v *NullableGetCredentialsResponse) Set(val *GetCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCredentialsResponse(val *GetCredentialsResponse) *NullableGetCredentialsResponse { + return &NullableGetCredentialsResponse{value: val, isSet: true} +} + +func (v NullableGetCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_get_quota_response.go b/services/loadbalancer/v2api/model_get_quota_response.go new file mode 100644 index 000000000..d702216cf --- /dev/null +++ b/services/loadbalancer/v2api/model_get_quota_response.go @@ -0,0 +1,310 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the GetQuotaResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetQuotaResponse{} + +// GetQuotaResponse struct for GetQuotaResponse +type GetQuotaResponse struct { + // The maximum number of observability credentials that can be stored in this project. + MaxCredentials *int32 `json:"maxCredentials,omitempty"` + // The maximum number of load balancing servers in this project. Unlimited if set to -1. + MaxLoadBalancers *int32 `json:"maxLoadBalancers,omitempty"` + // Project identifier + ProjectId *string `json:"projectId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"` + // Region + Region *string `json:"region,omitempty" validate:"regexp=^[a-z]{2,4}[0-9]{2}$"` + // The number of observability credentials that are currently existing in this project. + UsedCredentials *int32 `json:"usedCredentials,omitempty"` + // The number of load balancing servers that are currently existing in this project. + UsedLoadBalancers *int32 `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 +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 +func NewGetQuotaResponseWithDefaults() *GetQuotaResponse { + this := GetQuotaResponse{} + return &this +} + +// GetMaxCredentials returns the MaxCredentials field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetMaxCredentials() int32 { + if o == nil || IsNil(o.MaxCredentials) { + var ret int32 + return ret + } + return *o.MaxCredentials +} + +// GetMaxCredentialsOk returns a tuple with the MaxCredentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetMaxCredentialsOk() (*int32, bool) { + if o == nil || IsNil(o.MaxCredentials) { + return nil, false + } + return o.MaxCredentials, true +} + +// HasMaxCredentials returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasMaxCredentials() bool { + if o != nil && !IsNil(o.MaxCredentials) { + return true + } + + return false +} + +// SetMaxCredentials gets a reference to the given int32 and assigns it to the MaxCredentials field. +func (o *GetQuotaResponse) SetMaxCredentials(v int32) { + o.MaxCredentials = &v +} + +// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetMaxLoadBalancers() int32 { + if o == nil || IsNil(o.MaxLoadBalancers) { + var ret int32 + return ret + } + return *o.MaxLoadBalancers +} + +// GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (*int32, bool) { + if o == nil || IsNil(o.MaxLoadBalancers) { + return nil, false + } + return o.MaxLoadBalancers, true +} + +// HasMaxLoadBalancers returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasMaxLoadBalancers() bool { + if o != nil && !IsNil(o.MaxLoadBalancers) { + return true + } + + return false +} + +// SetMaxLoadBalancers gets a reference to the given int32 and assigns it to the MaxLoadBalancers field. +func (o *GetQuotaResponse) SetMaxLoadBalancers(v int32) { + o.MaxLoadBalancers = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GetQuotaResponse) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *GetQuotaResponse) SetRegion(v string) { + o.Region = &v +} + +// GetUsedCredentials returns the UsedCredentials field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetUsedCredentials() int32 { + if o == nil || IsNil(o.UsedCredentials) { + var ret int32 + return ret + } + return *o.UsedCredentials +} + +// GetUsedCredentialsOk returns a tuple with the UsedCredentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetUsedCredentialsOk() (*int32, bool) { + if o == nil || IsNil(o.UsedCredentials) { + return nil, false + } + return o.UsedCredentials, true +} + +// HasUsedCredentials returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasUsedCredentials() bool { + if o != nil && !IsNil(o.UsedCredentials) { + return true + } + + return false +} + +// SetUsedCredentials gets a reference to the given int32 and assigns it to the UsedCredentials field. +func (o *GetQuotaResponse) SetUsedCredentials(v int32) { + o.UsedCredentials = &v +} + +// GetUsedLoadBalancers returns the UsedLoadBalancers field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetUsedLoadBalancers() int32 { + if o == nil || IsNil(o.UsedLoadBalancers) { + var ret int32 + return ret + } + return *o.UsedLoadBalancers +} + +// GetUsedLoadBalancersOk returns a tuple with the UsedLoadBalancers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetUsedLoadBalancersOk() (*int32, bool) { + if o == nil || IsNil(o.UsedLoadBalancers) { + return nil, false + } + return o.UsedLoadBalancers, true +} + +// HasUsedLoadBalancers returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasUsedLoadBalancers() bool { + if o != nil && !IsNil(o.UsedLoadBalancers) { + return true + } + + return false +} + +// SetUsedLoadBalancers gets a reference to the given int32 and assigns it to the UsedLoadBalancers field. +func (o *GetQuotaResponse) SetUsedLoadBalancers(v int32) { + o.UsedLoadBalancers = &v +} + +func (o GetQuotaResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MaxCredentials) { + toSerialize["maxCredentials"] = o.MaxCredentials + } + if !IsNil(o.MaxLoadBalancers) { + toSerialize["maxLoadBalancers"] = o.MaxLoadBalancers + } + if !IsNil(o.ProjectId) { + toSerialize["projectId"] = o.ProjectId + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + if !IsNil(o.UsedCredentials) { + toSerialize["usedCredentials"] = o.UsedCredentials + } + if !IsNil(o.UsedLoadBalancers) { + toSerialize["usedLoadBalancers"] = o.UsedLoadBalancers + } + return toSerialize, nil +} + +type NullableGetQuotaResponse struct { + value *GetQuotaResponse + isSet bool +} + +func (v NullableGetQuotaResponse) Get() *GetQuotaResponse { + return v.value +} + +func (v *NullableGetQuotaResponse) Set(val *GetQuotaResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetQuotaResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetQuotaResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetQuotaResponse(val *GetQuotaResponse) *NullableGetQuotaResponse { + return &NullableGetQuotaResponse{value: val, isSet: true} +} + +func (v NullableGetQuotaResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetQuotaResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_google_protobuf_any.go b/services/loadbalancer/v2api/model_google_protobuf_any.go new file mode 100644 index 000000000..a3d1e3dc4 --- /dev/null +++ b/services/loadbalancer/v2api/model_google_protobuf_any.go @@ -0,0 +1,154 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GoogleProtobufAny{} + +// GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +type GoogleProtobufAny struct { + // The type of the serialized message. + Type *string `json:"@type,omitempty"` + AdditionalProperties map[string]interface{} +} + +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 +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 +func NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny { + this := GoogleProtobufAny{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GoogleProtobufAny) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleProtobufAny) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GoogleProtobufAny) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GoogleProtobufAny) SetType(v string) { + o.Type = &v +} + +func (o GoogleProtobufAny) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["@type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GoogleProtobufAny) UnmarshalJSON(data []byte) (err error) { + varGoogleProtobufAny := _GoogleProtobufAny{} + + err = json.Unmarshal(data, &varGoogleProtobufAny) + + if err != nil { + return err + } + + *o = GoogleProtobufAny(varGoogleProtobufAny) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "@type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGoogleProtobufAny struct { + value *GoogleProtobufAny + isSet bool +} + +func (v NullableGoogleProtobufAny) Get() *GoogleProtobufAny { + return v.value +} + +func (v *NullableGoogleProtobufAny) Set(val *GoogleProtobufAny) { + v.value = val + v.isSet = true +} + +func (v NullableGoogleProtobufAny) IsSet() bool { + return v.isSet +} + +func (v *NullableGoogleProtobufAny) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGoogleProtobufAny(val *GoogleProtobufAny) *NullableGoogleProtobufAny { + return &NullableGoogleProtobufAny{value: val, isSet: true} +} + +func (v NullableGoogleProtobufAny) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGoogleProtobufAny) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_http_health_checks.go b/services/loadbalancer/v2api/model_http_health_checks.go new file mode 100644 index 000000000..dfb6f0aa9 --- /dev/null +++ b/services/loadbalancer/v2api/model_http_health_checks.go @@ -0,0 +1,198 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the HttpHealthChecks type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HttpHealthChecks{} + +// HttpHealthChecks Options for the HTTP health checking. +type HttpHealthChecks struct { + // List of HTTP status codes that indicate a healthy response + OkStatuses []string `json:"okStatuses,omitempty"` + // Path to send the health check request to + Path *string `json:"path,omitempty"` + Tls *TlsConfig `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 +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 +func NewHttpHealthChecksWithDefaults() *HttpHealthChecks { + this := HttpHealthChecks{} + return &this +} + +// GetOkStatuses returns the OkStatuses field value if set, zero value otherwise. +func (o *HttpHealthChecks) GetOkStatuses() []string { + if o == nil || IsNil(o.OkStatuses) { + var ret []string + return ret + } + return o.OkStatuses +} + +// GetOkStatusesOk returns a tuple with the OkStatuses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpHealthChecks) GetOkStatusesOk() ([]string, bool) { + if o == nil || IsNil(o.OkStatuses) { + return nil, false + } + return o.OkStatuses, true +} + +// HasOkStatuses returns a boolean if a field has been set. +func (o *HttpHealthChecks) HasOkStatuses() bool { + if o != nil && !IsNil(o.OkStatuses) { + return true + } + + return false +} + +// SetOkStatuses gets a reference to the given []string and assigns it to the OkStatuses field. +func (o *HttpHealthChecks) SetOkStatuses(v []string) { + o.OkStatuses = v +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *HttpHealthChecks) GetPath() string { + if o == nil || IsNil(o.Path) { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpHealthChecks) GetPathOk() (*string, bool) { + if o == nil || IsNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *HttpHealthChecks) HasPath() bool { + if o != nil && !IsNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *HttpHealthChecks) SetPath(v string) { + o.Path = &v +} + +// GetTls returns the Tls field value if set, zero value otherwise. +func (o *HttpHealthChecks) GetTls() TlsConfig { + if o == nil || IsNil(o.Tls) { + var ret TlsConfig + return ret + } + return *o.Tls +} + +// GetTlsOk returns a tuple with the Tls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpHealthChecks) GetTlsOk() (*TlsConfig, bool) { + if o == nil || IsNil(o.Tls) { + return nil, false + } + return o.Tls, true +} + +// HasTls returns a boolean if a field has been set. +func (o *HttpHealthChecks) HasTls() bool { + if o != nil && !IsNil(o.Tls) { + return true + } + + return false +} + +// SetTls gets a reference to the given TlsConfig and assigns it to the Tls field. +func (o *HttpHealthChecks) SetTls(v TlsConfig) { + o.Tls = &v +} + +func (o HttpHealthChecks) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HttpHealthChecks) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.OkStatuses) { + toSerialize["okStatuses"] = o.OkStatuses + } + if !IsNil(o.Path) { + toSerialize["path"] = o.Path + } + if !IsNil(o.Tls) { + toSerialize["tls"] = o.Tls + } + return toSerialize, nil +} + +type NullableHttpHealthChecks struct { + value *HttpHealthChecks + isSet bool +} + +func (v NullableHttpHealthChecks) Get() *HttpHealthChecks { + return v.value +} + +func (v *NullableHttpHealthChecks) Set(val *HttpHealthChecks) { + v.value = val + v.isSet = true +} + +func (v NullableHttpHealthChecks) IsSet() bool { + return v.isSet +} + +func (v *NullableHttpHealthChecks) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHttpHealthChecks(val *HttpHealthChecks) *NullableHttpHealthChecks { + return &NullableHttpHealthChecks{value: val, isSet: true} +} + +func (v NullableHttpHealthChecks) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHttpHealthChecks) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_list_credentials_response.go b/services/loadbalancer/v2api/model_list_credentials_response.go new file mode 100644 index 000000000..4defe226b --- /dev/null +++ b/services/loadbalancer/v2api/model_list_credentials_response.go @@ -0,0 +1,124 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCredentialsResponse{} + +// ListCredentialsResponse struct for ListCredentialsResponse +type ListCredentialsResponse struct { + Credentials []CredentialsResponse `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 +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 +func NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { + this := ListCredentialsResponse{} + return &this +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *ListCredentialsResponse) GetCredentials() []CredentialsResponse { + if o == nil || IsNil(o.Credentials) { + var ret []CredentialsResponse + return ret + } + return o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCredentialsResponse) GetCredentialsOk() ([]CredentialsResponse, bool) { + if o == nil || IsNil(o.Credentials) { + return nil, false + } + return o.Credentials, true +} + +// HasCredentials returns a boolean if a field has been set. +func (o *ListCredentialsResponse) HasCredentials() bool { + if o != nil && !IsNil(o.Credentials) { + return true + } + + return false +} + +// SetCredentials gets a reference to the given []CredentialsResponse and assigns it to the Credentials field. +func (o *ListCredentialsResponse) SetCredentials(v []CredentialsResponse) { + o.Credentials = v +} + +func (o ListCredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credentials) { + toSerialize["credentials"] = o.Credentials + } + return toSerialize, nil +} + +type NullableListCredentialsResponse struct { + value *ListCredentialsResponse + isSet bool +} + +func (v NullableListCredentialsResponse) Get() *ListCredentialsResponse { + return v.value +} + +func (v *NullableListCredentialsResponse) Set(val *ListCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCredentialsResponse(val *ListCredentialsResponse) *NullableListCredentialsResponse { + return &NullableListCredentialsResponse{value: val, isSet: true} +} + +func (v NullableListCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_list_load_balancers_response.go b/services/loadbalancer/v2api/model_list_load_balancers_response.go new file mode 100644 index 000000000..610bb7829 --- /dev/null +++ b/services/loadbalancer/v2api/model_list_load_balancers_response.go @@ -0,0 +1,161 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the ListLoadBalancersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListLoadBalancersResponse{} + +// ListLoadBalancersResponse struct for ListLoadBalancersResponse +type ListLoadBalancersResponse struct { + LoadBalancers []LoadBalancer `json:"loadBalancers,omitempty"` + // Continue token from the ListLoadBalancerResponse with Limit option + NextPageId *string `json:"nextPageId,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` +} + +// 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 +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 +func NewListLoadBalancersResponseWithDefaults() *ListLoadBalancersResponse { + this := ListLoadBalancersResponse{} + return &this +} + +// GetLoadBalancers returns the LoadBalancers field value if set, zero value otherwise. +func (o *ListLoadBalancersResponse) GetLoadBalancers() []LoadBalancer { + if o == nil || IsNil(o.LoadBalancers) { + var ret []LoadBalancer + return ret + } + return o.LoadBalancers +} + +// GetLoadBalancersOk returns a tuple with the LoadBalancers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLoadBalancersResponse) GetLoadBalancersOk() ([]LoadBalancer, bool) { + if o == nil || IsNil(o.LoadBalancers) { + return nil, false + } + return o.LoadBalancers, true +} + +// HasLoadBalancers returns a boolean if a field has been set. +func (o *ListLoadBalancersResponse) HasLoadBalancers() bool { + if o != nil && !IsNil(o.LoadBalancers) { + return true + } + + return false +} + +// SetLoadBalancers gets a reference to the given []LoadBalancer and assigns it to the LoadBalancers field. +func (o *ListLoadBalancersResponse) SetLoadBalancers(v []LoadBalancer) { + o.LoadBalancers = v +} + +// GetNextPageId returns the NextPageId field value if set, zero value otherwise. +func (o *ListLoadBalancersResponse) GetNextPageId() string { + if o == nil || IsNil(o.NextPageId) { + var ret string + return ret + } + return *o.NextPageId +} + +// GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLoadBalancersResponse) GetNextPageIdOk() (*string, bool) { + if o == nil || IsNil(o.NextPageId) { + return nil, false + } + return o.NextPageId, true +} + +// HasNextPageId returns a boolean if a field has been set. +func (o *ListLoadBalancersResponse) HasNextPageId() bool { + if o != nil && !IsNil(o.NextPageId) { + return true + } + + return false +} + +// SetNextPageId gets a reference to the given string and assigns it to the NextPageId field. +func (o *ListLoadBalancersResponse) SetNextPageId(v string) { + o.NextPageId = &v +} + +func (o ListLoadBalancersResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LoadBalancers) { + toSerialize["loadBalancers"] = o.LoadBalancers + } + if !IsNil(o.NextPageId) { + toSerialize["nextPageId"] = o.NextPageId + } + return toSerialize, nil +} + +type NullableListLoadBalancersResponse struct { + value *ListLoadBalancersResponse + isSet bool +} + +func (v NullableListLoadBalancersResponse) Get() *ListLoadBalancersResponse { + return v.value +} + +func (v *NullableListLoadBalancersResponse) Set(val *ListLoadBalancersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListLoadBalancersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListLoadBalancersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListLoadBalancersResponse(val *ListLoadBalancersResponse) *NullableListLoadBalancersResponse { + return &NullableListLoadBalancersResponse{value: val, isSet: true} +} + +func (v NullableListLoadBalancersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListLoadBalancersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_list_plans_response.go b/services/loadbalancer/v2api/model_list_plans_response.go new file mode 100644 index 000000000..4e92e7010 --- /dev/null +++ b/services/loadbalancer/v2api/model_list_plans_response.go @@ -0,0 +1,124 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the ListPlansResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPlansResponse{} + +// ListPlansResponse struct for ListPlansResponse +type ListPlansResponse struct { + ValidPlans []PlanDetails `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 +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 +func NewListPlansResponseWithDefaults() *ListPlansResponse { + this := ListPlansResponse{} + return &this +} + +// GetValidPlans returns the ValidPlans field value if set, zero value otherwise. +func (o *ListPlansResponse) GetValidPlans() []PlanDetails { + if o == nil || IsNil(o.ValidPlans) { + var ret []PlanDetails + return ret + } + return o.ValidPlans +} + +// GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListPlansResponse) GetValidPlansOk() ([]PlanDetails, bool) { + if o == nil || IsNil(o.ValidPlans) { + return nil, false + } + return o.ValidPlans, true +} + +// HasValidPlans returns a boolean if a field has been set. +func (o *ListPlansResponse) HasValidPlans() bool { + if o != nil && !IsNil(o.ValidPlans) { + return true + } + + return false +} + +// SetValidPlans gets a reference to the given []PlanDetails and assigns it to the ValidPlans field. +func (o *ListPlansResponse) SetValidPlans(v []PlanDetails) { + o.ValidPlans = v +} + +func (o ListPlansResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListPlansResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ValidPlans) { + toSerialize["validPlans"] = o.ValidPlans + } + return toSerialize, nil +} + +type NullableListPlansResponse struct { + value *ListPlansResponse + isSet bool +} + +func (v NullableListPlansResponse) Get() *ListPlansResponse { + return v.value +} + +func (v *NullableListPlansResponse) Set(val *ListPlansResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListPlansResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListPlansResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListPlansResponse(val *ListPlansResponse) *NullableListPlansResponse { + return &NullableListPlansResponse{value: val, isSet: true} +} + +func (v NullableListPlansResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListPlansResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_listener.go b/services/loadbalancer/v2api/model_listener.go new file mode 100644 index 000000000..977a7ef60 --- /dev/null +++ b/services/loadbalancer/v2api/model_listener.go @@ -0,0 +1,381 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the Listener type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Listener{} + +// Listener struct for Listener +type Listener struct { + DisplayName *string `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 *string `json:"name,omitempty"` + // Port number where we listen for traffic + Port *int32 `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 *string `json:"protocol,omitempty"` + // Server Name Indicators config for domains to be routed to the desired target pool for this listener. + ServerNameIndicators []ServerNameIndicator `json:"serverNameIndicators,omitempty"` + // Reference target pool by target pool name. + TargetPool *string `json:"targetPool,omitempty"` + Tcp *OptionsTCP `json:"tcp,omitempty"` + Udp *OptionsUDP `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 +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 +func NewListenerWithDefaults() *Listener { + this := Listener{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *Listener) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *Listener) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *Listener) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Listener) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Listener) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Listener) SetName(v string) { + o.Name = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *Listener) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *Listener) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *Listener) SetPort(v int32) { + o.Port = &v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *Listener) GetProtocol() string { + if o == nil || IsNil(o.Protocol) { + var ret string + return ret + } + return *o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetProtocolOk() (*string, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *Listener) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given string and assigns it to the Protocol field. +func (o *Listener) SetProtocol(v string) { + o.Protocol = &v +} + +// GetServerNameIndicators returns the ServerNameIndicators field value if set, zero value otherwise. +func (o *Listener) GetServerNameIndicators() []ServerNameIndicator { + if o == nil || IsNil(o.ServerNameIndicators) { + var ret []ServerNameIndicator + return ret + } + return o.ServerNameIndicators +} + +// GetServerNameIndicatorsOk returns a tuple with the ServerNameIndicators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetServerNameIndicatorsOk() ([]ServerNameIndicator, bool) { + if o == nil || IsNil(o.ServerNameIndicators) { + return nil, false + } + return o.ServerNameIndicators, true +} + +// HasServerNameIndicators returns a boolean if a field has been set. +func (o *Listener) HasServerNameIndicators() bool { + if o != nil && !IsNil(o.ServerNameIndicators) { + return true + } + + return false +} + +// SetServerNameIndicators gets a reference to the given []ServerNameIndicator and assigns it to the ServerNameIndicators field. +func (o *Listener) SetServerNameIndicators(v []ServerNameIndicator) { + o.ServerNameIndicators = v +} + +// GetTargetPool returns the TargetPool field value if set, zero value otherwise. +func (o *Listener) GetTargetPool() string { + if o == nil || IsNil(o.TargetPool) { + var ret string + return ret + } + return *o.TargetPool +} + +// GetTargetPoolOk returns a tuple with the TargetPool field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetTargetPoolOk() (*string, bool) { + if o == nil || IsNil(o.TargetPool) { + return nil, false + } + return o.TargetPool, true +} + +// HasTargetPool returns a boolean if a field has been set. +func (o *Listener) HasTargetPool() bool { + if o != nil && !IsNil(o.TargetPool) { + return true + } + + return false +} + +// SetTargetPool gets a reference to the given string and assigns it to the TargetPool field. +func (o *Listener) SetTargetPool(v string) { + o.TargetPool = &v +} + +// GetTcp returns the Tcp field value if set, zero value otherwise. +func (o *Listener) GetTcp() OptionsTCP { + if o == nil || IsNil(o.Tcp) { + var ret OptionsTCP + return ret + } + return *o.Tcp +} + +// GetTcpOk returns a tuple with the Tcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetTcpOk() (*OptionsTCP, bool) { + if o == nil || IsNil(o.Tcp) { + return nil, false + } + return o.Tcp, true +} + +// HasTcp returns a boolean if a field has been set. +func (o *Listener) HasTcp() bool { + if o != nil && !IsNil(o.Tcp) { + return true + } + + return false +} + +// SetTcp gets a reference to the given OptionsTCP and assigns it to the Tcp field. +func (o *Listener) SetTcp(v OptionsTCP) { + o.Tcp = &v +} + +// GetUdp returns the Udp field value if set, zero value otherwise. +func (o *Listener) GetUdp() OptionsUDP { + if o == nil || IsNil(o.Udp) { + var ret OptionsUDP + return ret + } + return *o.Udp +} + +// GetUdpOk returns a tuple with the Udp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetUdpOk() (*OptionsUDP, bool) { + if o == nil || IsNil(o.Udp) { + return nil, false + } + return o.Udp, true +} + +// HasUdp returns a boolean if a field has been set. +func (o *Listener) HasUdp() bool { + if o != nil && !IsNil(o.Udp) { + return true + } + + return false +} + +// SetUdp gets a reference to the given OptionsUDP and assigns it to the Udp field. +func (o *Listener) SetUdp(v OptionsUDP) { + o.Udp = &v +} + +func (o Listener) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Listener) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.ServerNameIndicators) { + toSerialize["serverNameIndicators"] = o.ServerNameIndicators + } + if !IsNil(o.TargetPool) { + toSerialize["targetPool"] = o.TargetPool + } + if !IsNil(o.Tcp) { + toSerialize["tcp"] = o.Tcp + } + if !IsNil(o.Udp) { + toSerialize["udp"] = o.Udp + } + return toSerialize, nil +} + +type NullableListener struct { + value *Listener + isSet bool +} + +func (v NullableListener) Get() *Listener { + return v.value +} + +func (v *NullableListener) Set(val *Listener) { + v.value = val + v.isSet = true +} + +func (v NullableListener) IsSet() bool { + return v.isSet +} + +func (v *NullableListener) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListener(val *Listener) *NullableListener { + return &NullableListener{value: val, isSet: true} +} + +func (v NullableListener) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListener) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_load_balancer.go b/services/loadbalancer/v2api/model_load_balancer.go new file mode 100644 index 000000000..909cf10d3 --- /dev/null +++ b/services/loadbalancer/v2api/model_load_balancer.go @@ -0,0 +1,678 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancer{} + +// LoadBalancer struct for LoadBalancer +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 *bool `json:"disableTargetSecurityGroupAssignment,omitempty"` + // Reports all errors a load balancer has. + Errors []LoadBalancerError `json:"errors,omitempty"` + // External load balancer IP address where this load balancer is exposed. Not changeable after creation. + ExternalAddress *string `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 *map[string]string `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 []Listener `json:"listeners,omitempty"` + // Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. + LoadBalancerSecurityGroup *SecurityGroup `json:"loadBalancerSecurityGroup,omitempty"` + // Load balancer name. Not changeable after creation. + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. + Networks []Network `json:"networks,omitempty"` + Options *LoadBalancerOptions `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 *string `json:"planId,omitempty"` + // Transient private load balancer IP address that can change any time. + PrivateAddress *string `json:"privateAddress,omitempty"` + // Region of the LoadBalancer + Region *string `json:"region,omitempty"` + Status *string `json:"status,omitempty"` + // List of all target pools which will be used in the load balancer. Limited to 20. + TargetPools []TargetPool `json:"targetPools,omitempty"` + // Security Group that allows the targets to receive traffic from the LoadBalancer. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. + TargetSecurityGroup *SecurityGroup `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 *string `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 +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 +func NewLoadBalancerWithDefaults() *LoadBalancer { + this := LoadBalancer{} + return &this +} + +// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. +func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignment() bool { + if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { + var ret bool + return ret + } + return *o.DisableTargetSecurityGroupAssignment +} + +// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignmentOk() (*bool, bool) { + if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { + return nil, false + } + return o.DisableTargetSecurityGroupAssignment, true +} + +// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. +func (o *LoadBalancer) HasDisableTargetSecurityGroupAssignment() bool { + if o != nil && !IsNil(o.DisableTargetSecurityGroupAssignment) { + return true + } + + return false +} + +// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. +func (o *LoadBalancer) SetDisableTargetSecurityGroupAssignment(v bool) { + o.DisableTargetSecurityGroupAssignment = &v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *LoadBalancer) GetErrors() []LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret []LoadBalancerError + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetErrorsOk() ([]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *LoadBalancer) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *LoadBalancer) SetErrors(v []LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *LoadBalancer) GetExternalAddress() string { + if o == nil || IsNil(o.ExternalAddress) { + var ret string + return ret + } + return *o.ExternalAddress +} + +// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetExternalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *LoadBalancer) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *LoadBalancer) SetExternalAddress(v string) { + o.ExternalAddress = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *LoadBalancer) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *LoadBalancer) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *LoadBalancer) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *LoadBalancer) GetListeners() []Listener { + if o == nil || IsNil(o.Listeners) { + var ret []Listener + return ret + } + return o.Listeners +} + +// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetListenersOk() ([]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *LoadBalancer) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *LoadBalancer) SetListeners(v []Listener) { + o.Listeners = v +} + +// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. +func (o *LoadBalancer) GetLoadBalancerSecurityGroup() SecurityGroup { + if o == nil || IsNil(o.LoadBalancerSecurityGroup) { + var ret SecurityGroup + return ret + } + return *o.LoadBalancerSecurityGroup +} + +// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetLoadBalancerSecurityGroupOk() (*SecurityGroup, bool) { + if o == nil || IsNil(o.LoadBalancerSecurityGroup) { + return nil, false + } + return o.LoadBalancerSecurityGroup, true +} + +// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. +func (o *LoadBalancer) HasLoadBalancerSecurityGroup() bool { + if o != nil && !IsNil(o.LoadBalancerSecurityGroup) { + return true + } + + return false +} + +// SetLoadBalancerSecurityGroup gets a reference to the given SecurityGroup and assigns it to the LoadBalancerSecurityGroup field. +func (o *LoadBalancer) SetLoadBalancerSecurityGroup(v SecurityGroup) { + o.LoadBalancerSecurityGroup = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LoadBalancer) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *LoadBalancer) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *LoadBalancer) SetName(v string) { + o.Name = &v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *LoadBalancer) GetNetworks() []Network { + if o == nil || IsNil(o.Networks) { + var ret []Network + return ret + } + return o.Networks +} + +// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetNetworksOk() ([]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *LoadBalancer) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *LoadBalancer) SetNetworks(v []Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *LoadBalancer) GetOptions() LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret LoadBalancerOptions + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetOptionsOk() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *LoadBalancer) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *LoadBalancer) SetOptions(v LoadBalancerOptions) { + o.Options = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *LoadBalancer) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *LoadBalancer) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *LoadBalancer) SetPlanId(v string) { + o.PlanId = &v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *LoadBalancer) GetPrivateAddress() string { + if o == nil || IsNil(o.PrivateAddress) { + var ret string + return ret + } + return *o.PrivateAddress +} + +// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetPrivateAddressOk() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *LoadBalancer) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *LoadBalancer) SetPrivateAddress(v string) { + o.PrivateAddress = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *LoadBalancer) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *LoadBalancer) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *LoadBalancer) SetRegion(v string) { + o.Region = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LoadBalancer) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *LoadBalancer) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *LoadBalancer) SetStatus(v string) { + o.Status = &v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *LoadBalancer) GetTargetPools() []TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret []TargetPool + return ret + } + return o.TargetPools +} + +// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetTargetPoolsOk() ([]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *LoadBalancer) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *LoadBalancer) SetTargetPools(v []TargetPool) { + o.TargetPools = v +} + +// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. +func (o *LoadBalancer) GetTargetSecurityGroup() SecurityGroup { + if o == nil || IsNil(o.TargetSecurityGroup) { + var ret SecurityGroup + return ret + } + return *o.TargetSecurityGroup +} + +// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetTargetSecurityGroupOk() (*SecurityGroup, bool) { + if o == nil || IsNil(o.TargetSecurityGroup) { + return nil, false + } + return o.TargetSecurityGroup, true +} + +// HasTargetSecurityGroup returns a boolean if a field has been set. +func (o *LoadBalancer) HasTargetSecurityGroup() bool { + if o != nil && !IsNil(o.TargetSecurityGroup) { + return true + } + + return false +} + +// SetTargetSecurityGroup gets a reference to the given SecurityGroup and assigns it to the TargetSecurityGroup field. +func (o *LoadBalancer) SetTargetSecurityGroup(v SecurityGroup) { + o.TargetSecurityGroup = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *LoadBalancer) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *LoadBalancer) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *LoadBalancer) SetVersion(v string) { + o.Version = &v +} + +func (o LoadBalancer) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisableTargetSecurityGroupAssignment) { + toSerialize["disableTargetSecurityGroupAssignment"] = o.DisableTargetSecurityGroupAssignment + } + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.LoadBalancerSecurityGroup) { + toSerialize["loadBalancerSecurityGroup"] = o.LoadBalancerSecurityGroup + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.TargetSecurityGroup) { + toSerialize["targetSecurityGroup"] = o.TargetSecurityGroup + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableLoadBalancer struct { + value *LoadBalancer + isSet bool +} + +func (v NullableLoadBalancer) Get() *LoadBalancer { + return v.value +} + +func (v *NullableLoadBalancer) Set(val *LoadBalancer) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancer) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancer(val *LoadBalancer) *NullableLoadBalancer { + return &NullableLoadBalancer{value: val, isSet: true} +} + +func (v NullableLoadBalancer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_load_balancer_error.go b/services/loadbalancer/v2api/model_load_balancer_error.go new file mode 100644 index 000000000..2bd3ab9a7 --- /dev/null +++ b/services/loadbalancer/v2api/model_load_balancer_error.go @@ -0,0 +1,162 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the LoadBalancerError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerError{} + +// LoadBalancerError struct for LoadBalancerError +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 *string `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 *string `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 +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 +func NewLoadBalancerErrorWithDefaults() *LoadBalancerError { + this := LoadBalancerError{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LoadBalancerError) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerError) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *LoadBalancerError) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *LoadBalancerError) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *LoadBalancerError) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerError) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *LoadBalancerError) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *LoadBalancerError) SetType(v string) { + o.Type = &v +} + +func (o LoadBalancerError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableLoadBalancerError struct { + value *LoadBalancerError + isSet bool +} + +func (v NullableLoadBalancerError) Get() *LoadBalancerError { + return v.value +} + +func (v *NullableLoadBalancerError) Set(val *LoadBalancerError) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerError) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerError(val *LoadBalancerError) *NullableLoadBalancerError { + return &NullableLoadBalancerError{value: val, isSet: true} +} + +func (v NullableLoadBalancerError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_load_balancer_options.go b/services/loadbalancer/v2api/model_load_balancer_options.go new file mode 100644 index 000000000..02622b27e --- /dev/null +++ b/services/loadbalancer/v2api/model_load_balancer_options.go @@ -0,0 +1,233 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the LoadBalancerOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerOptions{} + +// LoadBalancerOptions Defines any optional functionality you want to have enabled on your load balancer. +type LoadBalancerOptions struct { + AccessControl *LoadbalancerOptionAccessControl `json:"accessControl,omitempty"` + EphemeralAddress *bool `json:"ephemeralAddress,omitempty"` + Observability *LoadbalancerOptionObservability `json:"observability,omitempty"` + // Load Balancer is accessible only via a private network ip address. Not changeable after creation. + PrivateNetworkOnly *bool `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 +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 +func NewLoadBalancerOptionsWithDefaults() *LoadBalancerOptions { + this := LoadBalancerOptions{} + return &this +} + +// GetAccessControl returns the AccessControl field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetAccessControl() LoadbalancerOptionAccessControl { + if o == nil || IsNil(o.AccessControl) { + var ret LoadbalancerOptionAccessControl + return ret + } + return *o.AccessControl +} + +// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetAccessControlOk() (*LoadbalancerOptionAccessControl, bool) { + if o == nil || IsNil(o.AccessControl) { + return nil, false + } + return o.AccessControl, true +} + +// HasAccessControl returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasAccessControl() bool { + if o != nil && !IsNil(o.AccessControl) { + return true + } + + return false +} + +// SetAccessControl gets a reference to the given LoadbalancerOptionAccessControl and assigns it to the AccessControl field. +func (o *LoadBalancerOptions) SetAccessControl(v LoadbalancerOptionAccessControl) { + o.AccessControl = &v +} + +// GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetEphemeralAddress() bool { + if o == nil || IsNil(o.EphemeralAddress) { + var ret bool + return ret + } + return *o.EphemeralAddress +} + +// GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetEphemeralAddressOk() (*bool, bool) { + if o == nil || IsNil(o.EphemeralAddress) { + return nil, false + } + return o.EphemeralAddress, true +} + +// HasEphemeralAddress returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasEphemeralAddress() bool { + if o != nil && !IsNil(o.EphemeralAddress) { + return true + } + + return false +} + +// SetEphemeralAddress gets a reference to the given bool and assigns it to the EphemeralAddress field. +func (o *LoadBalancerOptions) SetEphemeralAddress(v bool) { + o.EphemeralAddress = &v +} + +// GetObservability returns the Observability field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetObservability() LoadbalancerOptionObservability { + if o == nil || IsNil(o.Observability) { + var ret LoadbalancerOptionObservability + return ret + } + return *o.Observability +} + +// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetObservabilityOk() (*LoadbalancerOptionObservability, bool) { + if o == nil || IsNil(o.Observability) { + return nil, false + } + return o.Observability, true +} + +// HasObservability returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasObservability() bool { + if o != nil && !IsNil(o.Observability) { + return true + } + + return false +} + +// SetObservability gets a reference to the given LoadbalancerOptionObservability and assigns it to the Observability field. +func (o *LoadBalancerOptions) SetObservability(v LoadbalancerOptionObservability) { + o.Observability = &v +} + +// GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetPrivateNetworkOnly() bool { + if o == nil || IsNil(o.PrivateNetworkOnly) { + var ret bool + return ret + } + return *o.PrivateNetworkOnly +} + +// GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.PrivateNetworkOnly) { + return nil, false + } + return o.PrivateNetworkOnly, true +} + +// HasPrivateNetworkOnly returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasPrivateNetworkOnly() bool { + if o != nil && !IsNil(o.PrivateNetworkOnly) { + return true + } + + return false +} + +// SetPrivateNetworkOnly gets a reference to the given bool and assigns it to the PrivateNetworkOnly field. +func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v bool) { + o.PrivateNetworkOnly = &v +} + +func (o LoadBalancerOptions) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessControl) { + toSerialize["accessControl"] = o.AccessControl + } + if !IsNil(o.EphemeralAddress) { + toSerialize["ephemeralAddress"] = o.EphemeralAddress + } + if !IsNil(o.Observability) { + toSerialize["observability"] = o.Observability + } + if !IsNil(o.PrivateNetworkOnly) { + toSerialize["privateNetworkOnly"] = o.PrivateNetworkOnly + } + return toSerialize, nil +} + +type NullableLoadBalancerOptions struct { + value *LoadBalancerOptions + isSet bool +} + +func (v NullableLoadBalancerOptions) Get() *LoadBalancerOptions { + return v.value +} + +func (v *NullableLoadBalancerOptions) Set(val *LoadBalancerOptions) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerOptions(val *LoadBalancerOptions) *NullableLoadBalancerOptions { + return &NullableLoadBalancerOptions{value: val, isSet: true} +} + +func (v NullableLoadBalancerOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_loadbalancer_option_access_control.go b/services/loadbalancer/v2api/model_loadbalancer_option_access_control.go new file mode 100644 index 000000000..fa5b2947b --- /dev/null +++ b/services/loadbalancer/v2api/model_loadbalancer_option_access_control.go @@ -0,0 +1,125 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionAccessControl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionAccessControl{} + +// LoadbalancerOptionAccessControl Use this option to limit the IP ranges that can use the load balancer. +type LoadbalancerOptionAccessControl struct { + // Load Balancer is accessible only from an IP address in this range + AllowedSourceRanges []string `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 +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 +func NewLoadbalancerOptionAccessControlWithDefaults() *LoadbalancerOptionAccessControl { + this := LoadbalancerOptionAccessControl{} + return &this +} + +// GetAllowedSourceRanges returns the AllowedSourceRanges field value if set, zero value otherwise. +func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() []string { + if o == nil || IsNil(o.AllowedSourceRanges) { + var ret []string + return ret + } + return o.AllowedSourceRanges +} + +// GetAllowedSourceRangesOk returns a tuple with the AllowedSourceRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() ([]string, bool) { + if o == nil || IsNil(o.AllowedSourceRanges) { + return nil, false + } + return o.AllowedSourceRanges, true +} + +// HasAllowedSourceRanges returns a boolean if a field has been set. +func (o *LoadbalancerOptionAccessControl) HasAllowedSourceRanges() bool { + if o != nil && !IsNil(o.AllowedSourceRanges) { + return true + } + + return false +} + +// SetAllowedSourceRanges gets a reference to the given []string and assigns it to the AllowedSourceRanges field. +func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v []string) { + o.AllowedSourceRanges = v +} + +func (o LoadbalancerOptionAccessControl) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowedSourceRanges) { + toSerialize["allowedSourceRanges"] = o.AllowedSourceRanges + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionAccessControl struct { + value *LoadbalancerOptionAccessControl + isSet bool +} + +func (v NullableLoadbalancerOptionAccessControl) Get() *LoadbalancerOptionAccessControl { + return v.value +} + +func (v *NullableLoadbalancerOptionAccessControl) Set(val *LoadbalancerOptionAccessControl) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionAccessControl) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionAccessControl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionAccessControl(val *LoadbalancerOptionAccessControl) *NullableLoadbalancerOptionAccessControl { + return &NullableLoadbalancerOptionAccessControl{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionAccessControl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionAccessControl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_loadbalancer_option_logs.go b/services/loadbalancer/v2api/model_loadbalancer_option_logs.go new file mode 100644 index 000000000..89706fc82 --- /dev/null +++ b/services/loadbalancer/v2api/model_loadbalancer_option_logs.go @@ -0,0 +1,162 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionLogs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionLogs{} + +// LoadbalancerOptionLogs struct for LoadbalancerOptionLogs +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 *string `json:"credentialsRef,omitempty"` + // The Observability(Logs)/Loki remote write Push URL you want the logs to be shipped to. + PushUrl *string `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 +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 +func NewLoadbalancerOptionLogsWithDefaults() *LoadbalancerOptionLogs { + this := LoadbalancerOptionLogs{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *LoadbalancerOptionLogs) GetCredentialsRef() string { + if o == nil || IsNil(o.CredentialsRef) { + var ret string + return ret + } + return *o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *LoadbalancerOptionLogs) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *LoadbalancerOptionLogs) SetCredentialsRef(v string) { + o.CredentialsRef = &v +} + +// GetPushUrl returns the PushUrl field value if set, zero value otherwise. +func (o *LoadbalancerOptionLogs) GetPushUrl() string { + if o == nil || IsNil(o.PushUrl) { + var ret string + return ret + } + return *o.PushUrl +} + +// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionLogs) GetPushUrlOk() (*string, bool) { + if o == nil || IsNil(o.PushUrl) { + return nil, false + } + return o.PushUrl, true +} + +// HasPushUrl returns a boolean if a field has been set. +func (o *LoadbalancerOptionLogs) HasPushUrl() bool { + if o != nil && !IsNil(o.PushUrl) { + return true + } + + return false +} + +// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. +func (o *LoadbalancerOptionLogs) SetPushUrl(v string) { + o.PushUrl = &v +} + +func (o LoadbalancerOptionLogs) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.PushUrl) { + toSerialize["pushUrl"] = o.PushUrl + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionLogs struct { + value *LoadbalancerOptionLogs + isSet bool +} + +func (v NullableLoadbalancerOptionLogs) Get() *LoadbalancerOptionLogs { + return v.value +} + +func (v *NullableLoadbalancerOptionLogs) Set(val *LoadbalancerOptionLogs) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionLogs) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionLogs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionLogs(val *LoadbalancerOptionLogs) *NullableLoadbalancerOptionLogs { + return &NullableLoadbalancerOptionLogs{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionLogs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionLogs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_loadbalancer_option_metrics.go b/services/loadbalancer/v2api/model_loadbalancer_option_metrics.go new file mode 100644 index 000000000..e640c0b33 --- /dev/null +++ b/services/loadbalancer/v2api/model_loadbalancer_option_metrics.go @@ -0,0 +1,162 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionMetrics{} + +// LoadbalancerOptionMetrics struct for LoadbalancerOptionMetrics +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 *string `json:"credentialsRef,omitempty"` + // The Observability(Metrics)/Prometheus remote write push URL you want the metrics to be shipped to. + PushUrl *string `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 +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 +func NewLoadbalancerOptionMetricsWithDefaults() *LoadbalancerOptionMetrics { + this := LoadbalancerOptionMetrics{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *LoadbalancerOptionMetrics) GetCredentialsRef() string { + if o == nil || IsNil(o.CredentialsRef) { + var ret string + return ret + } + return *o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *LoadbalancerOptionMetrics) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v string) { + o.CredentialsRef = &v +} + +// GetPushUrl returns the PushUrl field value if set, zero value otherwise. +func (o *LoadbalancerOptionMetrics) GetPushUrl() string { + if o == nil || IsNil(o.PushUrl) { + var ret string + return ret + } + return *o.PushUrl +} + +// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (*string, bool) { + if o == nil || IsNil(o.PushUrl) { + return nil, false + } + return o.PushUrl, true +} + +// HasPushUrl returns a boolean if a field has been set. +func (o *LoadbalancerOptionMetrics) HasPushUrl() bool { + if o != nil && !IsNil(o.PushUrl) { + return true + } + + return false +} + +// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. +func (o *LoadbalancerOptionMetrics) SetPushUrl(v string) { + o.PushUrl = &v +} + +func (o LoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.PushUrl) { + toSerialize["pushUrl"] = o.PushUrl + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionMetrics struct { + value *LoadbalancerOptionMetrics + isSet bool +} + +func (v NullableLoadbalancerOptionMetrics) Get() *LoadbalancerOptionMetrics { + return v.value +} + +func (v *NullableLoadbalancerOptionMetrics) Set(val *LoadbalancerOptionMetrics) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionMetrics) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionMetrics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionMetrics(val *LoadbalancerOptionMetrics) *NullableLoadbalancerOptionMetrics { + return &NullableLoadbalancerOptionMetrics{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionMetrics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_loadbalancer_option_observability.go b/services/loadbalancer/v2api/model_loadbalancer_option_observability.go new file mode 100644 index 000000000..79e6122d9 --- /dev/null +++ b/services/loadbalancer/v2api/model_loadbalancer_option_observability.go @@ -0,0 +1,160 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionObservability type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionObservability{} + +// LoadbalancerOptionObservability We offer Load Balancer observability via STACKIT Observability or external solutions. +type LoadbalancerOptionObservability struct { + Logs *LoadbalancerOptionLogs `json:"logs,omitempty"` + Metrics *LoadbalancerOptionMetrics `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 +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 +func NewLoadbalancerOptionObservabilityWithDefaults() *LoadbalancerOptionObservability { + this := LoadbalancerOptionObservability{} + return &this +} + +// GetLogs returns the Logs field value if set, zero value otherwise. +func (o *LoadbalancerOptionObservability) GetLogs() LoadbalancerOptionLogs { + if o == nil || IsNil(o.Logs) { + var ret LoadbalancerOptionLogs + return ret + } + return *o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionObservability) GetLogsOk() (*LoadbalancerOptionLogs, bool) { + if o == nil || IsNil(o.Logs) { + return nil, false + } + return o.Logs, true +} + +// HasLogs returns a boolean if a field has been set. +func (o *LoadbalancerOptionObservability) HasLogs() bool { + if o != nil && !IsNil(o.Logs) { + return true + } + + return false +} + +// SetLogs gets a reference to the given LoadbalancerOptionLogs and assigns it to the Logs field. +func (o *LoadbalancerOptionObservability) SetLogs(v LoadbalancerOptionLogs) { + o.Logs = &v +} + +// GetMetrics returns the Metrics field value if set, zero value otherwise. +func (o *LoadbalancerOptionObservability) GetMetrics() LoadbalancerOptionMetrics { + if o == nil || IsNil(o.Metrics) { + var ret LoadbalancerOptionMetrics + return ret + } + return *o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionObservability) GetMetricsOk() (*LoadbalancerOptionMetrics, bool) { + if o == nil || IsNil(o.Metrics) { + return nil, false + } + return o.Metrics, true +} + +// HasMetrics returns a boolean if a field has been set. +func (o *LoadbalancerOptionObservability) HasMetrics() bool { + if o != nil && !IsNil(o.Metrics) { + return true + } + + return false +} + +// SetMetrics gets a reference to the given LoadbalancerOptionMetrics and assigns it to the Metrics field. +func (o *LoadbalancerOptionObservability) SetMetrics(v LoadbalancerOptionMetrics) { + o.Metrics = &v +} + +func (o LoadbalancerOptionObservability) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Logs) { + toSerialize["logs"] = o.Logs + } + if !IsNil(o.Metrics) { + toSerialize["metrics"] = o.Metrics + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionObservability struct { + value *LoadbalancerOptionObservability + isSet bool +} + +func (v NullableLoadbalancerOptionObservability) Get() *LoadbalancerOptionObservability { + return v.value +} + +func (v *NullableLoadbalancerOptionObservability) Set(val *LoadbalancerOptionObservability) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionObservability) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionObservability) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionObservability(val *LoadbalancerOptionObservability) *NullableLoadbalancerOptionObservability { + return &NullableLoadbalancerOptionObservability{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionObservability) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionObservability) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_network.go b/services/loadbalancer/v2api/model_network.go new file mode 100644 index 000000000..57487cae2 --- /dev/null +++ b/services/loadbalancer/v2api/model_network.go @@ -0,0 +1,162 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the Network type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Network{} + +// Network struct for Network +type Network struct { + // Openstack network ID + NetworkId *string `json:"networkId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"` + // The role defines how the load balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. + Role *string `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 +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 +func NewNetworkWithDefaults() *Network { + this := Network{} + return &this +} + +// GetNetworkId returns the NetworkId field value if set, zero value otherwise. +func (o *Network) GetNetworkId() string { + if o == nil || IsNil(o.NetworkId) { + var ret string + return ret + } + return *o.NetworkId +} + +// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetNetworkIdOk() (*string, bool) { + if o == nil || IsNil(o.NetworkId) { + return nil, false + } + return o.NetworkId, true +} + +// HasNetworkId returns a boolean if a field has been set. +func (o *Network) HasNetworkId() bool { + if o != nil && !IsNil(o.NetworkId) { + return true + } + + return false +} + +// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. +func (o *Network) SetNetworkId(v string) { + o.NetworkId = &v +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *Network) GetRole() string { + if o == nil || IsNil(o.Role) { + var ret string + return ret + } + return *o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetRoleOk() (*string, bool) { + if o == nil || IsNil(o.Role) { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *Network) HasRole() bool { + if o != nil && !IsNil(o.Role) { + return true + } + + return false +} + +// SetRole gets a reference to the given string and assigns it to the Role field. +func (o *Network) SetRole(v string) { + o.Role = &v +} + +func (o Network) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Network) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NetworkId) { + toSerialize["networkId"] = o.NetworkId + } + if !IsNil(o.Role) { + toSerialize["role"] = o.Role + } + return toSerialize, nil +} + +type NullableNetwork struct { + value *Network + isSet bool +} + +func (v NullableNetwork) Get() *Network { + return v.value +} + +func (v *NullableNetwork) Set(val *Network) { + v.value = val + v.isSet = true +} + +func (v NullableNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetwork(val *Network) *NullableNetwork { + return &NullableNetwork{value: val, isSet: true} +} + +func (v NullableNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_options_tcp.go b/services/loadbalancer/v2api/model_options_tcp.go new file mode 100644 index 000000000..64805767c --- /dev/null +++ b/services/loadbalancer/v2api/model_options_tcp.go @@ -0,0 +1,125 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the OptionsTCP type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptionsTCP{} + +// 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. +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 *string `json:"idleTimeout,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` +} + +// 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 +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 +func NewOptionsTCPWithDefaults() *OptionsTCP { + this := OptionsTCP{} + return &this +} + +// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise. +func (o *OptionsTCP) GetIdleTimeout() string { + if o == nil || IsNil(o.IdleTimeout) { + var ret string + return ret + } + return *o.IdleTimeout +} + +// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptionsTCP) GetIdleTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.IdleTimeout) { + return nil, false + } + return o.IdleTimeout, true +} + +// HasIdleTimeout returns a boolean if a field has been set. +func (o *OptionsTCP) HasIdleTimeout() bool { + if o != nil && !IsNil(o.IdleTimeout) { + return true + } + + return false +} + +// SetIdleTimeout gets a reference to the given string and assigns it to the IdleTimeout field. +func (o *OptionsTCP) SetIdleTimeout(v string) { + o.IdleTimeout = &v +} + +func (o OptionsTCP) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OptionsTCP) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IdleTimeout) { + toSerialize["idleTimeout"] = o.IdleTimeout + } + return toSerialize, nil +} + +type NullableOptionsTCP struct { + value *OptionsTCP + isSet bool +} + +func (v NullableOptionsTCP) Get() *OptionsTCP { + return v.value +} + +func (v *NullableOptionsTCP) Set(val *OptionsTCP) { + v.value = val + v.isSet = true +} + +func (v NullableOptionsTCP) IsSet() bool { + return v.isSet +} + +func (v *NullableOptionsTCP) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptionsTCP(val *OptionsTCP) *NullableOptionsTCP { + return &NullableOptionsTCP{value: val, isSet: true} +} + +func (v NullableOptionsTCP) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptionsTCP) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_options_udp.go b/services/loadbalancer/v2api/model_options_udp.go new file mode 100644 index 000000000..2f0075e30 --- /dev/null +++ b/services/loadbalancer/v2api/model_options_udp.go @@ -0,0 +1,125 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the OptionsUDP type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptionsUDP{} + +// OptionsUDP ProtocolOptionsUDP options to be configured for the PROTOCOL_UDP protocol. +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 *string `json:"idleTimeout,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` +} + +// 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 +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 +func NewOptionsUDPWithDefaults() *OptionsUDP { + this := OptionsUDP{} + return &this +} + +// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise. +func (o *OptionsUDP) GetIdleTimeout() string { + if o == nil || IsNil(o.IdleTimeout) { + var ret string + return ret + } + return *o.IdleTimeout +} + +// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptionsUDP) GetIdleTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.IdleTimeout) { + return nil, false + } + return o.IdleTimeout, true +} + +// HasIdleTimeout returns a boolean if a field has been set. +func (o *OptionsUDP) HasIdleTimeout() bool { + if o != nil && !IsNil(o.IdleTimeout) { + return true + } + + return false +} + +// SetIdleTimeout gets a reference to the given string and assigns it to the IdleTimeout field. +func (o *OptionsUDP) SetIdleTimeout(v string) { + o.IdleTimeout = &v +} + +func (o OptionsUDP) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OptionsUDP) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IdleTimeout) { + toSerialize["idleTimeout"] = o.IdleTimeout + } + return toSerialize, nil +} + +type NullableOptionsUDP struct { + value *OptionsUDP + isSet bool +} + +func (v NullableOptionsUDP) Get() *OptionsUDP { + return v.value +} + +func (v *NullableOptionsUDP) Set(val *OptionsUDP) { + v.value = val + v.isSet = true +} + +func (v NullableOptionsUDP) IsSet() bool { + return v.isSet +} + +func (v *NullableOptionsUDP) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptionsUDP(val *OptionsUDP) *NullableOptionsUDP { + return &NullableOptionsUDP{value: val, isSet: true} +} + +func (v NullableOptionsUDP) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptionsUDP) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_plan_details.go b/services/loadbalancer/v2api/model_plan_details.go new file mode 100644 index 000000000..785073c87 --- /dev/null +++ b/services/loadbalancer/v2api/model_plan_details.go @@ -0,0 +1,310 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the PlanDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlanDetails{} + +// PlanDetails struct for PlanDetails +type PlanDetails struct { + // Description + Description *string `json:"description,omitempty"` + // Flavor Name + FlavorName *string `json:"flavorName,omitempty"` + // Maximum number of concurrent connections per load balancer VM instance. + MaxConnections *int32 `json:"maxConnections,omitempty"` + // Service Plan Name + Name *string `json:"name,omitempty"` + // Service Plan Identifier + PlanId *string `json:"planId,omitempty"` + // Region this Plan is available in + Region *string `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 +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 +func NewPlanDetailsWithDefaults() *PlanDetails { + this := PlanDetails{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PlanDetails) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PlanDetails) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PlanDetails) SetDescription(v string) { + o.Description = &v +} + +// GetFlavorName returns the FlavorName field value if set, zero value otherwise. +func (o *PlanDetails) GetFlavorName() string { + if o == nil || IsNil(o.FlavorName) { + var ret string + return ret + } + return *o.FlavorName +} + +// GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetFlavorNameOk() (*string, bool) { + if o == nil || IsNil(o.FlavorName) { + return nil, false + } + return o.FlavorName, true +} + +// HasFlavorName returns a boolean if a field has been set. +func (o *PlanDetails) HasFlavorName() bool { + if o != nil && !IsNil(o.FlavorName) { + return true + } + + return false +} + +// SetFlavorName gets a reference to the given string and assigns it to the FlavorName field. +func (o *PlanDetails) SetFlavorName(v string) { + o.FlavorName = &v +} + +// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise. +func (o *PlanDetails) GetMaxConnections() int32 { + if o == nil || IsNil(o.MaxConnections) { + var ret int32 + return ret + } + return *o.MaxConnections +} + +// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetMaxConnectionsOk() (*int32, bool) { + if o == nil || IsNil(o.MaxConnections) { + return nil, false + } + return o.MaxConnections, true +} + +// HasMaxConnections returns a boolean if a field has been set. +func (o *PlanDetails) HasMaxConnections() bool { + if o != nil && !IsNil(o.MaxConnections) { + return true + } + + return false +} + +// SetMaxConnections gets a reference to the given int32 and assigns it to the MaxConnections field. +func (o *PlanDetails) SetMaxConnections(v int32) { + o.MaxConnections = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PlanDetails) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PlanDetails) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PlanDetails) SetName(v string) { + o.Name = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *PlanDetails) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *PlanDetails) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *PlanDetails) SetPlanId(v string) { + o.PlanId = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *PlanDetails) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *PlanDetails) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *PlanDetails) SetRegion(v string) { + o.Region = &v +} + +func (o PlanDetails) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlanDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.FlavorName) { + toSerialize["flavorName"] = o.FlavorName + } + if !IsNil(o.MaxConnections) { + toSerialize["maxConnections"] = o.MaxConnections + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + return toSerialize, nil +} + +type NullablePlanDetails struct { + value *PlanDetails + isSet bool +} + +func (v NullablePlanDetails) Get() *PlanDetails { + return v.value +} + +func (v *NullablePlanDetails) Set(val *PlanDetails) { + v.value = val + v.isSet = true +} + +func (v NullablePlanDetails) IsSet() bool { + return v.isSet +} + +func (v *NullablePlanDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlanDetails(val *PlanDetails) *NullablePlanDetails { + return &NullablePlanDetails{value: val, isSet: true} +} + +func (v NullablePlanDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlanDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_security_group.go b/services/loadbalancer/v2api/model_security_group.go new file mode 100644 index 000000000..5b2cc0237 --- /dev/null +++ b/services/loadbalancer/v2api/model_security_group.go @@ -0,0 +1,162 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the SecurityGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecurityGroup{} + +// SecurityGroup struct for SecurityGroup +type SecurityGroup struct { + // ID of the security Group + Id *string `json:"id,omitempty"` + // Name of the security Group + Name *string `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 +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 +func NewSecurityGroupWithDefaults() *SecurityGroup { + this := SecurityGroup{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SecurityGroup) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroup) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SecurityGroup) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SecurityGroup) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SecurityGroup) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroup) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SecurityGroup) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SecurityGroup) SetName(v string) { + o.Name = &v +} + +func (o SecurityGroup) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SecurityGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableSecurityGroup struct { + value *SecurityGroup + isSet bool +} + +func (v NullableSecurityGroup) Get() *SecurityGroup { + return v.value +} + +func (v *NullableSecurityGroup) Set(val *SecurityGroup) { + v.value = val + v.isSet = true +} + +func (v NullableSecurityGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableSecurityGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecurityGroup(val *SecurityGroup) *NullableSecurityGroup { + return &NullableSecurityGroup{value: val, isSet: true} +} + +func (v NullableSecurityGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecurityGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_server_name_indicator.go b/services/loadbalancer/v2api/model_server_name_indicator.go new file mode 100644 index 000000000..5ad7dfb29 --- /dev/null +++ b/services/loadbalancer/v2api/model_server_name_indicator.go @@ -0,0 +1,125 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the ServerNameIndicator type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerNameIndicator{} + +// ServerNameIndicator struct for ServerNameIndicator +type ServerNameIndicator struct { + // The domain name for this SNI config. + Name *string `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 +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 +func NewServerNameIndicatorWithDefaults() *ServerNameIndicator { + this := ServerNameIndicator{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ServerNameIndicator) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNameIndicator) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ServerNameIndicator) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ServerNameIndicator) SetName(v string) { + o.Name = &v +} + +func (o ServerNameIndicator) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServerNameIndicator) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableServerNameIndicator struct { + value *ServerNameIndicator + isSet bool +} + +func (v NullableServerNameIndicator) Get() *ServerNameIndicator { + return v.value +} + +func (v *NullableServerNameIndicator) Set(val *ServerNameIndicator) { + v.value = val + v.isSet = true +} + +func (v NullableServerNameIndicator) IsSet() bool { + return v.isSet +} + +func (v *NullableServerNameIndicator) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerNameIndicator(val *ServerNameIndicator) *NullableServerNameIndicator { + return &NullableServerNameIndicator{value: val, isSet: true} +} + +func (v NullableServerNameIndicator) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerNameIndicator) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_session_persistence.go b/services/loadbalancer/v2api/model_session_persistence.go new file mode 100644 index 000000000..7645132b3 --- /dev/null +++ b/services/loadbalancer/v2api/model_session_persistence.go @@ -0,0 +1,125 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the SessionPersistence type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionPersistence{} + +// SessionPersistence struct for SessionPersistence +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 *bool `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 +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 +func NewSessionPersistenceWithDefaults() *SessionPersistence { + this := SessionPersistence{} + return &this +} + +// GetUseSourceIpAddress returns the UseSourceIpAddress field value if set, zero value otherwise. +func (o *SessionPersistence) GetUseSourceIpAddress() bool { + if o == nil || IsNil(o.UseSourceIpAddress) { + var ret bool + return ret + } + return *o.UseSourceIpAddress +} + +// GetUseSourceIpAddressOk returns a tuple with the UseSourceIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionPersistence) GetUseSourceIpAddressOk() (*bool, bool) { + if o == nil || IsNil(o.UseSourceIpAddress) { + return nil, false + } + return o.UseSourceIpAddress, true +} + +// HasUseSourceIpAddress returns a boolean if a field has been set. +func (o *SessionPersistence) HasUseSourceIpAddress() bool { + if o != nil && !IsNil(o.UseSourceIpAddress) { + return true + } + + return false +} + +// SetUseSourceIpAddress gets a reference to the given bool and assigns it to the UseSourceIpAddress field. +func (o *SessionPersistence) SetUseSourceIpAddress(v bool) { + o.UseSourceIpAddress = &v +} + +func (o SessionPersistence) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionPersistence) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.UseSourceIpAddress) { + toSerialize["useSourceIpAddress"] = o.UseSourceIpAddress + } + return toSerialize, nil +} + +type NullableSessionPersistence struct { + value *SessionPersistence + isSet bool +} + +func (v NullableSessionPersistence) Get() *SessionPersistence { + return v.value +} + +func (v *NullableSessionPersistence) Set(val *SessionPersistence) { + v.value = val + v.isSet = true +} + +func (v NullableSessionPersistence) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionPersistence) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionPersistence(val *SessionPersistence) *NullableSessionPersistence { + return &NullableSessionPersistence{value: val, isSet: true} +} + +func (v NullableSessionPersistence) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionPersistence) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_status.go b/services/loadbalancer/v2api/model_status.go new file mode 100644 index 000000000..66de43fe8 --- /dev/null +++ b/services/loadbalancer/v2api/model_status.go @@ -0,0 +1,199 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the Status type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Status{} + +// 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). +type Status struct { + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + Code *int32 `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 []GoogleProtobufAny `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 *string `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 +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 +func NewStatusWithDefaults() *Status { + this := Status{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Status) GetCode() int32 { + if o == nil || IsNil(o.Code) { + var ret int32 + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetCodeOk() (*int32, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Status) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *Status) SetCode(v int32) { + o.Code = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Status) GetDetails() []GoogleProtobufAny { + if o == nil || IsNil(o.Details) { + var ret []GoogleProtobufAny + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetDetailsOk() ([]GoogleProtobufAny, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *Status) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field. +func (o *Status) SetDetails(v []GoogleProtobufAny) { + o.Details = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Status) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Status) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Status) SetMessage(v string) { + o.Message = &v +} + +func (o Status) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Status) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableStatus struct { + value *Status + isSet bool +} + +func (v NullableStatus) Get() *Status { + return v.value +} + +func (v *NullableStatus) Set(val *Status) { + v.value = val + v.isSet = true +} + +func (v NullableStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatus(val *Status) *NullableStatus { + return &NullableStatus{value: val, isSet: true} +} + +func (v NullableStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_target.go b/services/loadbalancer/v2api/model_target.go new file mode 100644 index 000000000..5f4427b2f --- /dev/null +++ b/services/loadbalancer/v2api/model_target.go @@ -0,0 +1,162 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the Target type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Target{} + +// Target struct for Target +type Target struct { + // Target name + DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-zA-Z](?:(?:[0-9a-zA-Z]|-){0,61}[0-9a-zA-Z])?$"` + // Target IP. Must by unique within a target pool. + Ip *string `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 +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 +func NewTargetWithDefaults() *Target { + this := Target{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *Target) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Target) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *Target) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *Target) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *Target) GetIp() string { + if o == nil || IsNil(o.Ip) { + var ret string + return ret + } + return *o.Ip +} + +// GetIpOk returns a tuple with the Ip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Target) GetIpOk() (*string, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *Target) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given string and assigns it to the Ip field. +func (o *Target) SetIp(v string) { + o.Ip = &v +} + +func (o Target) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Target) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + return toSerialize, nil +} + +type NullableTarget struct { + value *Target + isSet bool +} + +func (v NullableTarget) Get() *Target { + return v.value +} + +func (v *NullableTarget) Set(val *Target) { + v.value = val + v.isSet = true +} + +func (v NullableTarget) IsSet() bool { + return v.isSet +} + +func (v *NullableTarget) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTarget(val *Target) *NullableTarget { + return &NullableTarget{value: val, isSet: true} +} + +func (v NullableTarget) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTarget) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_target_pool.go b/services/loadbalancer/v2api/model_target_pool.go new file mode 100644 index 000000000..8c8f03757 --- /dev/null +++ b/services/loadbalancer/v2api/model_target_pool.go @@ -0,0 +1,271 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the TargetPool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TargetPool{} + +// TargetPool struct for TargetPool +type TargetPool struct { + ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` + // Target pool name + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + SessionPersistence *SessionPersistence `json:"sessionPersistence,omitempty"` + // The number identifying the port where each target listens for traffic. + TargetPort *int32 `json:"targetPort,omitempty"` + // List of all targets which will be used in the pool. Limited to 250. + Targets []Target `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 +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 +func NewTargetPoolWithDefaults() *TargetPool { + this := TargetPool{} + return &this +} + +// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. +func (o *TargetPool) GetActiveHealthCheck() ActiveHealthCheck { + if o == nil || IsNil(o.ActiveHealthCheck) { + var ret ActiveHealthCheck + return ret + } + return *o.ActiveHealthCheck +} + +// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { + if o == nil || IsNil(o.ActiveHealthCheck) { + return nil, false + } + return o.ActiveHealthCheck, true +} + +// HasActiveHealthCheck returns a boolean if a field has been set. +func (o *TargetPool) HasActiveHealthCheck() bool { + if o != nil && !IsNil(o.ActiveHealthCheck) { + return true + } + + return false +} + +// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. +func (o *TargetPool) SetActiveHealthCheck(v ActiveHealthCheck) { + o.ActiveHealthCheck = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TargetPool) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TargetPool) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TargetPool) SetName(v string) { + o.Name = &v +} + +// GetSessionPersistence returns the SessionPersistence field value if set, zero value otherwise. +func (o *TargetPool) GetSessionPersistence() SessionPersistence { + if o == nil || IsNil(o.SessionPersistence) { + var ret SessionPersistence + return ret + } + return *o.SessionPersistence +} + +// GetSessionPersistenceOk returns a tuple with the SessionPersistence field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetSessionPersistenceOk() (*SessionPersistence, bool) { + if o == nil || IsNil(o.SessionPersistence) { + return nil, false + } + return o.SessionPersistence, true +} + +// HasSessionPersistence returns a boolean if a field has been set. +func (o *TargetPool) HasSessionPersistence() bool { + if o != nil && !IsNil(o.SessionPersistence) { + return true + } + + return false +} + +// SetSessionPersistence gets a reference to the given SessionPersistence and assigns it to the SessionPersistence field. +func (o *TargetPool) SetSessionPersistence(v SessionPersistence) { + o.SessionPersistence = &v +} + +// GetTargetPort returns the TargetPort field value if set, zero value otherwise. +func (o *TargetPool) GetTargetPort() int32 { + if o == nil || IsNil(o.TargetPort) { + var ret int32 + return ret + } + return *o.TargetPort +} + +// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetTargetPortOk() (*int32, bool) { + if o == nil || IsNil(o.TargetPort) { + return nil, false + } + return o.TargetPort, true +} + +// HasTargetPort returns a boolean if a field has been set. +func (o *TargetPool) HasTargetPort() bool { + if o != nil && !IsNil(o.TargetPort) { + return true + } + + return false +} + +// SetTargetPort gets a reference to the given int32 and assigns it to the TargetPort field. +func (o *TargetPool) SetTargetPort(v int32) { + o.TargetPort = &v +} + +// GetTargets returns the Targets field value if set, zero value otherwise. +func (o *TargetPool) GetTargets() []Target { + if o == nil || IsNil(o.Targets) { + var ret []Target + return ret + } + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetTargetsOk() ([]Target, bool) { + if o == nil || IsNil(o.Targets) { + return nil, false + } + return o.Targets, true +} + +// HasTargets returns a boolean if a field has been set. +func (o *TargetPool) HasTargets() bool { + if o != nil && !IsNil(o.Targets) { + return true + } + + return false +} + +// SetTargets gets a reference to the given []Target and assigns it to the Targets field. +func (o *TargetPool) SetTargets(v []Target) { + o.Targets = v +} + +func (o TargetPool) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TargetPool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActiveHealthCheck) { + toSerialize["activeHealthCheck"] = o.ActiveHealthCheck + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SessionPersistence) { + toSerialize["sessionPersistence"] = o.SessionPersistence + } + if !IsNil(o.TargetPort) { + toSerialize["targetPort"] = o.TargetPort + } + if !IsNil(o.Targets) { + toSerialize["targets"] = o.Targets + } + return toSerialize, nil +} + +type NullableTargetPool struct { + value *TargetPool + isSet bool +} + +func (v NullableTargetPool) Get() *TargetPool { + return v.value +} + +func (v *NullableTargetPool) Set(val *TargetPool) { + v.value = val + v.isSet = true +} + +func (v NullableTargetPool) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetPool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetPool(val *TargetPool) *NullableTargetPool { + return &NullableTargetPool{value: val, isSet: true} +} + +func (v NullableTargetPool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetPool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_tls_config.go b/services/loadbalancer/v2api/model_tls_config.go new file mode 100644 index 000000000..6ddb63e49 --- /dev/null +++ b/services/loadbalancer/v2api/model_tls_config.go @@ -0,0 +1,199 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the TlsConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TlsConfig{} + +// TlsConfig Set this to configure TLS settings. +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 *string `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 *bool `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 *bool `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 +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 +func NewTlsConfigWithDefaults() *TlsConfig { + this := TlsConfig{} + return &this +} + +// GetCustomCa returns the CustomCa field value if set, zero value otherwise. +func (o *TlsConfig) GetCustomCa() string { + if o == nil || IsNil(o.CustomCa) { + var ret string + return ret + } + return *o.CustomCa +} + +// GetCustomCaOk returns a tuple with the CustomCa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TlsConfig) GetCustomCaOk() (*string, bool) { + if o == nil || IsNil(o.CustomCa) { + return nil, false + } + return o.CustomCa, true +} + +// HasCustomCa returns a boolean if a field has been set. +func (o *TlsConfig) HasCustomCa() bool { + if o != nil && !IsNil(o.CustomCa) { + return true + } + + return false +} + +// SetCustomCa gets a reference to the given string and assigns it to the CustomCa field. +func (o *TlsConfig) SetCustomCa(v string) { + o.CustomCa = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *TlsConfig) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TlsConfig) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *TlsConfig) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *TlsConfig) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetSkipCertificateValidation returns the SkipCertificateValidation field value if set, zero value otherwise. +func (o *TlsConfig) GetSkipCertificateValidation() bool { + if o == nil || IsNil(o.SkipCertificateValidation) { + var ret bool + return ret + } + return *o.SkipCertificateValidation +} + +// GetSkipCertificateValidationOk returns a tuple with the SkipCertificateValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TlsConfig) GetSkipCertificateValidationOk() (*bool, bool) { + if o == nil || IsNil(o.SkipCertificateValidation) { + return nil, false + } + return o.SkipCertificateValidation, true +} + +// HasSkipCertificateValidation returns a boolean if a field has been set. +func (o *TlsConfig) HasSkipCertificateValidation() bool { + if o != nil && !IsNil(o.SkipCertificateValidation) { + return true + } + + return false +} + +// SetSkipCertificateValidation gets a reference to the given bool and assigns it to the SkipCertificateValidation field. +func (o *TlsConfig) SetSkipCertificateValidation(v bool) { + o.SkipCertificateValidation = &v +} + +func (o TlsConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TlsConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CustomCa) { + toSerialize["customCa"] = o.CustomCa + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.SkipCertificateValidation) { + toSerialize["skipCertificateValidation"] = o.SkipCertificateValidation + } + return toSerialize, nil +} + +type NullableTlsConfig struct { + value *TlsConfig + isSet bool +} + +func (v NullableTlsConfig) Get() *TlsConfig { + return v.value +} + +func (v *NullableTlsConfig) Set(val *TlsConfig) { + v.value = val + v.isSet = true +} + +func (v NullableTlsConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableTlsConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTlsConfig(val *TlsConfig) *NullableTlsConfig { + return &NullableTlsConfig{value: val, isSet: true} +} + +func (v NullableTlsConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTlsConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_update_credentials_payload.go b/services/loadbalancer/v2api/model_update_credentials_payload.go new file mode 100644 index 000000000..f948a6dd8 --- /dev/null +++ b/services/loadbalancer/v2api/model_update_credentials_payload.go @@ -0,0 +1,199 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the UpdateCredentialsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateCredentialsPayload{} + +// UpdateCredentialsPayload struct for UpdateCredentialsPayload +type UpdateCredentialsPayload struct { + // Credential name + DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` + // A valid password used for an existing STACKIT Observability instance, which is used during basic auth. + Password *string `json:"password,omitempty"` + // A valid username used for an existing STACKIT Observability instance, which is used during basic auth. + Username *string `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 +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 +func NewUpdateCredentialsPayloadWithDefaults() *UpdateCredentialsPayload { + this := UpdateCredentialsPayload{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *UpdateCredentialsPayload) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *UpdateCredentialsPayload) SetPassword(v string) { + o.Password = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *UpdateCredentialsPayload) SetUsername(v string) { + o.Username = &v +} + +func (o UpdateCredentialsPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateCredentialsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUpdateCredentialsPayload struct { + value *UpdateCredentialsPayload + isSet bool +} + +func (v NullableUpdateCredentialsPayload) Get() *UpdateCredentialsPayload { + return v.value +} + +func (v *NullableUpdateCredentialsPayload) Set(val *UpdateCredentialsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCredentialsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCredentialsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCredentialsPayload(val *UpdateCredentialsPayload) *NullableUpdateCredentialsPayload { + return &NullableUpdateCredentialsPayload{value: val, isSet: true} +} + +func (v NullableUpdateCredentialsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCredentialsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_update_credentials_response.go b/services/loadbalancer/v2api/model_update_credentials_response.go new file mode 100644 index 000000000..5c8cd4d22 --- /dev/null +++ b/services/loadbalancer/v2api/model_update_credentials_response.go @@ -0,0 +1,124 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the UpdateCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateCredentialsResponse{} + +// UpdateCredentialsResponse struct for UpdateCredentialsResponse +type UpdateCredentialsResponse struct { + Credential *CredentialsResponse `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 +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 +func NewUpdateCredentialsResponseWithDefaults() *UpdateCredentialsResponse { + this := UpdateCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *UpdateCredentialsResponse) GetCredential() CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret CredentialsResponse + return ret + } + return *o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *UpdateCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *UpdateCredentialsResponse) SetCredential(v CredentialsResponse) { + o.Credential = &v +} + +func (o UpdateCredentialsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableUpdateCredentialsResponse struct { + value *UpdateCredentialsResponse + isSet bool +} + +func (v NullableUpdateCredentialsResponse) Get() *UpdateCredentialsResponse { + return v.value +} + +func (v *NullableUpdateCredentialsResponse) Set(val *UpdateCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCredentialsResponse(val *UpdateCredentialsResponse) *NullableUpdateCredentialsResponse { + return &NullableUpdateCredentialsResponse{value: val, isSet: true} +} + +func (v NullableUpdateCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_update_load_balancer_payload.go b/services/loadbalancer/v2api/model_update_load_balancer_payload.go new file mode 100644 index 000000000..769e16716 --- /dev/null +++ b/services/loadbalancer/v2api/model_update_load_balancer_payload.go @@ -0,0 +1,678 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the UpdateLoadBalancerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateLoadBalancerPayload{} + +// UpdateLoadBalancerPayload struct for UpdateLoadBalancerPayload +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 *bool `json:"disableTargetSecurityGroupAssignment,omitempty"` + // Reports all errors a load balancer has. + Errors []LoadBalancerError `json:"errors,omitempty"` + // External load balancer IP address where this load balancer is exposed. Not changeable after creation. + ExternalAddress *string `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 *map[string]string `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 []Listener `json:"listeners,omitempty"` + // Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. + LoadBalancerSecurityGroup *SecurityGroup `json:"loadBalancerSecurityGroup,omitempty"` + // Load balancer name. Not changeable after creation. + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. + Networks []Network `json:"networks,omitempty"` + Options *LoadBalancerOptions `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 *string `json:"planId,omitempty"` + // Transient private load balancer IP address that can change any time. + PrivateAddress *string `json:"privateAddress,omitempty"` + // Region of the LoadBalancer + Region *string `json:"region,omitempty"` + Status *string `json:"status,omitempty"` + // List of all target pools which will be used in the load balancer. Limited to 20. + TargetPools []TargetPool `json:"targetPools,omitempty"` + // Security Group that allows the targets to receive traffic from the LoadBalancer. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. + TargetSecurityGroup *SecurityGroup `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 *string `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 +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 +func NewUpdateLoadBalancerPayloadWithDefaults() *UpdateLoadBalancerPayload { + this := UpdateLoadBalancerPayload{} + return &this +} + +// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() bool { + if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { + var ret bool + return ret + } + return *o.DisableTargetSecurityGroupAssignment +} + +// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (*bool, bool) { + if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { + return nil, false + } + return o.DisableTargetSecurityGroupAssignment, true +} + +// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool { + if o != nil && !IsNil(o.DisableTargetSecurityGroupAssignment) { + return true + } + + return false +} + +// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. +func (o *UpdateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v bool) { + o.DisableTargetSecurityGroupAssignment = &v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetErrors() []LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret []LoadBalancerError + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetErrorsOk() ([]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *UpdateLoadBalancerPayload) SetErrors(v []LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetExternalAddress() string { + if o == nil || IsNil(o.ExternalAddress) { + var ret string + return ret + } + return *o.ExternalAddress +} + +// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetExternalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *UpdateLoadBalancerPayload) SetExternalAddress(v string) { + o.ExternalAddress = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateLoadBalancerPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetListeners() []Listener { + if o == nil || IsNil(o.Listeners) { + var ret []Listener + return ret + } + return o.Listeners +} + +// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetListenersOk() ([]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *UpdateLoadBalancerPayload) SetListeners(v []Listener) { + o.Listeners = v +} + +// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroup() SecurityGroup { + if o == nil || IsNil(o.LoadBalancerSecurityGroup) { + var ret SecurityGroup + return ret + } + return *o.LoadBalancerSecurityGroup +} + +// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (*SecurityGroup, bool) { + if o == nil || IsNil(o.LoadBalancerSecurityGroup) { + return nil, false + } + return o.LoadBalancerSecurityGroup, true +} + +// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool { + if o != nil && !IsNil(o.LoadBalancerSecurityGroup) { + return true + } + + return false +} + +// SetLoadBalancerSecurityGroup gets a reference to the given SecurityGroup and assigns it to the LoadBalancerSecurityGroup field. +func (o *UpdateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v SecurityGroup) { + o.LoadBalancerSecurityGroup = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateLoadBalancerPayload) SetName(v string) { + o.Name = &v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetNetworks() []Network { + if o == nil || IsNil(o.Networks) { + var ret []Network + return ret + } + return o.Networks +} + +// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetNetworksOk() ([]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *UpdateLoadBalancerPayload) SetNetworks(v []Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetOptions() LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret LoadBalancerOptions + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetOptionsOk() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *UpdateLoadBalancerPayload) SetOptions(v LoadBalancerOptions) { + o.Options = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *UpdateLoadBalancerPayload) SetPlanId(v string) { + o.PlanId = &v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetPrivateAddress() string { + if o == nil || IsNil(o.PrivateAddress) { + var ret string + return ret + } + return *o.PrivateAddress +} + +// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetPrivateAddressOk() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v string) { + o.PrivateAddress = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *UpdateLoadBalancerPayload) SetRegion(v string) { + o.Region = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *UpdateLoadBalancerPayload) SetStatus(v string) { + o.Status = &v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetTargetPools() []TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret []TargetPool + return ret + } + return o.TargetPools +} + +// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetTargetPoolsOk() ([]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *UpdateLoadBalancerPayload) SetTargetPools(v []TargetPool) { + o.TargetPools = v +} + +// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetTargetSecurityGroup() SecurityGroup { + if o == nil || IsNil(o.TargetSecurityGroup) { + var ret SecurityGroup + return ret + } + return *o.TargetSecurityGroup +} + +// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetTargetSecurityGroupOk() (*SecurityGroup, bool) { + if o == nil || IsNil(o.TargetSecurityGroup) { + return nil, false + } + return o.TargetSecurityGroup, true +} + +// HasTargetSecurityGroup returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasTargetSecurityGroup() bool { + if o != nil && !IsNil(o.TargetSecurityGroup) { + return true + } + + return false +} + +// SetTargetSecurityGroup gets a reference to the given SecurityGroup and assigns it to the TargetSecurityGroup field. +func (o *UpdateLoadBalancerPayload) SetTargetSecurityGroup(v SecurityGroup) { + o.TargetSecurityGroup = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoadBalancerPayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *UpdateLoadBalancerPayload) SetVersion(v string) { + o.Version = &v +} + +func (o UpdateLoadBalancerPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisableTargetSecurityGroupAssignment) { + toSerialize["disableTargetSecurityGroupAssignment"] = o.DisableTargetSecurityGroupAssignment + } + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.LoadBalancerSecurityGroup) { + toSerialize["loadBalancerSecurityGroup"] = o.LoadBalancerSecurityGroup + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.TargetSecurityGroup) { + toSerialize["targetSecurityGroup"] = o.TargetSecurityGroup + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableUpdateLoadBalancerPayload struct { + value *UpdateLoadBalancerPayload + isSet bool +} + +func (v NullableUpdateLoadBalancerPayload) Get() *UpdateLoadBalancerPayload { + return v.value +} + +func (v *NullableUpdateLoadBalancerPayload) Set(val *UpdateLoadBalancerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateLoadBalancerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateLoadBalancerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateLoadBalancerPayload(val *UpdateLoadBalancerPayload) *NullableUpdateLoadBalancerPayload { + return &NullableUpdateLoadBalancerPayload{value: val, isSet: true} +} + +func (v NullableUpdateLoadBalancerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateLoadBalancerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/model_update_target_pool_payload.go b/services/loadbalancer/v2api/model_update_target_pool_payload.go new file mode 100644 index 000000000..107fc2238 --- /dev/null +++ b/services/loadbalancer/v2api/model_update_target_pool_payload.go @@ -0,0 +1,271 @@ +/* +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 v2api + +import ( + "encoding/json" +) + +// checks if the UpdateTargetPoolPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateTargetPoolPayload{} + +// UpdateTargetPoolPayload struct for UpdateTargetPoolPayload +type UpdateTargetPoolPayload struct { + ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` + // Target pool name + Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` + SessionPersistence *SessionPersistence `json:"sessionPersistence,omitempty"` + // The number identifying the port where each target listens for traffic. + TargetPort *int32 `json:"targetPort,omitempty"` + // List of all targets which will be used in the pool. Limited to 250. + Targets []Target `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 +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 +func NewUpdateTargetPoolPayloadWithDefaults() *UpdateTargetPoolPayload { + this := UpdateTargetPoolPayload{} + return &this +} + +// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetActiveHealthCheck() ActiveHealthCheck { + if o == nil || IsNil(o.ActiveHealthCheck) { + var ret ActiveHealthCheck + return ret + } + return *o.ActiveHealthCheck +} + +// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { + if o == nil || IsNil(o.ActiveHealthCheck) { + return nil, false + } + return o.ActiveHealthCheck, true +} + +// HasActiveHealthCheck returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasActiveHealthCheck() bool { + if o != nil && !IsNil(o.ActiveHealthCheck) { + return true + } + + return false +} + +// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. +func (o *UpdateTargetPoolPayload) SetActiveHealthCheck(v ActiveHealthCheck) { + o.ActiveHealthCheck = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateTargetPoolPayload) SetName(v string) { + o.Name = &v +} + +// GetSessionPersistence returns the SessionPersistence field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetSessionPersistence() SessionPersistence { + if o == nil || IsNil(o.SessionPersistence) { + var ret SessionPersistence + return ret + } + return *o.SessionPersistence +} + +// GetSessionPersistenceOk returns a tuple with the SessionPersistence field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetSessionPersistenceOk() (*SessionPersistence, bool) { + if o == nil || IsNil(o.SessionPersistence) { + return nil, false + } + return o.SessionPersistence, true +} + +// HasSessionPersistence returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasSessionPersistence() bool { + if o != nil && !IsNil(o.SessionPersistence) { + return true + } + + return false +} + +// SetSessionPersistence gets a reference to the given SessionPersistence and assigns it to the SessionPersistence field. +func (o *UpdateTargetPoolPayload) SetSessionPersistence(v SessionPersistence) { + o.SessionPersistence = &v +} + +// GetTargetPort returns the TargetPort field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetTargetPort() int32 { + if o == nil || IsNil(o.TargetPort) { + var ret int32 + return ret + } + return *o.TargetPort +} + +// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetTargetPortOk() (*int32, bool) { + if o == nil || IsNil(o.TargetPort) { + return nil, false + } + return o.TargetPort, true +} + +// HasTargetPort returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasTargetPort() bool { + if o != nil && !IsNil(o.TargetPort) { + return true + } + + return false +} + +// SetTargetPort gets a reference to the given int32 and assigns it to the TargetPort field. +func (o *UpdateTargetPoolPayload) SetTargetPort(v int32) { + o.TargetPort = &v +} + +// GetTargets returns the Targets field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetTargets() []Target { + if o == nil || IsNil(o.Targets) { + var ret []Target + return ret + } + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetTargetsOk() ([]Target, bool) { + if o == nil || IsNil(o.Targets) { + return nil, false + } + return o.Targets, true +} + +// HasTargets returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasTargets() bool { + if o != nil && !IsNil(o.Targets) { + return true + } + + return false +} + +// SetTargets gets a reference to the given []Target and assigns it to the Targets field. +func (o *UpdateTargetPoolPayload) SetTargets(v []Target) { + o.Targets = v +} + +func (o UpdateTargetPoolPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActiveHealthCheck) { + toSerialize["activeHealthCheck"] = o.ActiveHealthCheck + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SessionPersistence) { + toSerialize["sessionPersistence"] = o.SessionPersistence + } + if !IsNil(o.TargetPort) { + toSerialize["targetPort"] = o.TargetPort + } + if !IsNil(o.Targets) { + toSerialize["targets"] = o.Targets + } + return toSerialize, nil +} + +type NullableUpdateTargetPoolPayload struct { + value *UpdateTargetPoolPayload + isSet bool +} + +func (v NullableUpdateTargetPoolPayload) Get() *UpdateTargetPoolPayload { + return v.value +} + +func (v *NullableUpdateTargetPoolPayload) Set(val *UpdateTargetPoolPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateTargetPoolPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateTargetPoolPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateTargetPoolPayload(val *UpdateTargetPoolPayload) *NullableUpdateTargetPoolPayload { + return &NullableUpdateTargetPoolPayload{value: val, isSet: true} +} + +func (v NullableUpdateTargetPoolPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateTargetPoolPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/v2api/response.go b/services/loadbalancer/v2api/response.go new file mode 100644 index 000000000..f0f3f6611 --- /dev/null +++ b/services/loadbalancer/v2api/response.go @@ -0,0 +1,47 @@ +/* +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 v2api + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/loadbalancer/v2api/utils.go b/services/loadbalancer/v2api/utils.go new file mode 100644 index 000000000..eded97068 --- /dev/null +++ b/services/loadbalancer/v2api/utils.go @@ -0,0 +1,361 @@ +/* +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 v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/services/loadbalancer/wait/deprecation.go b/services/loadbalancer/wait/deprecation.go new file mode 100644 index 000000000..58f184c09 --- /dev/null +++ b/services/loadbalancer/wait/deprecation.go @@ -0,0 +1,2 @@ +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package wait