From 5bc8865673a11895d43acd4b2771c28dd3aad6d1 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 13 Aug 2026 15:08:21 +0000 Subject: [PATCH] Remove lbapplication: removed from API specifications --- go.work | 2 +- .../lbapplication/.openapi-generator/VERSION | 1 - services/lbapplication/CHANGELOG.md | 44 - services/lbapplication/LICENSE.md | 201 -- services/lbapplication/NOTICE.txt | 2 - services/lbapplication/VERSION | 1 - services/lbapplication/api_default.go | 2927 ----------------- services/lbapplication/api_default_test.go | 883 ----- services/lbapplication/client.go | 631 ---- services/lbapplication/configuration.go | 41 - services/lbapplication/go.mod | 10 - services/lbapplication/go.sum | 8 - .../model_active_health_check.go | 370 --- .../model_active_health_check_test.go | 11 - .../lbapplication/model_certificate_config.go | 128 - .../model_certificate_config_test.go | 11 - .../lbapplication/model_cookie_persistence.go | 178 - .../model_cookie_persistence_test.go | 11 - .../model_create_credentials_payload.go | 227 -- .../model_create_credentials_payload_test.go | 11 - .../model_create_credentials_response.go | 127 - .../model_create_credentials_response_test.go | 11 - .../model_create_load_balancer_payload.go | 722 ---- ...model_create_load_balancer_payload_test.go | 79 - .../model_credentials_response.go | 227 -- .../model_credentials_response_test.go | 11 - .../model_get_credentials_response.go | 127 - .../model_get_credentials_response_test.go | 11 - .../lbapplication/model_get_quota_response.go | 177 - .../model_get_quota_response_test.go | 11 - .../model_get_service_status_response.go | 243 -- .../model_get_service_status_response_test.go | 93 - .../model_google_protobuf_any.go | 137 - .../model_google_protobuf_any_test.go | 11 - services/lbapplication/model_header.go | 178 - services/lbapplication/model_header_test.go | 11 - services/lbapplication/model_http_config.go | 127 - .../lbapplication/model_http_config_test.go | 11 - .../lbapplication/model_http_health_checks.go | 177 - .../model_http_health_checks_test.go | 11 - .../model_list_credentials_response.go | 127 - .../model_list_credentials_response_test.go | 11 - .../model_list_load_balancers_response.go | 176 - ...model_list_load_balancers_response_test.go | 11 - .../model_list_plans_response.go | 127 - .../model_list_plans_response_test.go | 11 - services/lbapplication/model_listener.go | 523 --- services/lbapplication/model_listener_test.go | 65 - services/lbapplication/model_load_balancer.go | 722 ---- .../model_load_balancer_error.go | 296 -- .../model_load_balancer_error_test.go | 107 - .../model_load_balancer_options.go | 269 -- .../model_load_balancer_options_test.go | 11 - .../lbapplication/model_load_balancer_test.go | 79 - ...odel_loadbalancer_option_access_control.go | 128 - ...loadbalancer_option_access_control_test.go | 11 - .../model_loadbalancer_option_logs.go | 178 - .../model_loadbalancer_option_logs_test.go | 11 - .../model_loadbalancer_option_metrics.go | 178 - .../model_loadbalancer_option_metrics_test.go | 11 - ...model_loadbalancer_option_observability.go | 174 - ..._loadbalancer_option_observability_test.go | 11 - services/lbapplication/model_matcher.go | 369 --- services/lbapplication/model_matcher_test.go | 11 - services/lbapplication/model_network.go | 286 -- services/lbapplication/model_network_test.go | 72 - services/lbapplication/model_plan_details.go | 324 -- .../lbapplication/model_plan_details_test.go | 11 - .../model_protocol_options_https.go | 127 - .../model_protocol_options_https_test.go | 11 - .../lbapplication/model_query_parameters.go | 178 - .../model_query_parameters_test.go | 11 - services/lbapplication/model_rule.go | 176 - services/lbapplication/model_rule_test.go | 11 - services/lbapplication/model_status.go | 226 -- services/lbapplication/model_status_test.go | 11 - services/lbapplication/model_target.go | 178 - services/lbapplication/model_target_pool.go | 272 -- .../lbapplication/model_target_pool_test.go | 11 - services/lbapplication/model_target_test.go | 11 - .../model_update_credentials_payload.go | 227 -- .../model_update_credentials_payload_test.go | 11 - .../model_update_credentials_response.go | 127 - .../model_update_credentials_response_test.go | 11 - .../model_update_load_balancer_payload.go | 722 ---- ...model_update_load_balancer_payload_test.go | 79 - .../model_update_target_pool_payload.go | 272 -- .../model_update_target_pool_payload_test.go | 11 - services/lbapplication/utils.go | 385 --- 89 files changed, 1 insertion(+), 15577 deletions(-) delete mode 100644 services/lbapplication/.openapi-generator/VERSION delete mode 100644 services/lbapplication/CHANGELOG.md delete mode 100644 services/lbapplication/LICENSE.md delete mode 100644 services/lbapplication/NOTICE.txt delete mode 100644 services/lbapplication/VERSION delete mode 100644 services/lbapplication/api_default.go delete mode 100644 services/lbapplication/api_default_test.go delete mode 100644 services/lbapplication/client.go delete mode 100644 services/lbapplication/configuration.go delete mode 100644 services/lbapplication/go.mod delete mode 100644 services/lbapplication/go.sum delete mode 100644 services/lbapplication/model_active_health_check.go delete mode 100644 services/lbapplication/model_active_health_check_test.go delete mode 100644 services/lbapplication/model_certificate_config.go delete mode 100644 services/lbapplication/model_certificate_config_test.go delete mode 100644 services/lbapplication/model_cookie_persistence.go delete mode 100644 services/lbapplication/model_cookie_persistence_test.go delete mode 100644 services/lbapplication/model_create_credentials_payload.go delete mode 100644 services/lbapplication/model_create_credentials_payload_test.go delete mode 100644 services/lbapplication/model_create_credentials_response.go delete mode 100644 services/lbapplication/model_create_credentials_response_test.go delete mode 100644 services/lbapplication/model_create_load_balancer_payload.go delete mode 100644 services/lbapplication/model_create_load_balancer_payload_test.go delete mode 100644 services/lbapplication/model_credentials_response.go delete mode 100644 services/lbapplication/model_credentials_response_test.go delete mode 100644 services/lbapplication/model_get_credentials_response.go delete mode 100644 services/lbapplication/model_get_credentials_response_test.go delete mode 100644 services/lbapplication/model_get_quota_response.go delete mode 100644 services/lbapplication/model_get_quota_response_test.go delete mode 100644 services/lbapplication/model_get_service_status_response.go delete mode 100644 services/lbapplication/model_get_service_status_response_test.go delete mode 100644 services/lbapplication/model_google_protobuf_any.go delete mode 100644 services/lbapplication/model_google_protobuf_any_test.go delete mode 100644 services/lbapplication/model_header.go delete mode 100644 services/lbapplication/model_header_test.go delete mode 100644 services/lbapplication/model_http_config.go delete mode 100644 services/lbapplication/model_http_config_test.go delete mode 100644 services/lbapplication/model_http_health_checks.go delete mode 100644 services/lbapplication/model_http_health_checks_test.go delete mode 100644 services/lbapplication/model_list_credentials_response.go delete mode 100644 services/lbapplication/model_list_credentials_response_test.go delete mode 100644 services/lbapplication/model_list_load_balancers_response.go delete mode 100644 services/lbapplication/model_list_load_balancers_response_test.go delete mode 100644 services/lbapplication/model_list_plans_response.go delete mode 100644 services/lbapplication/model_list_plans_response_test.go delete mode 100644 services/lbapplication/model_listener.go delete mode 100644 services/lbapplication/model_listener_test.go delete mode 100644 services/lbapplication/model_load_balancer.go delete mode 100644 services/lbapplication/model_load_balancer_error.go delete mode 100644 services/lbapplication/model_load_balancer_error_test.go delete mode 100644 services/lbapplication/model_load_balancer_options.go delete mode 100644 services/lbapplication/model_load_balancer_options_test.go delete mode 100644 services/lbapplication/model_load_balancer_test.go delete mode 100644 services/lbapplication/model_loadbalancer_option_access_control.go delete mode 100644 services/lbapplication/model_loadbalancer_option_access_control_test.go delete mode 100644 services/lbapplication/model_loadbalancer_option_logs.go delete mode 100644 services/lbapplication/model_loadbalancer_option_logs_test.go delete mode 100644 services/lbapplication/model_loadbalancer_option_metrics.go delete mode 100644 services/lbapplication/model_loadbalancer_option_metrics_test.go delete mode 100644 services/lbapplication/model_loadbalancer_option_observability.go delete mode 100644 services/lbapplication/model_loadbalancer_option_observability_test.go delete mode 100644 services/lbapplication/model_matcher.go delete mode 100644 services/lbapplication/model_matcher_test.go delete mode 100644 services/lbapplication/model_network.go delete mode 100644 services/lbapplication/model_network_test.go delete mode 100644 services/lbapplication/model_plan_details.go delete mode 100644 services/lbapplication/model_plan_details_test.go delete mode 100644 services/lbapplication/model_protocol_options_https.go delete mode 100644 services/lbapplication/model_protocol_options_https_test.go delete mode 100644 services/lbapplication/model_query_parameters.go delete mode 100644 services/lbapplication/model_query_parameters_test.go delete mode 100644 services/lbapplication/model_rule.go delete mode 100644 services/lbapplication/model_rule_test.go delete mode 100644 services/lbapplication/model_status.go delete mode 100644 services/lbapplication/model_status_test.go delete mode 100644 services/lbapplication/model_target.go delete mode 100644 services/lbapplication/model_target_pool.go delete mode 100644 services/lbapplication/model_target_pool_test.go delete mode 100644 services/lbapplication/model_target_test.go delete mode 100644 services/lbapplication/model_update_credentials_payload.go delete mode 100644 services/lbapplication/model_update_credentials_payload_test.go delete mode 100644 services/lbapplication/model_update_credentials_response.go delete mode 100644 services/lbapplication/model_update_credentials_response_test.go delete mode 100644 services/lbapplication/model_update_load_balancer_payload.go delete mode 100644 services/lbapplication/model_update_load_balancer_payload_test.go delete mode 100644 services/lbapplication/model_update_target_pool_payload.go delete mode 100644 services/lbapplication/model_update_target_pool_payload_test.go delete mode 100644 services/lbapplication/utils.go diff --git a/go.work b/go.work index 07ad791c5..2bee42f70 100644 --- a/go.work +++ b/go.work @@ -57,7 +57,6 @@ use ( ./services/iaasalpha ./services/intake ./services/kms - ./services/lbapplication ./services/loadbalancer ./services/logme ./services/logs @@ -87,4 +86,5 @@ use ( ./services/telemetryrouter ./services/valkey ./services/vpn + ./tools ) diff --git a/services/lbapplication/.openapi-generator/VERSION b/services/lbapplication/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec..000000000 --- a/services/lbapplication/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/services/lbapplication/CHANGELOG.md b/services/lbapplication/CHANGELOG.md deleted file mode 100644 index c93d118c7..000000000 --- a/services/lbapplication/CHANGELOG.md +++ /dev/null @@ -1,44 +0,0 @@ -## v0.6.1 -- **Dependencies:** Bump STACKIT SDK core module to `v0.26.0` - -## v0.6.0 -- Minimal go version is now Go 1.25 - -## v0.5.7 -- **Dependencies:** Bump STACKIT SDK core module from `v0.24.0` to `v0.24.1` - -## v0.5.6 -- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.24.0` - -## v0.5.5 -- Bump STACKIT SDK core module from `v0.21.0` to `v0.21.1` - -## v0.5.4 -- **Dependencies**: Bump `github.com/golang-jwt/jwt/v5` from `v5.3.0` to `v5.3.1` - -## v0.5.3 - - Bump STACKIT SDK core module from `v0.20.0` to `v0.20.1` - -## v0.5.2 - - Bump STACKIT SDK core module from `v0.19.0` to `v0.20.0` - -## v0.5.1 - - **Dependencies:** Bump `github.com/golang-jwt/jwt/v5` from `v5.2.2` to `v5.2.3` - -## v0.5.0 (2025-05-15) -- **Breaking change:** Introduce interfaces for `APIClient` and the request structs - -## v0.4.0 (2025-05-14) -- **Breaking change:** Introduce typed enum constants for status attributes -- **Deprecated:** `lbapplication` service is deprecated and no longer maintained. Use the `alb` service instead - -## v0.3.0 (2025-02-21) -- **New:** Minimal go version is now Go 1.21 - -## v0.2.0 (2025-01-30) - -- **Bugfix**: Set type from interface to int64 of `HealthyThreshold`, `UnhealthyThreshold`, `MaxLoadBalancers`, `Port`, `MaxConnections`, `Code` and `TargetPort` - -## v0.1.0 (2025-01-13) - -- **New**: STACKIT Load Balancer Application module can be used to manage the STACKIT Load Balancer Application diff --git a/services/lbapplication/LICENSE.md b/services/lbapplication/LICENSE.md deleted file mode 100644 index effd8f0d4..000000000 --- a/services/lbapplication/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright 2025 - 2026 Schwarz IT KG - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/services/lbapplication/NOTICE.txt b/services/lbapplication/NOTICE.txt deleted file mode 100644 index 2180e0655..000000000 --- a/services/lbapplication/NOTICE.txt +++ /dev/null @@ -1,2 +0,0 @@ -STACKIT Load Balancer Application SDK for Go -Copyright 2025 - 2026 Schwarz IT KG \ No newline at end of file diff --git a/services/lbapplication/VERSION b/services/lbapplication/VERSION deleted file mode 100644 index 14909610e..000000000 --- a/services/lbapplication/VERSION +++ /dev/null @@ -1 +0,0 @@ -v0.6.1 diff --git a/services/lbapplication/api_default.go b/services/lbapplication/api_default.go deleted file mode 100644 index 70f1c2497..000000000 --- a/services/lbapplication/api_default.go +++ /dev/null @@ -1,2927 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "bytes" - "context" - "fmt" - "io" - "net/http" - "net/url" - "strings" - - "github.com/stackitcloud/stackit-sdk-go/core/config" - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" -) - -type DefaultApi interface { - /* - CreateCredentials Create credentials for observability of the application load balancer - Deprecated: Creates and stores credentials for use with Application Load Balancer Observability. - For example, when using ARGUS, credentials must first be created via the ARGUS API - and then stored with this endpoint to be used by the Application Load Balancer. - - @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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return CreateCredentialsResponse - - Deprecated: Creates and stores credentials for use with Application Load Balancer Observability. - For example, when using ARGUS, credentials must first be created via the ARGUS API - and then stored with this endpoint to be used by the Application Load Balancer. - */ - CreateCredentialsExecute(ctx context.Context, projectId string) (*CreateCredentialsResponse, error) - /* - CreateLoadBalancer Create an application load balancer in a project - Deprecated: Creates an Application Load Balancer. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - - @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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return LoadBalancer - - Deprecated: Creates an Application Load Balancer. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - */ - CreateLoadBalancerExecute(ctx context.Context, projectId string) (*LoadBalancer, error) - /* - DeleteCredentials Delete a single credential in a project. - Deprecated: Deletes the stored Observability credentials. - - @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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param credentialsRef - @return map[string]interface{} - - Deprecated: Deletes the stored Observability credentials. - */ - DeleteCredentialsExecute(ctx context.Context, projectId string, credentialsRef string) (map[string]interface{}, error) - /* - DeleteLoadBalancer Delete a given load balancer in a project. - Deprecated: Deletes the specified Application 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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param name - @return map[string]interface{} - - Deprecated: Deletes the specified Application Load Balancer. - */ - DeleteLoadBalancerExecute(ctx context.Context, projectId string, name string) (map[string]interface{}, error) - /* - DisableService Disables the functionality of load balancers for the project specified. - Deprecated: DEPRECATED! Disabling the Application Load Balancer functionality is now automatic. - This endpoint is kept for compatibility. - Disables the Application Load Balancer functionality for the specified project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiDisableServiceRequest - */ - DisableService(ctx context.Context, projectId string) ApiDisableServiceRequest - /* - DisableServiceExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return map[string]interface{} - - Deprecated: DEPRECATED! Disabling the Application Load Balancer functionality is now automatic. - This endpoint is kept for compatibility. - Disables the Application Load Balancer functionality for the specified project. - */ - DisableServiceExecute(ctx context.Context, projectId string) (map[string]interface{}, error) - /* - EnableService Enables the functionality of application load balancers for the project specified. - Deprecated: DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. - Enables the Application Load Balancer service for the specified project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiEnableServiceRequest - */ - EnableService(ctx context.Context, projectId string) ApiEnableServiceRequest - /* - EnableServiceExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return map[string]interface{} - - Deprecated: DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. - Enables the Application Load Balancer service for the specified project. - */ - EnableServiceExecute(ctx context.Context, projectId string) (map[string]interface{}, error) - /* - GetCredentials Get a single credential reference in a project. - Deprecated: Gets the stored Observability 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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param credentialsRef - @return GetCredentialsResponse - - Deprecated: Gets the stored Observability credentials. - */ - GetCredentialsExecute(ctx context.Context, projectId string, credentialsRef string) (*GetCredentialsResponse, error) - /* - GetLoadBalancer Get a single application load balancer in a project. - Deprecated: Retrieves details of a specific Application Load Balancer in a project. - Includes creation and update information, current status, and any error descriptions. - - @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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param name - @return LoadBalancer - - Deprecated: Retrieves details of a specific Application Load Balancer in a project. - Includes creation and update information, current status, and any error descriptions. - */ - GetLoadBalancerExecute(ctx context.Context, projectId string, name string) (*LoadBalancer, error) - /* - GetQuota Get the quota of Application Load Balancers in a project. - Deprecated: Retrieves the configured Application Load Balancer quota for the project. Limit can be changed via service request. - There can be 3 times as many TLS certificates and 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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return GetQuotaResponse - - Deprecated: Retrieves the configured Application Load Balancer quota for the project. Limit can be changed via service request. - There can be 3 times as many TLS certificates and observability credentials as Load Balancers. - */ - GetQuotaExecute(ctx context.Context, projectId string) (*GetQuotaResponse, error) - /* - GetServiceStatus Return the status of application load balancer functionality for the project specified. - Deprecated: DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. - Status will return the Application Load Balancer functionality status for the specified project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiGetServiceStatusRequest - */ - GetServiceStatus(ctx context.Context, projectId string) ApiGetServiceStatusRequest - /* - GetServiceStatusExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return GetServiceStatusResponse - - Deprecated: DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. - Status will return the Application Load Balancer functionality status for the specified project. - */ - GetServiceStatusExecute(ctx context.Context, projectId string) (*GetServiceStatusResponse, error) - /* - ListCredentials List all credentials in a project. - Deprecated: Lists the stored Observability 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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ListCredentialsResponse - - Deprecated: Lists the stored Observability credentials. - */ - ListCredentialsExecute(ctx context.Context, projectId string) (*ListCredentialsResponse, error) - /* - ListLoadBalancers List load balancers in a project. - Deprecated: Lists all Application Load Balancers in a project. - Includes details from creation or updates, along with their status and any error descriptions. - - @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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ListLoadBalancersResponse - - Deprecated: Lists all Application Load Balancers in a project. - Includes details from creation or updates, along with their status and any error descriptions. - */ - ListLoadBalancersExecute(ctx context.Context, projectId string) (*ListLoadBalancersResponse, error) - /* - ListPlans List available service plans. - Deprecated: Lists 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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ListPlansResponse - - Deprecated: Lists the configured service plans for a project. - */ - ListPlansExecute(ctx context.Context) (*ListPlansResponse, error) - /* - UpdateCredentials Update credentials for observability in a project. - Deprecated: Updates the stored Observability 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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param credentialsRef - @return UpdateCredentialsResponse - - Deprecated: Updates the stored Observability credentials. - */ - UpdateCredentialsExecute(ctx context.Context, projectId string, credentialsRef string) (*UpdateCredentialsResponse, error) - /* - UpdateLoadBalancer Update a load balancer in a project. - Deprecated: Updates an existing Application Load Balancer by modifying its listeners and target pools. - Ensure the resource version is current to maintain concurrency safety. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - - @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 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param name - @return LoadBalancer - - Deprecated: Updates an existing Application Load Balancer by modifying its listeners and target pools. - Ensure the resource version is current to maintain concurrency safety. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - */ - UpdateLoadBalancerExecute(ctx context.Context, projectId string, name string) (*LoadBalancer, error) - /* - UpdateTargetPool Update a single target pool of a load balancer in a project. - Deprecated: Replaces the content of a specific target pool in the Application Load Balancer (useful for adding or removing target servers). - Only updates the specified target pool, leaving others unchanged. - Cannot be used to create or rename target pools. - - @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 - - @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 TargetPool - - Deprecated: Replaces the content of a specific target pool in the Application Load Balancer (useful for adding or removing target servers). - Only updates the specified target pool, leaving others unchanged. - Cannot be used to create or rename target pools. - */ - UpdateTargetPoolExecute(ctx context.Context, projectId string, name string, targetPoolName string) (*TargetPool, error) -} - -type ApiCreateCredentialsRequest interface { - CreateCredentialsPayload(createCredentialsPayload CreateCredentialsPayload) ApiCreateCredentialsRequest - XRequestID(xRequestID string) ApiCreateCredentialsRequest - Execute() (*CreateCredentialsResponse, error) -} - -type ApiCreateLoadBalancerRequest interface { - CreateLoadBalancerPayload(createLoadBalancerPayload CreateLoadBalancerPayload) ApiCreateLoadBalancerRequest - XRequestID(xRequestID string) ApiCreateLoadBalancerRequest - Execute() (*LoadBalancer, error) -} - -type ApiDeleteCredentialsRequest interface { - Execute() (map[string]interface{}, error) -} - -type ApiDeleteLoadBalancerRequest interface { - Execute() (map[string]interface{}, error) -} - -type ApiDisableServiceRequest interface { - Execute() (map[string]interface{}, error) -} - -type ApiEnableServiceRequest interface { - XRequestID(xRequestID string) ApiEnableServiceRequest - Execute() (map[string]interface{}, error) -} - -type ApiGetCredentialsRequest interface { - Execute() (*GetCredentialsResponse, error) -} - -type ApiGetLoadBalancerRequest interface { - Execute() (*LoadBalancer, error) -} - -type ApiGetQuotaRequest interface { - Execute() (*GetQuotaResponse, error) -} - -type ApiGetServiceStatusRequest interface { - Execute() (*GetServiceStatusResponse, error) -} - -type ApiListCredentialsRequest interface { - Execute() (*ListCredentialsResponse, error) -} - -type ApiListLoadBalancersRequest interface { - // page_size specifies how many load balancers should be returned on this page. Must be a positive number <= 1000 - PageSize(pageSize string) ApiListLoadBalancersRequest - // page_id is a page identifier returned by the previous response and is used to request the next page - PageId(pageId string) ApiListLoadBalancersRequest - Execute() (*ListLoadBalancersResponse, error) -} - -type ApiListPlansRequest interface { - Execute() (*ListPlansResponse, error) -} - -type ApiUpdateCredentialsRequest interface { - UpdateCredentialsPayload(updateCredentialsPayload UpdateCredentialsPayload) ApiUpdateCredentialsRequest - Execute() (*UpdateCredentialsResponse, error) -} - -type ApiUpdateLoadBalancerRequest interface { - UpdateLoadBalancerPayload(updateLoadBalancerPayload UpdateLoadBalancerPayload) ApiUpdateLoadBalancerRequest - Execute() (*LoadBalancer, error) -} - -type ApiUpdateTargetPoolRequest interface { - UpdateTargetPoolPayload(updateTargetPoolPayload UpdateTargetPoolPayload) ApiUpdateTargetPoolRequest - Execute() (*TargetPool, error) -} - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type CreateCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - createCredentialsPayload *CreateCredentialsPayload - xRequestID *string -} - -func (r CreateCredentialsRequest) CreateCredentialsPayload(createCredentialsPayload CreateCredentialsPayload) ApiCreateCredentialsRequest { - r.createCredentialsPayload = &createCredentialsPayload - return r -} - -func (r CreateCredentialsRequest) XRequestID(xRequestID string) ApiCreateCredentialsRequest { - r.xRequestID = &xRequestID - return r -} - -func (r CreateCredentialsRequest) Execute() (*CreateCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateCredentialsResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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, fmt.Errorf("createCredentialsPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xRequestID != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Request-ID", r.xRequestID, "") - } - // body params - localVarPostBody = r.createCredentialsPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -CreateCredentials: Create credentials for observability of the application load balancer - -Deprecated: Creates and stores credentials for use with Application Load Balancer Observability. - - For example, when using ARGUS, credentials must first be created via the ARGUS API - and then stored with this endpoint to be used by the Application Load Balancer. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiCreateCredentialsRequest -*/ -func (a *APIClient) CreateCredentials(ctx context.Context, projectId string) ApiCreateCredentialsRequest { - return CreateCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -/* -Deprecated: Creates and stores credentials for use with Application Load Balancer Observability. - - For example, when using ARGUS, credentials must first be created via the ARGUS API - and then stored with this endpoint to be used by the Application Load Balancer. -*/ -func (a *APIClient) CreateCredentialsExecute(ctx context.Context, projectId string) (*CreateCredentialsResponse, error) { - r := CreateCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type CreateLoadBalancerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - createLoadBalancerPayload *CreateLoadBalancerPayload - xRequestID *string -} - -func (r CreateLoadBalancerRequest) CreateLoadBalancerPayload(createLoadBalancerPayload CreateLoadBalancerPayload) ApiCreateLoadBalancerRequest { - r.createLoadBalancerPayload = &createLoadBalancerPayload - return r -} - -func (r CreateLoadBalancerRequest) XRequestID(xRequestID string) ApiCreateLoadBalancerRequest { - r.xRequestID = &xRequestID - return r -} - -func (r CreateLoadBalancerRequest) Execute() (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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, fmt.Errorf("createLoadBalancerPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xRequestID != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Request-ID", r.xRequestID, "") - } - // body params - localVarPostBody = r.createLoadBalancerPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -CreateLoadBalancer: Create an application load balancer in a project - -Deprecated: Creates an Application Load Balancer. - - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiCreateLoadBalancerRequest -*/ -func (a *APIClient) CreateLoadBalancer(ctx context.Context, projectId string) ApiCreateLoadBalancerRequest { - return CreateLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -/* -Deprecated: Creates an Application Load Balancer. - - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. -*/ -func (a *APIClient) CreateLoadBalancerExecute(ctx context.Context, projectId string) (*LoadBalancer, error) { - r := CreateLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type DeleteCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - credentialsRef string -} - -func (r DeleteCredentialsRequest) Execute() (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -DeleteCredentials: Delete a single credential in a project. - -Deprecated: Deletes the stored Observability credentials. - - @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 *APIClient) DeleteCredentials(ctx context.Context, projectId string, credentialsRef string) ApiDeleteCredentialsRequest { - return DeleteCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - credentialsRef: credentialsRef, - } -} - -/* -Deprecated: Deletes the stored Observability credentials. -*/ -func (a *APIClient) DeleteCredentialsExecute(ctx context.Context, projectId string, credentialsRef string) (map[string]interface{}, error) { - r := DeleteCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - credentialsRef: credentialsRef, - } - return r.Execute() -} - -type DeleteLoadBalancerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - name string -} - -func (r DeleteLoadBalancerRequest) Execute() (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -DeleteLoadBalancer: Delete a given load balancer in a project. - -Deprecated: Deletes the specified Application 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 *APIClient) DeleteLoadBalancer(ctx context.Context, projectId string, name string) ApiDeleteLoadBalancerRequest { - return DeleteLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - name: name, - } -} - -/* -Deprecated: Deletes the specified Application Load Balancer. -*/ -func (a *APIClient) DeleteLoadBalancerExecute(ctx context.Context, projectId string, name string) (map[string]interface{}, error) { - r := DeleteLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - name: name, - } - return r.Execute() -} - -type DisableServiceRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string -} - -func (r DisableServiceRequest) Execute() (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DisableService") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -DisableService: Disables the functionality of load balancers for the project specified. - -Deprecated: DEPRECATED! Disabling the Application Load Balancer functionality is now automatic. - - This endpoint is kept for compatibility. - Disables the Application Load Balancer functionality for the specified project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiDisableServiceRequest -*/ -func (a *APIClient) DisableService(ctx context.Context, projectId string) ApiDisableServiceRequest { - return DisableServiceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -/* -Deprecated: DEPRECATED! Disabling the Application Load Balancer functionality is now automatic. - - This endpoint is kept for compatibility. - Disables the Application Load Balancer functionality for the specified project. -*/ -func (a *APIClient) DisableServiceExecute(ctx context.Context, projectId string) (map[string]interface{}, error) { - r := DisableServiceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type EnableServiceRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - xRequestID *string -} - -func (r EnableServiceRequest) XRequestID(xRequestID string) ApiEnableServiceRequest { - r.xRequestID = &xRequestID - return r -} - -func (r EnableServiceRequest) Execute() (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.EnableService") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xRequestID != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Request-ID", r.xRequestID, "") - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -EnableService: Enables the functionality of application load balancers for the project specified. - -Deprecated: DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. - - Enables the Application Load Balancer service for the specified project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiEnableServiceRequest -*/ -func (a *APIClient) EnableService(ctx context.Context, projectId string) ApiEnableServiceRequest { - return EnableServiceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -/* -Deprecated: DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. - - Enables the Application Load Balancer service for the specified project. -*/ -func (a *APIClient) EnableServiceExecute(ctx context.Context, projectId string) (map[string]interface{}, error) { - r := EnableServiceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type GetCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - credentialsRef string -} - -func (r GetCredentialsRequest) Execute() (*GetCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetCredentialsResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetCredentials: Get a single credential reference in a project. - -Deprecated: Gets the stored Observability 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 *APIClient) GetCredentials(ctx context.Context, projectId string, credentialsRef string) ApiGetCredentialsRequest { - return GetCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - credentialsRef: credentialsRef, - } -} - -/* -Deprecated: Gets the stored Observability credentials. -*/ -func (a *APIClient) GetCredentialsExecute(ctx context.Context, projectId string, credentialsRef string) (*GetCredentialsResponse, error) { - r := GetCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - credentialsRef: credentialsRef, - } - return r.Execute() -} - -type GetLoadBalancerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - name string -} - -func (r GetLoadBalancerRequest) Execute() (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetLoadBalancer: Get a single application load balancer in a project. - -Deprecated: Retrieves details of a specific Application Load Balancer in a project. - - Includes creation and update information, current status, and any error descriptions. - - @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 *APIClient) GetLoadBalancer(ctx context.Context, projectId string, name string) ApiGetLoadBalancerRequest { - return GetLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - name: name, - } -} - -/* -Deprecated: Retrieves details of a specific Application Load Balancer in a project. - - Includes creation and update information, current status, and any error descriptions. -*/ -func (a *APIClient) GetLoadBalancerExecute(ctx context.Context, projectId string, name string) (*LoadBalancer, error) { - r := GetLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - name: name, - } - return r.Execute() -} - -type GetQuotaRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string -} - -func (r GetQuotaRequest) Execute() (*GetQuotaResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetQuotaResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetQuota") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetQuota: Get the quota of Application Load Balancers in a project. - -Deprecated: Retrieves the configured Application Load Balancer quota for the project. Limit can be changed via service request. - - There can be 3 times as many TLS certificates and 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 *APIClient) GetQuota(ctx context.Context, projectId string) ApiGetQuotaRequest { - return GetQuotaRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -/* -Deprecated: Retrieves the configured Application Load Balancer quota for the project. Limit can be changed via service request. - - There can be 3 times as many TLS certificates and observability credentials as Load Balancers. -*/ -func (a *APIClient) GetQuotaExecute(ctx context.Context, projectId string) (*GetQuotaResponse, error) { - r := GetQuotaRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type GetServiceStatusRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string -} - -func (r GetServiceStatusRequest) Execute() (*GetServiceStatusResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetServiceStatusResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetServiceStatus") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetServiceStatus: Return the status of application load balancer functionality for the project specified. - -Deprecated: DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. - - Status will return the Application Load Balancer functionality status for the specified project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiGetServiceStatusRequest -*/ -func (a *APIClient) GetServiceStatus(ctx context.Context, projectId string) ApiGetServiceStatusRequest { - return GetServiceStatusRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -/* -Deprecated: DEPRECATED! Checking the status is now obsolete. The endpoint is kept for compatibility. - - Status will return the Application Load Balancer functionality status for the specified project. -*/ -func (a *APIClient) GetServiceStatusExecute(ctx context.Context, projectId string) (*GetServiceStatusResponse, error) { - r := GetServiceStatusRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type ListCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string -} - -func (r ListCredentialsRequest) Execute() (*ListCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListCredentialsResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -ListCredentials: List all credentials in a project. - -Deprecated: Lists the stored Observability 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 *APIClient) ListCredentials(ctx context.Context, projectId string) ApiListCredentialsRequest { - return ListCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -/* -Deprecated: Lists the stored Observability credentials. -*/ -func (a *APIClient) ListCredentialsExecute(ctx context.Context, projectId string) (*ListCredentialsResponse, error) { - r := ListCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type ListLoadBalancersRequest struct { - ctx context.Context - apiService *DefaultApiService - 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 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 - -func (r ListLoadBalancersRequest) PageId(pageId string) ApiListLoadBalancersRequest { - r.pageId = &pageId - return r -} - -func (r ListLoadBalancersRequest) Execute() (*ListLoadBalancersResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListLoadBalancersResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListLoadBalancers") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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, "") - } - if r.pageId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageId", r.pageId, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -ListLoadBalancers: List load balancers in a project. - -Deprecated: Lists all Application Load Balancers in a project. - - Includes details from creation or updates, along with their status and any error descriptions. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @return ApiListLoadBalancersRequest -*/ -func (a *APIClient) ListLoadBalancers(ctx context.Context, projectId string) ApiListLoadBalancersRequest { - return ListLoadBalancersRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -/* -Deprecated: Lists all Application Load Balancers in a project. - - Includes details from creation or updates, along with their status and any error descriptions. -*/ -func (a *APIClient) ListLoadBalancersExecute(ctx context.Context, projectId string) (*ListLoadBalancersResponse, error) { - r := ListLoadBalancersRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type ListPlansRequest struct { - ctx context.Context - apiService *DefaultApiService -} - -func (r ListPlansRequest) Execute() (*ListPlansResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListPlansResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListPlans") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -ListPlans: List available service plans. - -Deprecated: Lists 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 *APIClient) ListPlans(ctx context.Context) ApiListPlansRequest { - return ListPlansRequest{ - apiService: a.defaultApi, - ctx: ctx, - } -} - -/* -Deprecated: Lists the configured service plans for a project. -*/ -func (a *APIClient) ListPlansExecute(ctx context.Context) (*ListPlansResponse, error) { - r := ListPlansRequest{ - apiService: a.defaultApi, - ctx: ctx, - } - return r.Execute() -} - -type UpdateCredentialsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - credentialsRef string - updateCredentialsPayload *UpdateCredentialsPayload -} - -func (r UpdateCredentialsRequest) UpdateCredentialsPayload(updateCredentialsPayload UpdateCredentialsPayload) ApiUpdateCredentialsRequest { - r.updateCredentialsPayload = &updateCredentialsPayload - return r -} - -func (r UpdateCredentialsRequest) Execute() (*UpdateCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UpdateCredentialsResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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, fmt.Errorf("updateCredentialsPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateCredentialsPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -UpdateCredentials: Update credentials for observability in a project. - -Deprecated: Updates the stored Observability 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 *APIClient) UpdateCredentials(ctx context.Context, projectId string, credentialsRef string) ApiUpdateCredentialsRequest { - return UpdateCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - credentialsRef: credentialsRef, - } -} - -/* -Deprecated: Updates the stored Observability credentials. -*/ -func (a *APIClient) UpdateCredentialsExecute(ctx context.Context, projectId string, credentialsRef string) (*UpdateCredentialsResponse, error) { - r := UpdateCredentialsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - credentialsRef: credentialsRef, - } - return r.Execute() -} - -type UpdateLoadBalancerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - name string - updateLoadBalancerPayload *UpdateLoadBalancerPayload -} - -func (r UpdateLoadBalancerRequest) UpdateLoadBalancerPayload(updateLoadBalancerPayload UpdateLoadBalancerPayload) ApiUpdateLoadBalancerRequest { - r.updateLoadBalancerPayload = &updateLoadBalancerPayload - return r -} - -func (r UpdateLoadBalancerRequest) Execute() (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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, fmt.Errorf("updateLoadBalancerPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateLoadBalancerPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -UpdateLoadBalancer: Update a load balancer in a project. - -Deprecated: Updates an existing Application Load Balancer by modifying its listeners and target pools. - - Ensure the resource version is current to maintain concurrency safety. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - - @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 *APIClient) UpdateLoadBalancer(ctx context.Context, projectId string, name string) ApiUpdateLoadBalancerRequest { - return UpdateLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - name: name, - } -} - -/* -Deprecated: Updates an existing Application Load Balancer by modifying its listeners and target pools. - - Ensure the resource version is current to maintain concurrency safety. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. -*/ -func (a *APIClient) UpdateLoadBalancerExecute(ctx context.Context, projectId string, name string) (*LoadBalancer, error) { - r := UpdateLoadBalancerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - name: name, - } - return r.Execute() -} - -type UpdateTargetPoolRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - name string - targetPoolName string - updateTargetPoolPayload *UpdateTargetPoolPayload -} - -func (r UpdateTargetPoolRequest) UpdateTargetPoolPayload(updateTargetPoolPayload UpdateTargetPoolPayload) ApiUpdateTargetPoolRequest { - r.updateTargetPoolPayload = &updateTargetPoolPayload - return r -} - -func (r UpdateTargetPoolRequest) Execute() (*TargetPool, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *TargetPool - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateTargetPool") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/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, fmt.Errorf("updateTargetPoolPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateTargetPoolPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v Status - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -UpdateTargetPool: Update a single target pool of a load balancer in a project. - -Deprecated: Replaces the content of a specific target pool in the Application Load Balancer (useful for adding or removing target servers). - - Only updates the specified target pool, leaving others unchanged. - Cannot be used to create or rename target pools. - - @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 *APIClient) UpdateTargetPool(ctx context.Context, projectId string, name string, targetPoolName string) ApiUpdateTargetPoolRequest { - return UpdateTargetPoolRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - name: name, - targetPoolName: targetPoolName, - } -} - -/* -Deprecated: Replaces the content of a specific target pool in the Application Load Balancer (useful for adding or removing target servers). - - Only updates the specified target pool, leaving others unchanged. - Cannot be used to create or rename target pools. -*/ -func (a *APIClient) UpdateTargetPoolExecute(ctx context.Context, projectId string, name string, targetPoolName string) (*TargetPool, error) { - r := UpdateTargetPoolRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - name: name, - targetPoolName: targetPoolName, - } - return r.Execute() -} diff --git a/services/lbapplication/api_default_test.go b/services/lbapplication/api_default_test.go deleted file mode 100644 index 6044ad174..000000000 --- a/services/lbapplication/api_default_test.go +++ /dev/null @@ -1,883 +0,0 @@ -/* -STACKIT Application Load Balancer API - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package lbapplication - -import ( - "context" - "encoding/json" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -func Test_lbapplication_DefaultApiService(t *testing.T) { - - t.Run("Test DefaultApiService CreateCredentials", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/credentials" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := CreateCredentialsResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - createCredentialsPayload := CreateCredentialsPayload{} - - resp, reqErr := apiClient.CreateCredentials(context.Background(), projectId).CreateCredentialsPayload(createCredentialsPayload).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService CreateLoadBalancer", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := LoadBalancer{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - createLoadBalancerPayload := CreateLoadBalancerPayload{} - - resp, reqErr := apiClient.CreateLoadBalancer(context.Background(), projectId).CreateLoadBalancerPayload(createLoadBalancerPayload).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService DeleteCredentials", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - credentialsRefValue := "credentialsRef-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := map[string]interface{}{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - credentialsRef := credentialsRefValue - - resp, reqErr := apiClient.DeleteCredentials(context.Background(), projectId, credentialsRef).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService DeleteLoadBalancer", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers/{name}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - nameValue := "name-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := map[string]interface{}{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - name := nameValue - - resp, reqErr := apiClient.DeleteLoadBalancer(context.Background(), projectId, name).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService DisableService", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := map[string]interface{}{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - - resp, reqErr := apiClient.DisableService(context.Background(), projectId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService EnableService", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := map[string]interface{}{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - - resp, reqErr := apiClient.EnableService(context.Background(), projectId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService GetCredentials", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - credentialsRefValue := "credentialsRef-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := GetCredentialsResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - credentialsRef := credentialsRefValue - - resp, reqErr := apiClient.GetCredentials(context.Background(), projectId, credentialsRef).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService GetLoadBalancer", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers/{name}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - nameValue := "name-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := LoadBalancer{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - name := nameValue - - resp, reqErr := apiClient.GetLoadBalancer(context.Background(), projectId, name).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService GetQuota", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/quota" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := GetQuotaResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - - resp, reqErr := apiClient.GetQuota(context.Background(), projectId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService GetServiceStatus", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := GetServiceStatusResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - - resp, reqErr := apiClient.GetServiceStatus(context.Background(), projectId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService ListCredentials", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/credentials" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := ListCredentialsResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - - resp, reqErr := apiClient.ListCredentials(context.Background(), projectId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService ListLoadBalancers", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := ListLoadBalancersResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - - resp, reqErr := apiClient.ListLoadBalancers(context.Background(), projectId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService ListPlans", func(t *testing.T) { - _apiUrlPath := "/v1beta/plans" - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := ListPlansResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - resp, reqErr := apiClient.ListPlans(context.Background()).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService UpdateCredentials", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - credentialsRefValue := "credentialsRef-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := UpdateCredentialsResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - credentialsRef := credentialsRefValue - updateCredentialsPayload := UpdateCredentialsPayload{} - - resp, reqErr := apiClient.UpdateCredentials(context.Background(), projectId, credentialsRef).UpdateCredentialsPayload(updateCredentialsPayload).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService UpdateLoadBalancer", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers/{name}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - nameValue := "name-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := LoadBalancer{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - name := nameValue - updateLoadBalancerPayload := UpdateLoadBalancerPayload{} - - resp, reqErr := apiClient.UpdateLoadBalancer(context.Background(), projectId, name).UpdateLoadBalancerPayload(updateLoadBalancerPayload).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService UpdateTargetPool", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers/{name}/target-pools/{targetPoolName}" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - nameValue := "name-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) - targetPoolNameValue := "targetPoolName-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"targetPoolName"+"}", url.PathEscape(ParameterValueToString(targetPoolNameValue, "targetPoolName")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := TargetPool{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for lbapplication_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - name := nameValue - targetPoolName := targetPoolNameValue - updateTargetPoolPayload := UpdateTargetPoolPayload{} - - resp, reqErr := apiClient.UpdateTargetPool(context.Background(), projectId, name, targetPoolName).UpdateTargetPoolPayload(updateTargetPoolPayload).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - -} diff --git a/services/lbapplication/client.go b/services/lbapplication/client.go deleted file mode 100644 index 51329064c..000000000 --- a/services/lbapplication/client.go +++ /dev/null @@ -1,631 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - "github.com/stackitcloud/stackit-sdk-go/core/auth" - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") -) - -// APIClient manages communication with the STACKIT Application Load Balancer API API v1beta.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. - defaultApi *DefaultApiService -} - -type service struct { - client DefaultApi -} - -// NewAPIClient creates a new API client. -// Optionally receives configuration options -func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { - cfg := NewConfiguration() - - for _, option := range opts { - err := option(cfg) - if err != nil { - return nil, fmt.Errorf("configuring the client: %w", err) - } - } - - err := config.ConfigureRegion(cfg) - if err != nil { - return nil, fmt.Errorf("configuring region: %w", err) - } - - if cfg.HTTPClient == nil { - cfg.HTTPClient = &http.Client{} - } - - authRoundTripper, err := auth.SetupAuth(cfg) - if err != nil { - return nil, fmt.Errorf("setting up authentication: %w", err) - } - - roundTripper := authRoundTripper - if cfg.Middleware != nil { - roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) - } - - cfg.HTTPClient.Transport = roundTripper - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - c.defaultApi = (*DefaultApiService)(&c.common) - - return c, nil -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func ParameterValueToString(obj interface{}, key string) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param, ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap, err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t, ok := obj.(MappedNullable); ok { - dataMap, err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i := 0; i < lenIndValue; i++ { - var arrayValue = indValue.Index(i) - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) - } - return - - case reflect.Map: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - iter := indValue.MapRange() - for iter.Next() { - k, v := iter.Key(), iter.Value() - parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) - } - return - - case reflect.Interface: - fallthrough - case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) - return - - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } - - switch valuesMap := headerOrQueryParams.(type) { - case url.Values: - if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { - valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) - } else { - valuesMap.Add(keyPrefix, value) - } - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } -} - -// helper for converting interface{} parameters to json strings -func parameterToJson(obj interface{}) (string, error) { - jsonBuf, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(jsonBuf), err -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - if c.cfg.Debug { - dump, err := httputil.DumpRequestOut(request, true) - if err != nil { - return nil, err - } - log.Printf("\n%s\n", string(dump)) - } - - resp, err := c.cfg.HTTPClient.Do(request) - if err != nil { - return resp, err - } - - if c.cfg.Debug { - dump, err := httputil.DumpResponse(resp, true) - if err != nil { - return resp, err - } - log.Printf("\n%s\n", string(dump)) - } - return resp, err -} - -// Allow modification of underlying config for alternate implementations and testing -// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior -func (c *APIClient) GetConfig() *config.Configuration { - return c.cfg -} - -type formFile struct { - fileBytes []byte - fileName string - formFileName string -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - formFiles []formFile) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if !IsNil(postBody) { - contentType := headerParams["Content-Type"] - if contentType == "" { - contentType = detectContentType(postBody) - headerParams["Content-Type"] = contentType - } - - body, err = setBody(postBody, contentType) - if err != nil { - return nil, err - } - } - - // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { - if body != nil { - return nil, fmt.Errorf("cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, fmt.Errorf("cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return fmt.Errorf("unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return fmt.Errorf("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} diff --git a/services/lbapplication/configuration.go b/services/lbapplication/configuration.go deleted file mode 100644 index a41f3a76e..000000000 --- a/services/lbapplication/configuration.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -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/lbapplication", - Debug: false, - Servers: config.ServerConfigurations{ - { - URL: "https://lb-application.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/lbapplication/go.mod b/services/lbapplication/go.mod deleted file mode 100644 index e4e92dffb..000000000 --- a/services/lbapplication/go.mod +++ /dev/null @@ -1,10 +0,0 @@ -module github.com/stackitcloud/stackit-sdk-go/services/lbapplication - -go 1.25 - -require github.com/stackitcloud/stackit-sdk-go/core v0.26.0 - -require ( - github.com/golang-jwt/jwt/v5 v5.3.1 // indirect - github.com/google/uuid v1.6.0 // indirect -) diff --git a/services/lbapplication/go.sum b/services/lbapplication/go.sum deleted file mode 100644 index 3712a0c87..000000000 --- a/services/lbapplication/go.sum +++ /dev/null @@ -1,8 +0,0 @@ -github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= -github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= -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.26.0 h1:jQEb9gkehfp6VCP6TcYk7BI10cz4l0KM2L6hqYBH2QA= -github.com/stackitcloud/stackit-sdk-go/core v0.26.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= diff --git a/services/lbapplication/model_active_health_check.go b/services/lbapplication/model_active_health_check.go deleted file mode 100644 index 0667a89b7..000000000 --- a/services/lbapplication/model_active_health_check.go +++ /dev/null @@ -1,370 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the ActiveHealthCheck type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ActiveHealthCheck{} - -/* - types and functions for healthyThreshold -*/ - -// isInteger -type ActiveHealthCheckGetHealthyThresholdAttributeType = *int64 -type ActiveHealthCheckGetHealthyThresholdArgType = int64 -type ActiveHealthCheckGetHealthyThresholdRetType = int64 - -func getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(arg ActiveHealthCheckGetHealthyThresholdAttributeType) (ret ActiveHealthCheckGetHealthyThresholdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setActiveHealthCheckGetHealthyThresholdAttributeType(arg *ActiveHealthCheckGetHealthyThresholdAttributeType, val ActiveHealthCheckGetHealthyThresholdRetType) { - *arg = &val -} - -/* - types and functions for httpHealthChecks -*/ - -// isModel -type ActiveHealthCheckGetHttpHealthChecksAttributeType = *HttpHealthChecks -type ActiveHealthCheckGetHttpHealthChecksArgType = HttpHealthChecks -type ActiveHealthCheckGetHttpHealthChecksRetType = HttpHealthChecks - -func getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(arg ActiveHealthCheckGetHttpHealthChecksAttributeType) (ret ActiveHealthCheckGetHttpHealthChecksRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setActiveHealthCheckGetHttpHealthChecksAttributeType(arg *ActiveHealthCheckGetHttpHealthChecksAttributeType, val ActiveHealthCheckGetHttpHealthChecksRetType) { - *arg = &val -} - -/* - types and functions for interval -*/ - -// isNotNullableString -type ActiveHealthCheckGetIntervalAttributeType = *string - -func getActiveHealthCheckGetIntervalAttributeTypeOk(arg ActiveHealthCheckGetIntervalAttributeType) (ret ActiveHealthCheckGetIntervalRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setActiveHealthCheckGetIntervalAttributeType(arg *ActiveHealthCheckGetIntervalAttributeType, val ActiveHealthCheckGetIntervalRetType) { - *arg = &val -} - -type ActiveHealthCheckGetIntervalArgType = string -type ActiveHealthCheckGetIntervalRetType = string - -/* - types and functions for intervalJitter -*/ - -// isNotNullableString -type ActiveHealthCheckGetIntervalJitterAttributeType = *string - -func getActiveHealthCheckGetIntervalJitterAttributeTypeOk(arg ActiveHealthCheckGetIntervalJitterAttributeType) (ret ActiveHealthCheckGetIntervalJitterRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setActiveHealthCheckGetIntervalJitterAttributeType(arg *ActiveHealthCheckGetIntervalJitterAttributeType, val ActiveHealthCheckGetIntervalJitterRetType) { - *arg = &val -} - -type ActiveHealthCheckGetIntervalJitterArgType = string -type ActiveHealthCheckGetIntervalJitterRetType = string - -/* - types and functions for timeout -*/ - -// isNotNullableString -type ActiveHealthCheckGetTimeoutAttributeType = *string - -func getActiveHealthCheckGetTimeoutAttributeTypeOk(arg ActiveHealthCheckGetTimeoutAttributeType) (ret ActiveHealthCheckGetTimeoutRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setActiveHealthCheckGetTimeoutAttributeType(arg *ActiveHealthCheckGetTimeoutAttributeType, val ActiveHealthCheckGetTimeoutRetType) { - *arg = &val -} - -type ActiveHealthCheckGetTimeoutArgType = string -type ActiveHealthCheckGetTimeoutRetType = string - -/* - types and functions for unhealthyThreshold -*/ - -// isInteger -type ActiveHealthCheckGetUnhealthyThresholdAttributeType = *int64 -type ActiveHealthCheckGetUnhealthyThresholdArgType = int64 -type ActiveHealthCheckGetUnhealthyThresholdRetType = int64 - -func getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(arg ActiveHealthCheckGetUnhealthyThresholdAttributeType) (ret ActiveHealthCheckGetUnhealthyThresholdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setActiveHealthCheckGetUnhealthyThresholdAttributeType(arg *ActiveHealthCheckGetUnhealthyThresholdAttributeType, val ActiveHealthCheckGetUnhealthyThresholdRetType) { - *arg = &val -} - -// ActiveHealthCheck struct for ActiveHealthCheck -type ActiveHealthCheck struct { - // Healthy threshold of the health checking - HealthyThreshold ActiveHealthCheckGetHealthyThresholdAttributeType `json:"healthyThreshold,omitempty"` - HttpHealthChecks ActiveHealthCheckGetHttpHealthChecksAttributeType `json:"httpHealthChecks,omitempty"` - // Interval duration of health checking in seconds - Interval ActiveHealthCheckGetIntervalAttributeType `json:"interval,omitempty"` - // Interval duration threshold of the health checking in seconds - IntervalJitter ActiveHealthCheckGetIntervalJitterAttributeType `json:"intervalJitter,omitempty"` - // Active health checking timeout duration in seconds - Timeout ActiveHealthCheckGetTimeoutAttributeType `json:"timeout,omitempty"` - // Unhealthy threshold of the health checking - UnhealthyThreshold ActiveHealthCheckGetUnhealthyThresholdAttributeType `json:"unhealthyThreshold,omitempty"` -} - -// NewActiveHealthCheck instantiates a new ActiveHealthCheck object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res ActiveHealthCheckGetHealthyThresholdRetType) { - res, _ = o.GetHealthyThresholdOk() - return -} - -// GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetHealthyThresholdOk() (ret ActiveHealthCheckGetHealthyThresholdRetType, ok bool) { - return getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(o.HealthyThreshold) -} - -// HasHealthyThreshold returns a boolean if a field has been set. -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. -func (o *ActiveHealthCheck) SetHealthyThreshold(v ActiveHealthCheckGetHealthyThresholdRetType) { - setActiveHealthCheckGetHealthyThresholdAttributeType(&o.HealthyThreshold, v) -} - -// GetHttpHealthChecks returns the HttpHealthChecks field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetHttpHealthChecks() (res ActiveHealthCheckGetHttpHealthChecksRetType) { - res, _ = o.GetHttpHealthChecksOk() - return -} - -// GetHttpHealthChecksOk returns a tuple with the HttpHealthChecks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetHttpHealthChecksOk() (ret ActiveHealthCheckGetHttpHealthChecksRetType, ok bool) { - return getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(o.HttpHealthChecks) -} - -// HasHttpHealthChecks returns a boolean if a field has been set. -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. -func (o *ActiveHealthCheck) SetHttpHealthChecks(v ActiveHealthCheckGetHttpHealthChecksRetType) { - setActiveHealthCheckGetHttpHealthChecksAttributeType(&o.HttpHealthChecks, v) -} - -// GetInterval returns the Interval field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetInterval() (res ActiveHealthCheckGetIntervalRetType) { - res, _ = o.GetIntervalOk() - return -} - -// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetIntervalOk() (ret ActiveHealthCheckGetIntervalRetType, ok bool) { - return getActiveHealthCheckGetIntervalAttributeTypeOk(o.Interval) -} - -// HasInterval returns a boolean if a field has been set. -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. -func (o *ActiveHealthCheck) SetInterval(v ActiveHealthCheckGetIntervalRetType) { - setActiveHealthCheckGetIntervalAttributeType(&o.Interval, v) -} - -// GetIntervalJitter returns the IntervalJitter field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetIntervalJitter() (res ActiveHealthCheckGetIntervalJitterRetType) { - res, _ = o.GetIntervalJitterOk() - return -} - -// GetIntervalJitterOk returns a tuple with the IntervalJitter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetIntervalJitterOk() (ret ActiveHealthCheckGetIntervalJitterRetType, ok bool) { - return getActiveHealthCheckGetIntervalJitterAttributeTypeOk(o.IntervalJitter) -} - -// HasIntervalJitter returns a boolean if a field has been set. -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. -func (o *ActiveHealthCheck) SetIntervalJitter(v ActiveHealthCheckGetIntervalJitterRetType) { - setActiveHealthCheckGetIntervalJitterAttributeType(&o.IntervalJitter, v) -} - -// GetTimeout returns the Timeout field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetTimeout() (res ActiveHealthCheckGetTimeoutRetType) { - res, _ = o.GetTimeoutOk() - return -} - -// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetTimeoutOk() (ret ActiveHealthCheckGetTimeoutRetType, ok bool) { - return getActiveHealthCheckGetTimeoutAttributeTypeOk(o.Timeout) -} - -// HasTimeout returns a boolean if a field has been set. -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. -func (o *ActiveHealthCheck) SetTimeout(v ActiveHealthCheckGetTimeoutRetType) { - setActiveHealthCheckGetTimeoutAttributeType(&o.Timeout, v) -} - -// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetUnhealthyThreshold() (res ActiveHealthCheckGetUnhealthyThresholdRetType) { - res, _ = o.GetUnhealthyThresholdOk() - return -} - -// GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (ret ActiveHealthCheckGetUnhealthyThresholdRetType, ok bool) { - return getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(o.UnhealthyThreshold) -} - -// HasUnhealthyThreshold returns a boolean if a field has been set. -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. -func (o *ActiveHealthCheck) SetUnhealthyThreshold(v ActiveHealthCheckGetUnhealthyThresholdRetType) { - setActiveHealthCheckGetUnhealthyThresholdAttributeType(&o.UnhealthyThreshold, v) -} - -func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(o.HealthyThreshold); ok { - toSerialize["HealthyThreshold"] = val - } - if val, ok := getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(o.HttpHealthChecks); ok { - toSerialize["HttpHealthChecks"] = val - } - if val, ok := getActiveHealthCheckGetIntervalAttributeTypeOk(o.Interval); ok { - toSerialize["Interval"] = val - } - if val, ok := getActiveHealthCheckGetIntervalJitterAttributeTypeOk(o.IntervalJitter); ok { - toSerialize["IntervalJitter"] = val - } - if val, ok := getActiveHealthCheckGetTimeoutAttributeTypeOk(o.Timeout); ok { - toSerialize["Timeout"] = val - } - if val, ok := getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(o.UnhealthyThreshold); ok { - toSerialize["UnhealthyThreshold"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_active_health_check_test.go b/services/lbapplication/model_active_health_check_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_active_health_check_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_certificate_config.go b/services/lbapplication/model_certificate_config.go deleted file mode 100644 index 41a88e50a..000000000 --- a/services/lbapplication/model_certificate_config.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the CertificateConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CertificateConfig{} - -/* - types and functions for certificateIds -*/ - -// isArray -type CertificateConfigGetCertificateIdsAttributeType = *[]string -type CertificateConfigGetCertificateIdsArgType = []string -type CertificateConfigGetCertificateIdsRetType = []string - -func getCertificateConfigGetCertificateIdsAttributeTypeOk(arg CertificateConfigGetCertificateIdsAttributeType) (ret CertificateConfigGetCertificateIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCertificateConfigGetCertificateIdsAttributeType(arg *CertificateConfigGetCertificateIdsAttributeType, val CertificateConfigGetCertificateIdsRetType) { - *arg = &val -} - -// CertificateConfig TLS termination certificate configuration. -type CertificateConfig struct { - // Certificate IDs for TLS termination - CertificateIds CertificateConfigGetCertificateIdsAttributeType `json:"certificateIds,omitempty"` -} - -// NewCertificateConfig instantiates a new CertificateConfig object -// This constructor will assign default values to properties that have it defined, -// 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 NewCertificateConfig() *CertificateConfig { - this := CertificateConfig{} - return &this -} - -// NewCertificateConfigWithDefaults instantiates a new CertificateConfig object -// This 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 NewCertificateConfigWithDefaults() *CertificateConfig { - this := CertificateConfig{} - return &this -} - -// GetCertificateIds returns the CertificateIds field value if set, zero value otherwise. -func (o *CertificateConfig) GetCertificateIds() (res CertificateConfigGetCertificateIdsRetType) { - res, _ = o.GetCertificateIdsOk() - return -} - -// GetCertificateIdsOk returns a tuple with the CertificateIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CertificateConfig) GetCertificateIdsOk() (ret CertificateConfigGetCertificateIdsRetType, ok bool) { - return getCertificateConfigGetCertificateIdsAttributeTypeOk(o.CertificateIds) -} - -// HasCertificateIds returns a boolean if a field has been set. -func (o *CertificateConfig) HasCertificateIds() bool { - _, ok := o.GetCertificateIdsOk() - return ok -} - -// SetCertificateIds gets a reference to the given []string and assigns it to the CertificateIds field. -func (o *CertificateConfig) SetCertificateIds(v CertificateConfigGetCertificateIdsRetType) { - setCertificateConfigGetCertificateIdsAttributeType(&o.CertificateIds, v) -} - -func (o CertificateConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCertificateConfigGetCertificateIdsAttributeTypeOk(o.CertificateIds); ok { - toSerialize["CertificateIds"] = val - } - return toSerialize, nil -} - -type NullableCertificateConfig struct { - value *CertificateConfig - isSet bool -} - -func (v NullableCertificateConfig) Get() *CertificateConfig { - return v.value -} - -func (v *NullableCertificateConfig) Set(val *CertificateConfig) { - v.value = val - v.isSet = true -} - -func (v NullableCertificateConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableCertificateConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCertificateConfig(val *CertificateConfig) *NullableCertificateConfig { - return &NullableCertificateConfig{value: val, isSet: true} -} - -func (v NullableCertificateConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCertificateConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/lbapplication/model_certificate_config_test.go b/services/lbapplication/model_certificate_config_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_certificate_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_cookie_persistence.go b/services/lbapplication/model_cookie_persistence.go deleted file mode 100644 index dd09bfaf5..000000000 --- a/services/lbapplication/model_cookie_persistence.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the CookiePersistence type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CookiePersistence{} - -/* - types and functions for name -*/ - -// isNotNullableString -type CookiePersistenceGetNameAttributeType = *string - -func getCookiePersistenceGetNameAttributeTypeOk(arg CookiePersistenceGetNameAttributeType) (ret CookiePersistenceGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCookiePersistenceGetNameAttributeType(arg *CookiePersistenceGetNameAttributeType, val CookiePersistenceGetNameRetType) { - *arg = &val -} - -type CookiePersistenceGetNameArgType = string -type CookiePersistenceGetNameRetType = string - -/* - types and functions for ttl -*/ - -// isNotNullableString -type CookiePersistenceGetTtlAttributeType = *string - -func getCookiePersistenceGetTtlAttributeTypeOk(arg CookiePersistenceGetTtlAttributeType) (ret CookiePersistenceGetTtlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCookiePersistenceGetTtlAttributeType(arg *CookiePersistenceGetTtlAttributeType, val CookiePersistenceGetTtlRetType) { - *arg = &val -} - -type CookiePersistenceGetTtlArgType = string -type CookiePersistenceGetTtlRetType = string - -// CookiePersistence struct for CookiePersistence -type CookiePersistence struct { - // Cookie is the name of the cookie to use. - Name CookiePersistenceGetNameAttributeType `json:"name,omitempty"` - // TTL specifies the time-to-live for the cookie. The default value is 0s, and it acts as a session cookie, expiring when the client session ends. - Ttl CookiePersistenceGetTtlAttributeType `json:"ttl,omitempty"` -} - -// NewCookiePersistence instantiates a new CookiePersistence object -// This constructor will assign default values to properties that have it defined, -// 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 NewCookiePersistence() *CookiePersistence { - this := CookiePersistence{} - return &this -} - -// NewCookiePersistenceWithDefaults instantiates a new CookiePersistence object -// This 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 NewCookiePersistenceWithDefaults() *CookiePersistence { - this := CookiePersistence{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *CookiePersistence) GetName() (res CookiePersistenceGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CookiePersistence) GetNameOk() (ret CookiePersistenceGetNameRetType, ok bool) { - return getCookiePersistenceGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -func (o *CookiePersistence) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *CookiePersistence) SetName(v CookiePersistenceGetNameRetType) { - setCookiePersistenceGetNameAttributeType(&o.Name, v) -} - -// GetTtl returns the Ttl field value if set, zero value otherwise. -func (o *CookiePersistence) GetTtl() (res CookiePersistenceGetTtlRetType) { - res, _ = o.GetTtlOk() - return -} - -// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CookiePersistence) GetTtlOk() (ret CookiePersistenceGetTtlRetType, ok bool) { - return getCookiePersistenceGetTtlAttributeTypeOk(o.Ttl) -} - -// HasTtl returns a boolean if a field has been set. -func (o *CookiePersistence) HasTtl() bool { - _, ok := o.GetTtlOk() - return ok -} - -// SetTtl gets a reference to the given string and assigns it to the Ttl field. -func (o *CookiePersistence) SetTtl(v CookiePersistenceGetTtlRetType) { - setCookiePersistenceGetTtlAttributeType(&o.Ttl, v) -} - -func (o CookiePersistence) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCookiePersistenceGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCookiePersistenceGetTtlAttributeTypeOk(o.Ttl); ok { - toSerialize["Ttl"] = val - } - return toSerialize, nil -} - -type NullableCookiePersistence struct { - value *CookiePersistence - isSet bool -} - -func (v NullableCookiePersistence) Get() *CookiePersistence { - return v.value -} - -func (v *NullableCookiePersistence) Set(val *CookiePersistence) { - v.value = val - v.isSet = true -} - -func (v NullableCookiePersistence) IsSet() bool { - return v.isSet -} - -func (v *NullableCookiePersistence) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCookiePersistence(val *CookiePersistence) *NullableCookiePersistence { - return &NullableCookiePersistence{value: val, isSet: true} -} - -func (v NullableCookiePersistence) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCookiePersistence) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/lbapplication/model_cookie_persistence_test.go b/services/lbapplication/model_cookie_persistence_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_cookie_persistence_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_create_credentials_payload.go b/services/lbapplication/model_create_credentials_payload.go deleted file mode 100644 index be02d1ba2..000000000 --- a/services/lbapplication/model_create_credentials_payload.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the CreateCredentialsPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateCredentialsPayload{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -type CreateCredentialsPayloadGetDisplayNameAttributeType = *string - -func getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg CreateCredentialsPayloadGetDisplayNameAttributeType) (ret CreateCredentialsPayloadGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateCredentialsPayloadGetDisplayNameAttributeType(arg *CreateCredentialsPayloadGetDisplayNameAttributeType, val CreateCredentialsPayloadGetDisplayNameRetType) { - *arg = &val -} - -type CreateCredentialsPayloadGetDisplayNameArgType = string -type CreateCredentialsPayloadGetDisplayNameRetType = string - -/* - types and functions for password -*/ - -// isNotNullableString -type CreateCredentialsPayloadGetPasswordAttributeType = *string - -func getCreateCredentialsPayloadGetPasswordAttributeTypeOk(arg CreateCredentialsPayloadGetPasswordAttributeType) (ret CreateCredentialsPayloadGetPasswordRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateCredentialsPayloadGetPasswordAttributeType(arg *CreateCredentialsPayloadGetPasswordAttributeType, val CreateCredentialsPayloadGetPasswordRetType) { - *arg = &val -} - -type CreateCredentialsPayloadGetPasswordArgType = string -type CreateCredentialsPayloadGetPasswordRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -type CreateCredentialsPayloadGetUsernameAttributeType = *string - -func getCreateCredentialsPayloadGetUsernameAttributeTypeOk(arg CreateCredentialsPayloadGetUsernameAttributeType) (ret CreateCredentialsPayloadGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateCredentialsPayloadGetUsernameAttributeType(arg *CreateCredentialsPayloadGetUsernameAttributeType, val CreateCredentialsPayloadGetUsernameRetType) { - *arg = &val -} - -type CreateCredentialsPayloadGetUsernameArgType = string -type CreateCredentialsPayloadGetUsernameRetType = string - -// CreateCredentialsPayload struct for CreateCredentialsPayload -type CreateCredentialsPayload struct { - // Credential name - DisplayName CreateCredentialsPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"` - // A valid password used for an existing ARGUS instance, which is used during basic auth. - Password CreateCredentialsPayloadGetPasswordAttributeType `json:"password,omitempty"` - // A valid username used for an existing ARGUS instance, which is used during basic auth. - Username CreateCredentialsPayloadGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewCreateCredentialsPayload instantiates a new CreateCredentialsPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res CreateCredentialsPayloadGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetDisplayNameOk() (ret CreateCredentialsPayloadGetDisplayNameRetType, ok bool) { - return getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -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. -func (o *CreateCredentialsPayload) SetDisplayName(v CreateCredentialsPayloadGetDisplayNameRetType) { - setCreateCredentialsPayloadGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *CreateCredentialsPayload) GetPassword() (res CreateCredentialsPayloadGetPasswordRetType) { - res, _ = o.GetPasswordOk() - return -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetPasswordOk() (ret CreateCredentialsPayloadGetPasswordRetType, ok bool) { - return getCreateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password) -} - -// HasPassword returns a boolean if a field has been set. -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. -func (o *CreateCredentialsPayload) SetPassword(v CreateCredentialsPayloadGetPasswordRetType) { - setCreateCredentialsPayloadGetPasswordAttributeType(&o.Password, v) -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *CreateCredentialsPayload) GetUsername() (res CreateCredentialsPayloadGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetUsernameOk() (ret CreateCredentialsPayloadGetUsernameRetType, ok bool) { - return getCreateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername returns a boolean if a field has been set. -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. -func (o *CreateCredentialsPayload) SetUsername(v CreateCredentialsPayloadGetUsernameRetType) { - setCreateCredentialsPayloadGetUsernameAttributeType(&o.Username, v) -} - -func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getCreateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password); ok { - toSerialize["Password"] = val - } - if val, ok := getCreateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_create_credentials_payload_test.go b/services/lbapplication/model_create_credentials_payload_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_create_credentials_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_create_credentials_response.go b/services/lbapplication/model_create_credentials_response.go deleted file mode 100644 index 71c3feb3f..000000000 --- a/services/lbapplication/model_create_credentials_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateCredentialsResponse{} - -/* - types and functions for credential -*/ - -// isModel -type CreateCredentialsResponseGetCredentialAttributeType = *CredentialsResponse -type CreateCredentialsResponseGetCredentialArgType = CredentialsResponse -type CreateCredentialsResponseGetCredentialRetType = CredentialsResponse - -func getCreateCredentialsResponseGetCredentialAttributeTypeOk(arg CreateCredentialsResponseGetCredentialAttributeType) (ret CreateCredentialsResponseGetCredentialRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateCredentialsResponseGetCredentialAttributeType(arg *CreateCredentialsResponseGetCredentialAttributeType, val CreateCredentialsResponseGetCredentialRetType) { - *arg = &val -} - -// CreateCredentialsResponse struct for CreateCredentialsResponse -type CreateCredentialsResponse struct { - Credential CreateCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` -} - -// NewCreateCredentialsResponse instantiates a new CreateCredentialsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res CreateCredentialsResponseGetCredentialRetType) { - res, _ = o.GetCredentialOk() - return -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCredentialsResponse) GetCredentialOk() (ret CreateCredentialsResponseGetCredentialRetType, ok bool) { - return getCreateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) -} - -// HasCredential returns a boolean if a field has been set. -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. -func (o *CreateCredentialsResponse) SetCredential(v CreateCredentialsResponseGetCredentialRetType) { - setCreateCredentialsResponseGetCredentialAttributeType(&o.Credential, v) -} - -func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { - toSerialize["Credential"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_create_credentials_response_test.go b/services/lbapplication/model_create_credentials_response_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_create_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_create_load_balancer_payload.go b/services/lbapplication/model_create_load_balancer_payload.go deleted file mode 100644 index 8babf289d..000000000 --- a/services/lbapplication/model_create_load_balancer_payload.go +++ /dev/null @@ -1,722 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateLoadBalancerPayload{} - -/* - types and functions for errors -*/ - -// isArray -type CreateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError -type CreateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError -type CreateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError - -func getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg CreateLoadBalancerPayloadGetErrorsAttributeType) (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetErrorsAttributeType(arg *CreateLoadBalancerPayloadGetErrorsAttributeType, val CreateLoadBalancerPayloadGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for externalAddress -*/ - -// isNotNullableString -type CreateLoadBalancerPayloadGetExternalAddressAttributeType = *string - -func getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetExternalAddressAttributeType) (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetExternalAddressAttributeType(arg *CreateLoadBalancerPayloadGetExternalAddressAttributeType, val CreateLoadBalancerPayloadGetExternalAddressRetType) { - *arg = &val -} - -type CreateLoadBalancerPayloadGetExternalAddressArgType = string -type CreateLoadBalancerPayloadGetExternalAddressRetType = string - -/* - types and functions for listeners -*/ - -// isArray -type CreateLoadBalancerPayloadGetListenersAttributeType = *[]Listener -type CreateLoadBalancerPayloadGetListenersArgType = []Listener -type CreateLoadBalancerPayloadGetListenersRetType = []Listener - -func getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(arg CreateLoadBalancerPayloadGetListenersAttributeType) (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetListenersAttributeType(arg *CreateLoadBalancerPayloadGetListenersAttributeType, val CreateLoadBalancerPayloadGetListenersRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -type CreateLoadBalancerPayloadGetNameAttributeType = *string - -func getCreateLoadBalancerPayloadGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadGetNameAttributeType) (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetNameAttributeType(arg *CreateLoadBalancerPayloadGetNameAttributeType, val CreateLoadBalancerPayloadGetNameRetType) { - *arg = &val -} - -type CreateLoadBalancerPayloadGetNameArgType = string -type CreateLoadBalancerPayloadGetNameRetType = string - -/* - types and functions for networks -*/ - -// isArray -type CreateLoadBalancerPayloadGetNetworksAttributeType = *[]Network -type CreateLoadBalancerPayloadGetNetworksArgType = []Network -type CreateLoadBalancerPayloadGetNetworksRetType = []Network - -func getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg CreateLoadBalancerPayloadGetNetworksAttributeType) (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetNetworksAttributeType(arg *CreateLoadBalancerPayloadGetNetworksAttributeType, val CreateLoadBalancerPayloadGetNetworksRetType) { - *arg = &val -} - -/* - types and functions for options -*/ - -// isModel -type CreateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions -type CreateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions -type CreateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions - -func getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg CreateLoadBalancerPayloadGetOptionsAttributeType) (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetOptionsAttributeType(arg *CreateLoadBalancerPayloadGetOptionsAttributeType, val CreateLoadBalancerPayloadGetOptionsRetType) { - *arg = &val -} - -/* - types and functions for planId -*/ - -// isNotNullableString -type CreateLoadBalancerPayloadGetPlanIdAttributeType = *string - -func getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg CreateLoadBalancerPayloadGetPlanIdAttributeType) (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetPlanIdAttributeType(arg *CreateLoadBalancerPayloadGetPlanIdAttributeType, val CreateLoadBalancerPayloadGetPlanIdRetType) { - *arg = &val -} - -type CreateLoadBalancerPayloadGetPlanIdArgType = string -type CreateLoadBalancerPayloadGetPlanIdRetType = string - -/* - types and functions for privateAddress -*/ - -// isNotNullableString -type CreateLoadBalancerPayloadGetPrivateAddressAttributeType = *string - -func getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *CreateLoadBalancerPayloadGetPrivateAddressAttributeType, val CreateLoadBalancerPayloadGetPrivateAddressRetType) { - *arg = &val -} - -type CreateLoadBalancerPayloadGetPrivateAddressArgType = string -type CreateLoadBalancerPayloadGetPrivateAddressRetType = string - -/* - types and functions for status -*/ - -// isEnum - -// CreateLoadBalancerPayloadStatus the model 'CreateLoadBalancerPayload' -// value type for enums -type CreateLoadBalancerPayloadStatus string - -// List of Status -const ( - CREATELOADBALANCERPAYLOADSTATUS_UNSPECIFIED CreateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED" - CREATELOADBALANCERPAYLOADSTATUS_PENDING CreateLoadBalancerPayloadStatus = "STATUS_PENDING" - CREATELOADBALANCERPAYLOADSTATUS_READY CreateLoadBalancerPayloadStatus = "STATUS_READY" - CREATELOADBALANCERPAYLOADSTATUS_ERROR CreateLoadBalancerPayloadStatus = "STATUS_ERROR" - CREATELOADBALANCERPAYLOADSTATUS_TERMINATING CreateLoadBalancerPayloadStatus = "STATUS_TERMINATING" -) - -// All allowed values of CreateLoadBalancerPayload enum -var AllowedCreateLoadBalancerPayloadStatusEnumValues = []CreateLoadBalancerPayloadStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", -} - -func (v *CreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson CreateLoadBalancerPayloadStatus - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := CreateLoadBalancerPayloadStatus(value) - for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid CreateLoadBalancerPayload", value) -} - -// NewCreateLoadBalancerPayloadStatusFromValue returns a pointer to a valid CreateLoadBalancerPayloadStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewCreateLoadBalancerPayloadStatusFromValue(v CreateLoadBalancerPayloadStatus) (*CreateLoadBalancerPayloadStatus, error) { - ev := CreateLoadBalancerPayloadStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for CreateLoadBalancerPayloadStatus: valid values are %v", v, AllowedCreateLoadBalancerPayloadStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v CreateLoadBalancerPayloadStatus) IsValid() bool { - for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusStatus value -func (v CreateLoadBalancerPayloadStatus) Ptr() *CreateLoadBalancerPayloadStatus { - return &v -} - -type NullableCreateLoadBalancerPayloadStatus struct { - value *CreateLoadBalancerPayloadStatus - isSet bool -} - -func (v NullableCreateLoadBalancerPayloadStatus) Get() *CreateLoadBalancerPayloadStatus { - return v.value -} - -func (v *NullableCreateLoadBalancerPayloadStatus) Set(val *CreateLoadBalancerPayloadStatus) { - v.value = val - v.isSet = true -} - -func (v NullableCreateLoadBalancerPayloadStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateLoadBalancerPayloadStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateLoadBalancerPayloadStatus(val *CreateLoadBalancerPayloadStatus) *NullableCreateLoadBalancerPayloadStatus { - return &NullableCreateLoadBalancerPayloadStatus{value: val, isSet: true} -} - -func (v NullableCreateLoadBalancerPayloadStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type CreateLoadBalancerPayloadGetStatusAttributeType = *CreateLoadBalancerPayloadStatus -type CreateLoadBalancerPayloadGetStatusArgType = CreateLoadBalancerPayloadStatus -type CreateLoadBalancerPayloadGetStatusRetType = CreateLoadBalancerPayloadStatus - -func getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(arg CreateLoadBalancerPayloadGetStatusAttributeType) (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetStatusAttributeType(arg *CreateLoadBalancerPayloadGetStatusAttributeType, val CreateLoadBalancerPayloadGetStatusRetType) { - *arg = &val -} - -/* - types and functions for targetPools -*/ - -// isArray -type CreateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool -type CreateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool -type CreateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool - -func getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg CreateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *CreateLoadBalancerPayloadGetTargetPoolsAttributeType, val CreateLoadBalancerPayloadGetTargetPoolsRetType) { - *arg = &val -} - -/* - types and functions for version -*/ - -// isNotNullableString -type CreateLoadBalancerPayloadGetVersionAttributeType = *string - -func getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(arg CreateLoadBalancerPayloadGetVersionAttributeType) (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateLoadBalancerPayloadGetVersionAttributeType(arg *CreateLoadBalancerPayloadGetVersionAttributeType, val CreateLoadBalancerPayloadGetVersionRetType) { - *arg = &val -} - -type CreateLoadBalancerPayloadGetVersionArgType = string -type CreateLoadBalancerPayloadGetVersionRetType = string - -// CreateLoadBalancerPayload struct for CreateLoadBalancerPayload -type CreateLoadBalancerPayload struct { - // Reports all errors a application load balancer has. - Errors CreateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` - // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress CreateLoadBalancerPayloadGetExternalAddressAttributeType `json:"externalAddress,omitempty"` - // There is a maximum listener count of 20. - Listeners CreateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` - // Application Load Balancer name. Not changeable after creation. - Name CreateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks CreateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"` - Options CreateLoadBalancerPayloadGetOptionsAttributeType `json:"options,omitempty"` - // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId CreateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"` - // Transient private application load balancer IP address that can change any time. - PrivateAddress CreateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` - Status CreateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"` - // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools CreateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"` - // Application 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 application load balancer resource that changes during updates of the load balancers. On updates this field specified the application 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 application 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 application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version CreateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"` -} - -// NewCreateLoadBalancerPayload instantiates a new CreateLoadBalancerPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res CreateLoadBalancerPayloadGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetErrorsOk() (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) { - return getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetErrors(v CreateLoadBalancerPayloadGetErrorsRetType) { - setCreateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v) -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetExternalAddress() (res CreateLoadBalancerPayloadGetExternalAddressRetType) { - res, _ = o.GetExternalAddressOk() - return -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetExternalAddressOk() (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { - return getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress) -} - -// HasExternalAddress returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetExternalAddress(v CreateLoadBalancerPayloadGetExternalAddressRetType) { - setCreateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, v) -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetListeners() (res CreateLoadBalancerPayloadGetListenersRetType) { - res, _ = o.GetListenersOk() - return -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetListenersOk() (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) { - return getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners) -} - -// HasListeners returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetListeners(v CreateLoadBalancerPayloadGetListenersRetType) { - setCreateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetName() (res CreateLoadBalancerPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetNameOk() (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) { - return getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetName(v CreateLoadBalancerPayloadGetNameRetType) { - setCreateLoadBalancerPayloadGetNameAttributeType(&o.Name, v) -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetNetworks() (res CreateLoadBalancerPayloadGetNetworksRetType) { - res, _ = o.GetNetworksOk() - return -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetNetworksOk() (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) { - return getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks) -} - -// HasNetworks returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetNetworks(v CreateLoadBalancerPayloadGetNetworksRetType) { - setCreateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v) -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetOptions() (res CreateLoadBalancerPayloadGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetOptionsOk() (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) { - return getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetOptions(v CreateLoadBalancerPayloadGetOptionsRetType) { - setCreateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v) -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetPlanId() (res CreateLoadBalancerPayloadGetPlanIdRetType) { - res, _ = o.GetPlanIdOk() - return -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetPlanIdOk() (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) { - return getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId) -} - -// HasPlanId returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetPlanId(v CreateLoadBalancerPayloadGetPlanIdRetType) { - setCreateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetPrivateAddress() (res CreateLoadBalancerPayloadGetPrivateAddressRetType) { - res, _ = o.GetPrivateAddressOk() - return -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetPrivateAddressOk() (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { - return getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress) -} - -// HasPrivateAddress returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetPrivateAddress(v CreateLoadBalancerPayloadGetPrivateAddressRetType) { - setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v) -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetStatus() (res CreateLoadBalancerPayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetStatusOk() (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) { - return getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetStatus(v CreateLoadBalancerPayloadGetStatusRetType) { - setCreateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v) -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetTargetPools() (res CreateLoadBalancerPayloadGetTargetPoolsRetType) { - res, _ = o.GetTargetPoolsOk() - return -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetTargetPoolsOk() (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { - return getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools) -} - -// HasTargetPools returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetTargetPools(v CreateLoadBalancerPayloadGetTargetPoolsRetType) { - setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v) -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetVersion() (res CreateLoadBalancerPayloadGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetVersionOk() (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) { - return getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -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. -func (o *CreateLoadBalancerPayload) SetVersion(v CreateLoadBalancerPayloadGetVersionRetType) { - setCreateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v) -} - -func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { - toSerialize["ExternalAddress"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok { - toSerialize["Listeners"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok { - toSerialize["Networks"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { - toSerialize["PrivateAddress"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { - toSerialize["TargetPools"] = val - } - if val, ok := getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - 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/lbapplication/model_create_load_balancer_payload_test.go b/services/lbapplication/model_create_load_balancer_payload_test.go deleted file mode 100644 index 380fefa0b..000000000 --- a/services/lbapplication/model_create_load_balancer_payload_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "testing" -) - -// isEnum - -func TestCreateLoadBalancerPayloadStatus_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"STATUS_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"STATUS_PENDING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"STATUS_READY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"STATUS_ERROR"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"STATUS_TERMINATING"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := CreateLoadBalancerPayloadStatus("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/lbapplication/model_credentials_response.go b/services/lbapplication/model_credentials_response.go deleted file mode 100644 index a1192fc82..000000000 --- a/services/lbapplication/model_credentials_response.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CredentialsResponse{} - -/* - types and functions for credentialsRef -*/ - -// isNotNullableString -type CredentialsResponseGetCredentialsRefAttributeType = *string - -func getCredentialsResponseGetCredentialsRefAttributeTypeOk(arg CredentialsResponseGetCredentialsRefAttributeType) (ret CredentialsResponseGetCredentialsRefRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCredentialsResponseGetCredentialsRefAttributeType(arg *CredentialsResponseGetCredentialsRefAttributeType, val CredentialsResponseGetCredentialsRefRetType) { - *arg = &val -} - -type CredentialsResponseGetCredentialsRefArgType = string -type CredentialsResponseGetCredentialsRefRetType = string - -/* - types and functions for displayName -*/ - -// isNotNullableString -type CredentialsResponseGetDisplayNameAttributeType = *string - -func getCredentialsResponseGetDisplayNameAttributeTypeOk(arg CredentialsResponseGetDisplayNameAttributeType) (ret CredentialsResponseGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCredentialsResponseGetDisplayNameAttributeType(arg *CredentialsResponseGetDisplayNameAttributeType, val CredentialsResponseGetDisplayNameRetType) { - *arg = &val -} - -type CredentialsResponseGetDisplayNameArgType = string -type CredentialsResponseGetDisplayNameRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -type CredentialsResponseGetUsernameAttributeType = *string - -func getCredentialsResponseGetUsernameAttributeTypeOk(arg CredentialsResponseGetUsernameAttributeType) (ret CredentialsResponseGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCredentialsResponseGetUsernameAttributeType(arg *CredentialsResponseGetUsernameAttributeType, val CredentialsResponseGetUsernameRetType) { - *arg = &val -} - -type CredentialsResponseGetUsernameArgType = string -type CredentialsResponseGetUsernameRetType = string - -// CredentialsResponse struct for CredentialsResponse -type CredentialsResponse struct { - // The credentials reference can be used for observability of the Application Load Balancer. - CredentialsRef CredentialsResponseGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` - // Credential name - DisplayName CredentialsResponseGetDisplayNameAttributeType `json:"displayName,omitempty"` - // The username used for the ARGUS instance - Username CredentialsResponseGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewCredentialsResponse instantiates a new CredentialsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res CredentialsResponseGetCredentialsRefRetType) { - res, _ = o.GetCredentialsRefOk() - return -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetCredentialsRefOk() (ret CredentialsResponseGetCredentialsRefRetType, ok bool) { - return getCredentialsResponseGetCredentialsRefAttributeTypeOk(o.CredentialsRef) -} - -// HasCredentialsRef returns a boolean if a field has been set. -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. -func (o *CredentialsResponse) SetCredentialsRef(v CredentialsResponseGetCredentialsRefRetType) { - setCredentialsResponseGetCredentialsRefAttributeType(&o.CredentialsRef, v) -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *CredentialsResponse) GetDisplayName() (res CredentialsResponseGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetDisplayNameOk() (ret CredentialsResponseGetDisplayNameRetType, ok bool) { - return getCredentialsResponseGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -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. -func (o *CredentialsResponse) SetDisplayName(v CredentialsResponseGetDisplayNameRetType) { - setCredentialsResponseGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *CredentialsResponse) GetUsername() (res CredentialsResponseGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetUsernameOk() (ret CredentialsResponseGetUsernameRetType, ok bool) { - return getCredentialsResponseGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername returns a boolean if a field has been set. -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. -func (o *CredentialsResponse) SetUsername(v CredentialsResponseGetUsernameRetType) { - setCredentialsResponseGetUsernameAttributeType(&o.Username, v) -} - -func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCredentialsResponseGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { - toSerialize["CredentialsRef"] = val - } - if val, ok := getCredentialsResponseGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getCredentialsResponseGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - 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/lbapplication/model_credentials_response_test.go b/services/lbapplication/model_credentials_response_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_get_credentials_response.go b/services/lbapplication/model_get_credentials_response.go deleted file mode 100644 index e3681df18..000000000 --- a/services/lbapplication/model_get_credentials_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCredentialsResponse{} - -/* - types and functions for credential -*/ - -// isModel -type GetCredentialsResponseGetCredentialAttributeType = *CredentialsResponse -type GetCredentialsResponseGetCredentialArgType = CredentialsResponse -type GetCredentialsResponseGetCredentialRetType = CredentialsResponse - -func getGetCredentialsResponseGetCredentialAttributeTypeOk(arg GetCredentialsResponseGetCredentialAttributeType) (ret GetCredentialsResponseGetCredentialRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setGetCredentialsResponseGetCredentialAttributeType(arg *GetCredentialsResponseGetCredentialAttributeType, val GetCredentialsResponseGetCredentialRetType) { - *arg = &val -} - -// GetCredentialsResponse struct for GetCredentialsResponse -type GetCredentialsResponse struct { - Credential GetCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` -} - -// NewGetCredentialsResponse instantiates a new GetCredentialsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res GetCredentialsResponseGetCredentialRetType) { - res, _ = o.GetCredentialOk() - return -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetCredentialsResponse) GetCredentialOk() (ret GetCredentialsResponseGetCredentialRetType, ok bool) { - return getGetCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) -} - -// HasCredential returns a boolean if a field has been set. -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. -func (o *GetCredentialsResponse) SetCredential(v GetCredentialsResponseGetCredentialRetType) { - setGetCredentialsResponseGetCredentialAttributeType(&o.Credential, v) -} - -func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { - toSerialize["Credential"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_get_credentials_response_test.go b/services/lbapplication/model_get_credentials_response_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_get_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_get_quota_response.go b/services/lbapplication/model_get_quota_response.go deleted file mode 100644 index 190a182c0..000000000 --- a/services/lbapplication/model_get_quota_response.go +++ /dev/null @@ -1,177 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the GetQuotaResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetQuotaResponse{} - -/* - types and functions for maxLoadBalancers -*/ - -// isInteger -type GetQuotaResponseGetMaxLoadBalancersAttributeType = *int64 -type GetQuotaResponseGetMaxLoadBalancersArgType = int64 -type GetQuotaResponseGetMaxLoadBalancersRetType = int64 - -func getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(arg GetQuotaResponseGetMaxLoadBalancersAttributeType) (ret GetQuotaResponseGetMaxLoadBalancersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setGetQuotaResponseGetMaxLoadBalancersAttributeType(arg *GetQuotaResponseGetMaxLoadBalancersAttributeType, val GetQuotaResponseGetMaxLoadBalancersRetType) { - *arg = &val -} - -/* - types and functions for projectId -*/ - -// isNotNullableString -type GetQuotaResponseGetProjectIdAttributeType = *string - -func getGetQuotaResponseGetProjectIdAttributeTypeOk(arg GetQuotaResponseGetProjectIdAttributeType) (ret GetQuotaResponseGetProjectIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setGetQuotaResponseGetProjectIdAttributeType(arg *GetQuotaResponseGetProjectIdAttributeType, val GetQuotaResponseGetProjectIdRetType) { - *arg = &val -} - -type GetQuotaResponseGetProjectIdArgType = string -type GetQuotaResponseGetProjectIdRetType = string - -// GetQuotaResponse struct for GetQuotaResponse -type GetQuotaResponse struct { - // The maximum number of load balancing servers in this project. Unlimited if set to -1. - MaxLoadBalancers GetQuotaResponseGetMaxLoadBalancersAttributeType `json:"maxLoadBalancers,omitempty"` - // Project identifier - ProjectId GetQuotaResponseGetProjectIdAttributeType `json:"projectId,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 -} - -// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise. -func (o *GetQuotaResponse) GetMaxLoadBalancers() (res GetQuotaResponseGetMaxLoadBalancersRetType) { - res, _ = o.GetMaxLoadBalancersOk() - return -} - -// GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (ret GetQuotaResponseGetMaxLoadBalancersRetType, ok bool) { - return getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(o.MaxLoadBalancers) -} - -// HasMaxLoadBalancers returns a boolean if a field has been set. -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. -func (o *GetQuotaResponse) SetMaxLoadBalancers(v GetQuotaResponseGetMaxLoadBalancersRetType) { - setGetQuotaResponseGetMaxLoadBalancersAttributeType(&o.MaxLoadBalancers, v) -} - -// GetProjectId returns the ProjectId field value if set, zero value otherwise. -func (o *GetQuotaResponse) GetProjectId() (res GetQuotaResponseGetProjectIdRetType) { - res, _ = o.GetProjectIdOk() - return -} - -// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetQuotaResponse) GetProjectIdOk() (ret GetQuotaResponseGetProjectIdRetType, ok bool) { - return getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId) -} - -// HasProjectId returns a boolean if a field has been set. -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. -func (o *GetQuotaResponse) SetProjectId(v GetQuotaResponseGetProjectIdRetType) { - setGetQuotaResponseGetProjectIdAttributeType(&o.ProjectId, v) -} - -func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(o.MaxLoadBalancers); ok { - toSerialize["MaxLoadBalancers"] = val - } - if val, ok := getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { - toSerialize["ProjectId"] = val - } - 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/lbapplication/model_get_quota_response_test.go b/services/lbapplication/model_get_quota_response_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_get_quota_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_get_service_status_response.go b/services/lbapplication/model_get_service_status_response.go deleted file mode 100644 index 7c388e89f..000000000 --- a/services/lbapplication/model_get_service_status_response.go +++ /dev/null @@ -1,243 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" - "fmt" -) - -// checks if the GetServiceStatusResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServiceStatusResponse{} - -/* - types and functions for status -*/ - -// isEnum - -// GetServiceStatusResponseStatus status of the project -// value type for enums -type GetServiceStatusResponseStatus string - -// List of Status -const ( - GETSERVICESTATUSRESPONSESTATUS_UNSPECIFIED GetServiceStatusResponseStatus = "STATUS_UNSPECIFIED" - GETSERVICESTATUSRESPONSESTATUS_READY GetServiceStatusResponseStatus = "STATUS_READY" - GETSERVICESTATUSRESPONSESTATUS_FAILED GetServiceStatusResponseStatus = "STATUS_FAILED" - GETSERVICESTATUSRESPONSESTATUS_UPDATING GetServiceStatusResponseStatus = "STATUS_UPDATING" - GETSERVICESTATUSRESPONSESTATUS_DELETING GetServiceStatusResponseStatus = "STATUS_DELETING" - GETSERVICESTATUSRESPONSESTATUS_DISABLED GetServiceStatusResponseStatus = "STATUS_DISABLED" - GETSERVICESTATUSRESPONSESTATUS_PROJECT_UNKNOWN GetServiceStatusResponseStatus = "STATUS_PROJECT_UNKNOWN" -) - -// All allowed values of GetServiceStatusResponse enum -var AllowedGetServiceStatusResponseStatusEnumValues = []GetServiceStatusResponseStatus{ - "STATUS_UNSPECIFIED", - "STATUS_READY", - "STATUS_FAILED", - "STATUS_UPDATING", - "STATUS_DELETING", - "STATUS_DISABLED", - "STATUS_PROJECT_UNKNOWN", -} - -func (v *GetServiceStatusResponseStatus) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson GetServiceStatusResponseStatus - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := GetServiceStatusResponseStatus(value) - for _, existing := range AllowedGetServiceStatusResponseStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid GetServiceStatusResponse", value) -} - -// NewGetServiceStatusResponseStatusFromValue returns a pointer to a valid GetServiceStatusResponseStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewGetServiceStatusResponseStatusFromValue(v GetServiceStatusResponseStatus) (*GetServiceStatusResponseStatus, error) { - ev := GetServiceStatusResponseStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for GetServiceStatusResponseStatus: valid values are %v", v, AllowedGetServiceStatusResponseStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v GetServiceStatusResponseStatus) IsValid() bool { - for _, existing := range AllowedGetServiceStatusResponseStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusStatus value -func (v GetServiceStatusResponseStatus) Ptr() *GetServiceStatusResponseStatus { - return &v -} - -type NullableGetServiceStatusResponseStatus struct { - value *GetServiceStatusResponseStatus - isSet bool -} - -func (v NullableGetServiceStatusResponseStatus) Get() *GetServiceStatusResponseStatus { - return v.value -} - -func (v *NullableGetServiceStatusResponseStatus) Set(val *GetServiceStatusResponseStatus) { - v.value = val - v.isSet = true -} - -func (v NullableGetServiceStatusResponseStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServiceStatusResponseStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServiceStatusResponseStatus(val *GetServiceStatusResponseStatus) *NullableGetServiceStatusResponseStatus { - return &NullableGetServiceStatusResponseStatus{value: val, isSet: true} -} - -func (v NullableGetServiceStatusResponseStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServiceStatusResponseStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type GetServiceStatusResponseGetStatusAttributeType = *GetServiceStatusResponseStatus -type GetServiceStatusResponseGetStatusArgType = GetServiceStatusResponseStatus -type GetServiceStatusResponseGetStatusRetType = GetServiceStatusResponseStatus - -func getGetServiceStatusResponseGetStatusAttributeTypeOk(arg GetServiceStatusResponseGetStatusAttributeType) (ret GetServiceStatusResponseGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setGetServiceStatusResponseGetStatusAttributeType(arg *GetServiceStatusResponseGetStatusAttributeType, val GetServiceStatusResponseGetStatusRetType) { - *arg = &val -} - -// GetServiceStatusResponse Response with customer project status. -type GetServiceStatusResponse struct { - // status of the project - Status GetServiceStatusResponseGetStatusAttributeType `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() (res GetServiceStatusResponseGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetServiceStatusResponse) GetStatusOk() (ret GetServiceStatusResponseGetStatusRetType, ok bool) { - return getGetServiceStatusResponseGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetServiceStatusResponse) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *GetServiceStatusResponse) SetStatus(v GetServiceStatusResponseGetStatusRetType) { - setGetServiceStatusResponseGetStatusAttributeType(&o.Status, v) -} - -func (o GetServiceStatusResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetServiceStatusResponseGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - 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/lbapplication/model_get_service_status_response_test.go b/services/lbapplication/model_get_service_status_response_test.go deleted file mode 100644 index 3fe4c29ea..000000000 --- a/services/lbapplication/model_get_service_status_response_test.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "testing" -) - -// isEnum - -func TestGetServiceStatusResponseStatus_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"STATUS_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"STATUS_READY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"STATUS_FAILED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"STATUS_UPDATING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"STATUS_DELETING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 6`, - args: args{ - src: []byte(`"STATUS_DISABLED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 7`, - args: args{ - src: []byte(`"STATUS_PROJECT_UNKNOWN"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := GetServiceStatusResponseStatus("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/lbapplication/model_google_protobuf_any.go b/services/lbapplication/model_google_protobuf_any.go deleted file mode 100644 index cfa5b72a8..000000000 --- a/services/lbapplication/model_google_protobuf_any.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GoogleProtobufAny{} - -/* - types and functions for @type -*/ - -// isNotNullableString -type GoogleProtobufAnyGetTypeAttributeType = *string - -func getGoogleProtobufAnyGetTypeAttributeTypeOk(arg GoogleProtobufAnyGetTypeAttributeType) (ret GoogleProtobufAnyGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setGoogleProtobufAnyGetTypeAttributeType(arg *GoogleProtobufAnyGetTypeAttributeType, val GoogleProtobufAnyGetTypeRetType) { - *arg = &val -} - -type GoogleProtobufAnyGetTypeArgType = string -type GoogleProtobufAnyGetTypeRetType = string - -// 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 GoogleProtobufAnyGetTypeAttributeType `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() (res GoogleProtobufAnyGetTypeRetType) { - res, _ = o.GetTypeOk() - return -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GoogleProtobufAny) GetTypeOk() (ret GoogleProtobufAnyGetTypeRetType, ok bool) { - return getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type) -} - -// HasType returns a boolean if a field has been set. -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. -func (o *GoogleProtobufAny) SetType(v GoogleProtobufAnyGetTypeRetType) { - setGoogleProtobufAnyGetTypeAttributeType(&o.Type, v) -} - -func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -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/lbapplication/model_google_protobuf_any_test.go b/services/lbapplication/model_google_protobuf_any_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_google_protobuf_any_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_header.go b/services/lbapplication/model_header.go deleted file mode 100644 index 784dbfdcf..000000000 --- a/services/lbapplication/model_header.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the Header type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Header{} - -/* - types and functions for exactMatch -*/ - -// isNotNullableString -type HeaderGetExactMatchAttributeType = *string - -func getHeaderGetExactMatchAttributeTypeOk(arg HeaderGetExactMatchAttributeType) (ret HeaderGetExactMatchRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHeaderGetExactMatchAttributeType(arg *HeaderGetExactMatchAttributeType, val HeaderGetExactMatchRetType) { - *arg = &val -} - -type HeaderGetExactMatchArgType = string -type HeaderGetExactMatchRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -type HeaderGetNameAttributeType = *string - -func getHeaderGetNameAttributeTypeOk(arg HeaderGetNameAttributeType) (ret HeaderGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHeaderGetNameAttributeType(arg *HeaderGetNameAttributeType, val HeaderGetNameRetType) { - *arg = &val -} - -type HeaderGetNameArgType = string -type HeaderGetNameRetType = string - -// Header struct for Header -type Header struct { - // Exact match for the header value. - ExactMatch HeaderGetExactMatchAttributeType `json:"exactMatch,omitempty"` - // Header name. - Name HeaderGetNameAttributeType `json:"name,omitempty"` -} - -// NewHeader instantiates a new Header object -// This constructor will assign default values to properties that have it defined, -// 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 NewHeader() *Header { - this := Header{} - return &this -} - -// NewHeaderWithDefaults instantiates a new Header object -// This 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 NewHeaderWithDefaults() *Header { - this := Header{} - return &this -} - -// GetExactMatch returns the ExactMatch field value if set, zero value otherwise. -func (o *Header) GetExactMatch() (res HeaderGetExactMatchRetType) { - res, _ = o.GetExactMatchOk() - return -} - -// GetExactMatchOk returns a tuple with the ExactMatch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Header) GetExactMatchOk() (ret HeaderGetExactMatchRetType, ok bool) { - return getHeaderGetExactMatchAttributeTypeOk(o.ExactMatch) -} - -// HasExactMatch returns a boolean if a field has been set. -func (o *Header) HasExactMatch() bool { - _, ok := o.GetExactMatchOk() - return ok -} - -// SetExactMatch gets a reference to the given string and assigns it to the ExactMatch field. -func (o *Header) SetExactMatch(v HeaderGetExactMatchRetType) { - setHeaderGetExactMatchAttributeType(&o.ExactMatch, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Header) GetName() (res HeaderGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Header) GetNameOk() (ret HeaderGetNameRetType, ok bool) { - return getHeaderGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -func (o *Header) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Header) SetName(v HeaderGetNameRetType) { - setHeaderGetNameAttributeType(&o.Name, v) -} - -func (o Header) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHeaderGetExactMatchAttributeTypeOk(o.ExactMatch); ok { - toSerialize["ExactMatch"] = val - } - if val, ok := getHeaderGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -type NullableHeader struct { - value *Header - isSet bool -} - -func (v NullableHeader) Get() *Header { - return v.value -} - -func (v *NullableHeader) Set(val *Header) { - v.value = val - v.isSet = true -} - -func (v NullableHeader) IsSet() bool { - return v.isSet -} - -func (v *NullableHeader) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHeader(val *Header) *NullableHeader { - return &NullableHeader{value: val, isSet: true} -} - -func (v NullableHeader) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHeader) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/lbapplication/model_header_test.go b/services/lbapplication/model_header_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_header_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_http_config.go b/services/lbapplication/model_http_config.go deleted file mode 100644 index ff70504ca..000000000 --- a/services/lbapplication/model_http_config.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the HTTPConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HTTPConfig{} - -/* - types and functions for matcher -*/ - -// isArray -type HTTPConfigGetMatcherAttributeType = *[]Matcher -type HTTPConfigGetMatcherArgType = []Matcher -type HTTPConfigGetMatcherRetType = []Matcher - -func getHTTPConfigGetMatcherAttributeTypeOk(arg HTTPConfigGetMatcherAttributeType) (ret HTTPConfigGetMatcherRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHTTPConfigGetMatcherAttributeType(arg *HTTPConfigGetMatcherAttributeType, val HTTPConfigGetMatcherRetType) { - *arg = &val -} - -// HTTPConfig struct for HTTPConfig -type HTTPConfig struct { - Matcher HTTPConfigGetMatcherAttributeType `json:"matcher,omitempty"` -} - -// NewHTTPConfig instantiates a new HTTPConfig object -// This constructor will assign default values to properties that have it defined, -// 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 NewHTTPConfig() *HTTPConfig { - this := HTTPConfig{} - return &this -} - -// NewHTTPConfigWithDefaults instantiates a new HTTPConfig object -// This 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 NewHTTPConfigWithDefaults() *HTTPConfig { - this := HTTPConfig{} - return &this -} - -// GetMatcher returns the Matcher field value if set, zero value otherwise. -func (o *HTTPConfig) GetMatcher() (res HTTPConfigGetMatcherRetType) { - res, _ = o.GetMatcherOk() - return -} - -// GetMatcherOk returns a tuple with the Matcher field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HTTPConfig) GetMatcherOk() (ret HTTPConfigGetMatcherRetType, ok bool) { - return getHTTPConfigGetMatcherAttributeTypeOk(o.Matcher) -} - -// HasMatcher returns a boolean if a field has been set. -func (o *HTTPConfig) HasMatcher() bool { - _, ok := o.GetMatcherOk() - return ok -} - -// SetMatcher gets a reference to the given []Matcher and assigns it to the Matcher field. -func (o *HTTPConfig) SetMatcher(v HTTPConfigGetMatcherRetType) { - setHTTPConfigGetMatcherAttributeType(&o.Matcher, v) -} - -func (o HTTPConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHTTPConfigGetMatcherAttributeTypeOk(o.Matcher); ok { - toSerialize["Matcher"] = val - } - return toSerialize, nil -} - -type NullableHTTPConfig struct { - value *HTTPConfig - isSet bool -} - -func (v NullableHTTPConfig) Get() *HTTPConfig { - return v.value -} - -func (v *NullableHTTPConfig) Set(val *HTTPConfig) { - v.value = val - v.isSet = true -} - -func (v NullableHTTPConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableHTTPConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHTTPConfig(val *HTTPConfig) *NullableHTTPConfig { - return &NullableHTTPConfig{value: val, isSet: true} -} - -func (v NullableHTTPConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHTTPConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/lbapplication/model_http_config_test.go b/services/lbapplication/model_http_config_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_http_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_http_health_checks.go b/services/lbapplication/model_http_health_checks.go deleted file mode 100644 index c4e4dd6c9..000000000 --- a/services/lbapplication/model_http_health_checks.go +++ /dev/null @@ -1,177 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the HttpHealthChecks type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HttpHealthChecks{} - -/* - types and functions for okStatuses -*/ - -// isArray -type HttpHealthChecksGetOkStatusesAttributeType = *[]string -type HttpHealthChecksGetOkStatusesArgType = []string -type HttpHealthChecksGetOkStatusesRetType = []string - -func getHttpHealthChecksGetOkStatusesAttributeTypeOk(arg HttpHealthChecksGetOkStatusesAttributeType) (ret HttpHealthChecksGetOkStatusesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHttpHealthChecksGetOkStatusesAttributeType(arg *HttpHealthChecksGetOkStatusesAttributeType, val HttpHealthChecksGetOkStatusesRetType) { - *arg = &val -} - -/* - types and functions for path -*/ - -// isNotNullableString -type HttpHealthChecksGetPathAttributeType = *string - -func getHttpHealthChecksGetPathAttributeTypeOk(arg HttpHealthChecksGetPathAttributeType) (ret HttpHealthChecksGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHttpHealthChecksGetPathAttributeType(arg *HttpHealthChecksGetPathAttributeType, val HttpHealthChecksGetPathRetType) { - *arg = &val -} - -type HttpHealthChecksGetPathArgType = string -type HttpHealthChecksGetPathRetType = string - -// HttpHealthChecks struct for HttpHealthChecks -type HttpHealthChecks struct { - // List of HTTP status codes that indicate a healthy response - OkStatuses HttpHealthChecksGetOkStatusesAttributeType `json:"okStatuses,omitempty"` - // Path to send the health check request to - Path HttpHealthChecksGetPathAttributeType `json:"path,omitempty"` -} - -// 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() (res HttpHealthChecksGetOkStatusesRetType) { - res, _ = o.GetOkStatusesOk() - return -} - -// GetOkStatusesOk returns a tuple with the OkStatuses field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HttpHealthChecks) GetOkStatusesOk() (ret HttpHealthChecksGetOkStatusesRetType, ok bool) { - return getHttpHealthChecksGetOkStatusesAttributeTypeOk(o.OkStatuses) -} - -// HasOkStatuses returns a boolean if a field has been set. -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. -func (o *HttpHealthChecks) SetOkStatuses(v HttpHealthChecksGetOkStatusesRetType) { - setHttpHealthChecksGetOkStatusesAttributeType(&o.OkStatuses, v) -} - -// GetPath returns the Path field value if set, zero value otherwise. -func (o *HttpHealthChecks) GetPath() (res HttpHealthChecksGetPathRetType) { - res, _ = o.GetPathOk() - return -} - -// GetPathOk returns a tuple with the Path field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HttpHealthChecks) GetPathOk() (ret HttpHealthChecksGetPathRetType, ok bool) { - return getHttpHealthChecksGetPathAttributeTypeOk(o.Path) -} - -// HasPath returns a boolean if a field has been set. -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. -func (o *HttpHealthChecks) SetPath(v HttpHealthChecksGetPathRetType) { - setHttpHealthChecksGetPathAttributeType(&o.Path, v) -} - -func (o HttpHealthChecks) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHttpHealthChecksGetOkStatusesAttributeTypeOk(o.OkStatuses); ok { - toSerialize["OkStatuses"] = val - } - if val, ok := getHttpHealthChecksGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - 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/lbapplication/model_http_health_checks_test.go b/services/lbapplication/model_http_health_checks_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_http_health_checks_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_list_credentials_response.go b/services/lbapplication/model_list_credentials_response.go deleted file mode 100644 index 7775f4cb1..000000000 --- a/services/lbapplication/model_list_credentials_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListCredentialsResponse{} - -/* - types and functions for credentials -*/ - -// isArray -type ListCredentialsResponseGetCredentialsAttributeType = *[]CredentialsResponse -type ListCredentialsResponseGetCredentialsArgType = []CredentialsResponse -type ListCredentialsResponseGetCredentialsRetType = []CredentialsResponse - -func getListCredentialsResponseGetCredentialsAttributeTypeOk(arg ListCredentialsResponseGetCredentialsAttributeType) (ret ListCredentialsResponseGetCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListCredentialsResponseGetCredentialsAttributeType(arg *ListCredentialsResponseGetCredentialsAttributeType, val ListCredentialsResponseGetCredentialsRetType) { - *arg = &val -} - -// ListCredentialsResponse struct for ListCredentialsResponse -type ListCredentialsResponse struct { - Credentials ListCredentialsResponseGetCredentialsAttributeType `json:"credentials,omitempty"` -} - -// NewListCredentialsResponse instantiates a new ListCredentialsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res ListCredentialsResponseGetCredentialsRetType) { - res, _ = o.GetCredentialsOk() - return -} - -// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCredentialsResponse) GetCredentialsOk() (ret ListCredentialsResponseGetCredentialsRetType, ok bool) { - return getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials) -} - -// HasCredentials returns a boolean if a field has been set. -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. -func (o *ListCredentialsResponse) SetCredentials(v ListCredentialsResponseGetCredentialsRetType) { - setListCredentialsResponseGetCredentialsAttributeType(&o.Credentials, v) -} - -func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials); ok { - toSerialize["Credentials"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_list_credentials_response_test.go b/services/lbapplication/model_list_credentials_response_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_list_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_list_load_balancers_response.go b/services/lbapplication/model_list_load_balancers_response.go deleted file mode 100644 index 55cd52402..000000000 --- a/services/lbapplication/model_list_load_balancers_response.go +++ /dev/null @@ -1,176 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the ListLoadBalancersResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListLoadBalancersResponse{} - -/* - types and functions for loadBalancers -*/ - -// isArray -type ListLoadBalancersResponseGetLoadBalancersAttributeType = *[]LoadBalancer -type ListLoadBalancersResponseGetLoadBalancersArgType = []LoadBalancer -type ListLoadBalancersResponseGetLoadBalancersRetType = []LoadBalancer - -func getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(arg ListLoadBalancersResponseGetLoadBalancersAttributeType) (ret ListLoadBalancersResponseGetLoadBalancersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListLoadBalancersResponseGetLoadBalancersAttributeType(arg *ListLoadBalancersResponseGetLoadBalancersAttributeType, val ListLoadBalancersResponseGetLoadBalancersRetType) { - *arg = &val -} - -/* - types and functions for nextPageId -*/ - -// isNotNullableString -type ListLoadBalancersResponseGetNextPageIdAttributeType = *string - -func getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(arg ListLoadBalancersResponseGetNextPageIdAttributeType) (ret ListLoadBalancersResponseGetNextPageIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListLoadBalancersResponseGetNextPageIdAttributeType(arg *ListLoadBalancersResponseGetNextPageIdAttributeType, val ListLoadBalancersResponseGetNextPageIdRetType) { - *arg = &val -} - -type ListLoadBalancersResponseGetNextPageIdArgType = string -type ListLoadBalancersResponseGetNextPageIdRetType = string - -// ListLoadBalancersResponse struct for ListLoadBalancersResponse -type ListLoadBalancersResponse struct { - LoadBalancers ListLoadBalancersResponseGetLoadBalancersAttributeType `json:"loadBalancers,omitempty"` - // Continue token from the ListLoadBalancerResponse with Limit option - NextPageId ListLoadBalancersResponseGetNextPageIdAttributeType `json:"nextPageId,omitempty"` -} - -// NewListLoadBalancersResponse instantiates a new ListLoadBalancersResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res ListLoadBalancersResponseGetLoadBalancersRetType) { - res, _ = o.GetLoadBalancersOk() - return -} - -// GetLoadBalancersOk returns a tuple with the LoadBalancers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListLoadBalancersResponse) GetLoadBalancersOk() (ret ListLoadBalancersResponseGetLoadBalancersRetType, ok bool) { - return getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(o.LoadBalancers) -} - -// HasLoadBalancers returns a boolean if a field has been set. -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. -func (o *ListLoadBalancersResponse) SetLoadBalancers(v ListLoadBalancersResponseGetLoadBalancersRetType) { - setListLoadBalancersResponseGetLoadBalancersAttributeType(&o.LoadBalancers, v) -} - -// GetNextPageId returns the NextPageId field value if set, zero value otherwise. -func (o *ListLoadBalancersResponse) GetNextPageId() (res ListLoadBalancersResponseGetNextPageIdRetType) { - res, _ = o.GetNextPageIdOk() - return -} - -// GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListLoadBalancersResponse) GetNextPageIdOk() (ret ListLoadBalancersResponseGetNextPageIdRetType, ok bool) { - return getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(o.NextPageId) -} - -// HasNextPageId returns a boolean if a field has been set. -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. -func (o *ListLoadBalancersResponse) SetNextPageId(v ListLoadBalancersResponseGetNextPageIdRetType) { - setListLoadBalancersResponseGetNextPageIdAttributeType(&o.NextPageId, v) -} - -func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(o.LoadBalancers); ok { - toSerialize["LoadBalancers"] = val - } - if val, ok := getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(o.NextPageId); ok { - toSerialize["NextPageId"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_list_load_balancers_response_test.go b/services/lbapplication/model_list_load_balancers_response_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_list_load_balancers_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_list_plans_response.go b/services/lbapplication/model_list_plans_response.go deleted file mode 100644 index 762852ba2..000000000 --- a/services/lbapplication/model_list_plans_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the ListPlansResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListPlansResponse{} - -/* - types and functions for validPlans -*/ - -// isArray -type ListPlansResponseGetValidPlansAttributeType = *[]PlanDetails -type ListPlansResponseGetValidPlansArgType = []PlanDetails -type ListPlansResponseGetValidPlansRetType = []PlanDetails - -func getListPlansResponseGetValidPlansAttributeTypeOk(arg ListPlansResponseGetValidPlansAttributeType) (ret ListPlansResponseGetValidPlansRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListPlansResponseGetValidPlansAttributeType(arg *ListPlansResponseGetValidPlansAttributeType, val ListPlansResponseGetValidPlansRetType) { - *arg = &val -} - -// ListPlansResponse struct for ListPlansResponse -type ListPlansResponse struct { - ValidPlans ListPlansResponseGetValidPlansAttributeType `json:"validPlans,omitempty"` -} - -// NewListPlansResponse instantiates a new ListPlansResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res ListPlansResponseGetValidPlansRetType) { - res, _ = o.GetValidPlansOk() - return -} - -// GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListPlansResponse) GetValidPlansOk() (ret ListPlansResponseGetValidPlansRetType, ok bool) { - return getListPlansResponseGetValidPlansAttributeTypeOk(o.ValidPlans) -} - -// HasValidPlans returns a boolean if a field has been set. -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. -func (o *ListPlansResponse) SetValidPlans(v ListPlansResponseGetValidPlansRetType) { - setListPlansResponseGetValidPlansAttributeType(&o.ValidPlans, v) -} - -func (o ListPlansResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListPlansResponseGetValidPlansAttributeTypeOk(o.ValidPlans); ok { - toSerialize["ValidPlans"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_list_plans_response_test.go b/services/lbapplication/model_list_plans_response_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_list_plans_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_listener.go b/services/lbapplication/model_listener.go deleted file mode 100644 index f9b46b8c1..000000000 --- a/services/lbapplication/model_listener.go +++ /dev/null @@ -1,523 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" - "fmt" -) - -// checks if the Listener type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Listener{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -type ListenerGetDisplayNameAttributeType = *string - -func getListenerGetDisplayNameAttributeTypeOk(arg ListenerGetDisplayNameAttributeType) (ret ListenerGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListenerGetDisplayNameAttributeType(arg *ListenerGetDisplayNameAttributeType, val ListenerGetDisplayNameRetType) { - *arg = &val -} - -type ListenerGetDisplayNameArgType = string -type ListenerGetDisplayNameRetType = string - -/* - types and functions for http -*/ - -// isFreeform -type ListenerGetHttpAttributeType = *map[string]interface{} -type ListenerGetHttpArgType = map[string]interface{} -type ListenerGetHttpRetType = map[string]interface{} - -func getListenerGetHttpAttributeTypeOk(arg ListenerGetHttpAttributeType) (ret ListenerGetHttpRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListenerGetHttpAttributeType(arg *ListenerGetHttpAttributeType, val ListenerGetHttpRetType) { - *arg = &val -} - -/* - types and functions for https -*/ - -// isModel -type ListenerGetHttpsAttributeType = *ProtocolOptionsHTTPS -type ListenerGetHttpsArgType = ProtocolOptionsHTTPS -type ListenerGetHttpsRetType = ProtocolOptionsHTTPS - -func getListenerGetHttpsAttributeTypeOk(arg ListenerGetHttpsAttributeType) (ret ListenerGetHttpsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListenerGetHttpsAttributeType(arg *ListenerGetHttpsAttributeType, val ListenerGetHttpsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -type ListenerGetNameAttributeType = *string - -func getListenerGetNameAttributeTypeOk(arg ListenerGetNameAttributeType) (ret ListenerGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListenerGetNameAttributeType(arg *ListenerGetNameAttributeType, val ListenerGetNameRetType) { - *arg = &val -} - -type ListenerGetNameArgType = string -type ListenerGetNameRetType = string - -/* - types and functions for port -*/ - -// isInteger -type ListenerGetPortAttributeType = *int64 -type ListenerGetPortArgType = int64 -type ListenerGetPortRetType = int64 - -func getListenerGetPortAttributeTypeOk(arg ListenerGetPortAttributeType) (ret ListenerGetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListenerGetPortAttributeType(arg *ListenerGetPortAttributeType, val ListenerGetPortRetType) { - *arg = &val -} - -/* - types and functions for protocol -*/ - -// isEnum - -// ListenerProtocol Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported. -// value type for enums -type ListenerProtocol string - -// List of Protocol -const ( - LISTENERPROTOCOL_UNSPECIFIED ListenerProtocol = "PROTOCOL_UNSPECIFIED" - LISTENERPROTOCOL_HTTP ListenerProtocol = "PROTOCOL_HTTP" - LISTENERPROTOCOL_HTTPS ListenerProtocol = "PROTOCOL_HTTPS" -) - -// All allowed values of Listener enum -var AllowedListenerProtocolEnumValues = []ListenerProtocol{ - "PROTOCOL_UNSPECIFIED", - "PROTOCOL_HTTP", - "PROTOCOL_HTTPS", -} - -func (v *ListenerProtocol) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson ListenerProtocol - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := ListenerProtocol(value) - for _, existing := range AllowedListenerProtocolEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Listener", value) -} - -// NewListenerProtocolFromValue returns a pointer to a valid ListenerProtocol -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewListenerProtocolFromValue(v ListenerProtocol) (*ListenerProtocol, error) { - ev := ListenerProtocol(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ListenerProtocol: valid values are %v", v, AllowedListenerProtocolEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ListenerProtocol) IsValid() bool { - for _, existing := range AllowedListenerProtocolEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ProtocolProtocol value -func (v ListenerProtocol) Ptr() *ListenerProtocol { - return &v -} - -type NullableListenerProtocol struct { - value *ListenerProtocol - isSet bool -} - -func (v NullableListenerProtocol) Get() *ListenerProtocol { - return v.value -} - -func (v *NullableListenerProtocol) Set(val *ListenerProtocol) { - v.value = val - v.isSet = true -} - -func (v NullableListenerProtocol) IsSet() bool { - return v.isSet -} - -func (v *NullableListenerProtocol) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListenerProtocol(val *ListenerProtocol) *NullableListenerProtocol { - return &NullableListenerProtocol{value: val, isSet: true} -} - -func (v NullableListenerProtocol) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListenerProtocol) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type ListenerGetProtocolAttributeType = *ListenerProtocol -type ListenerGetProtocolArgType = ListenerProtocol -type ListenerGetProtocolRetType = ListenerProtocol - -func getListenerGetProtocolAttributeTypeOk(arg ListenerGetProtocolAttributeType) (ret ListenerGetProtocolRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListenerGetProtocolAttributeType(arg *ListenerGetProtocolAttributeType, val ListenerGetProtocolRetType) { - *arg = &val -} - -/* - types and functions for rules -*/ - -// isArray -type ListenerGetRulesAttributeType = *[]Rule -type ListenerGetRulesArgType = []Rule -type ListenerGetRulesRetType = []Rule - -func getListenerGetRulesAttributeTypeOk(arg ListenerGetRulesAttributeType) (ret ListenerGetRulesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListenerGetRulesAttributeType(arg *ListenerGetRulesAttributeType, val ListenerGetRulesRetType) { - *arg = &val -} - -// Listener struct for Listener -type Listener struct { - DisplayName ListenerGetDisplayNameAttributeType `json:"displayName,omitempty"` - // ProtocolOptionsHTTP options to be configured for the PROTOCOL_HTTP protocol. - Http ListenerGetHttpAttributeType `json:"http,omitempty"` - Https ListenerGetHttpsAttributeType `json:"https,omitempty"` - // Will be used to reference a listener and will replace display name in the future. Currently uses - as the name if no display name is given. - Name ListenerGetNameAttributeType `json:"name,omitempty"` - // Port number where we listen for traffic - Port ListenerGetPortAttributeType `json:"port,omitempty"` - // Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported. - Protocol ListenerGetProtocolAttributeType `json:"protocol,omitempty"` - // Rules define the routing parameters for the HTTP and HTTPS listeners. - Rules ListenerGetRulesAttributeType `json:"rules,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() (res ListenerGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetDisplayNameOk() (ret ListenerGetDisplayNameRetType, ok bool) { - return getListenerGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -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. -func (o *Listener) SetDisplayName(v ListenerGetDisplayNameRetType) { - setListenerGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetHttp returns the Http field value if set, zero value otherwise. -func (o *Listener) GetHttp() (res ListenerGetHttpRetType) { - res, _ = o.GetHttpOk() - return -} - -// GetHttpOk returns a tuple with the Http field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetHttpOk() (ret ListenerGetHttpRetType, ok bool) { - return getListenerGetHttpAttributeTypeOk(o.Http) -} - -// HasHttp returns a boolean if a field has been set. -func (o *Listener) HasHttp() bool { - _, ok := o.GetHttpOk() - return ok -} - -// SetHttp gets a reference to the given map[string]interface{} and assigns it to the Http field. -func (o *Listener) SetHttp(v ListenerGetHttpRetType) { - setListenerGetHttpAttributeType(&o.Http, v) -} - -// GetHttps returns the Https field value if set, zero value otherwise. -func (o *Listener) GetHttps() (res ListenerGetHttpsRetType) { - res, _ = o.GetHttpsOk() - return -} - -// GetHttpsOk returns a tuple with the Https field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetHttpsOk() (ret ListenerGetHttpsRetType, ok bool) { - return getListenerGetHttpsAttributeTypeOk(o.Https) -} - -// HasHttps returns a boolean if a field has been set. -func (o *Listener) HasHttps() bool { - _, ok := o.GetHttpsOk() - return ok -} - -// SetHttps gets a reference to the given ProtocolOptionsHTTPS and assigns it to the Https field. -func (o *Listener) SetHttps(v ListenerGetHttpsRetType) { - setListenerGetHttpsAttributeType(&o.Https, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Listener) GetName() (res ListenerGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetNameOk() (ret ListenerGetNameRetType, ok bool) { - return getListenerGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -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. -func (o *Listener) SetName(v ListenerGetNameRetType) { - setListenerGetNameAttributeType(&o.Name, v) -} - -// GetPort returns the Port field value if set, zero value otherwise. -func (o *Listener) GetPort() (res ListenerGetPortRetType) { - res, _ = o.GetPortOk() - return -} - -// GetPortOk returns a tuple with the Port field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetPortOk() (ret ListenerGetPortRetType, ok bool) { - return getListenerGetPortAttributeTypeOk(o.Port) -} - -// HasPort returns a boolean if a field has been set. -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. -func (o *Listener) SetPort(v ListenerGetPortRetType) { - setListenerGetPortAttributeType(&o.Port, v) -} - -// GetProtocol returns the Protocol field value if set, zero value otherwise. -func (o *Listener) GetProtocol() (res ListenerGetProtocolRetType) { - res, _ = o.GetProtocolOk() - return -} - -// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetProtocolOk() (ret ListenerGetProtocolRetType, ok bool) { - return getListenerGetProtocolAttributeTypeOk(o.Protocol) -} - -// HasProtocol returns a boolean if a field has been set. -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. -func (o *Listener) SetProtocol(v ListenerGetProtocolRetType) { - setListenerGetProtocolAttributeType(&o.Protocol, v) -} - -// GetRules returns the Rules field value if set, zero value otherwise. -func (o *Listener) GetRules() (res ListenerGetRulesRetType) { - res, _ = o.GetRulesOk() - return -} - -// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetRulesOk() (ret ListenerGetRulesRetType, ok bool) { - return getListenerGetRulesAttributeTypeOk(o.Rules) -} - -// HasRules returns a boolean if a field has been set. -func (o *Listener) HasRules() bool { - _, ok := o.GetRulesOk() - return ok -} - -// SetRules gets a reference to the given []Rule and assigns it to the Rules field. -func (o *Listener) SetRules(v ListenerGetRulesRetType) { - setListenerGetRulesAttributeType(&o.Rules, v) -} - -func (o Listener) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListenerGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getListenerGetHttpAttributeTypeOk(o.Http); ok { - toSerialize["Http"] = val - } - if val, ok := getListenerGetHttpsAttributeTypeOk(o.Https); ok { - toSerialize["Https"] = val - } - if val, ok := getListenerGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getListenerGetPortAttributeTypeOk(o.Port); ok { - toSerialize["Port"] = val - } - if val, ok := getListenerGetProtocolAttributeTypeOk(o.Protocol); ok { - toSerialize["Protocol"] = val - } - if val, ok := getListenerGetRulesAttributeTypeOk(o.Rules); ok { - toSerialize["Rules"] = val - } - 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/lbapplication/model_listener_test.go b/services/lbapplication/model_listener_test.go deleted file mode 100644 index d47794650..000000000 --- a/services/lbapplication/model_listener_test.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "testing" -) - -// isEnum - -func TestListenerProtocol_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"PROTOCOL_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"PROTOCOL_HTTP"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"PROTOCOL_HTTPS"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := ListenerProtocol("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/lbapplication/model_load_balancer.go b/services/lbapplication/model_load_balancer.go deleted file mode 100644 index 5ac55360a..000000000 --- a/services/lbapplication/model_load_balancer.go +++ /dev/null @@ -1,722 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" - "fmt" -) - -// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancer{} - -/* - types and functions for errors -*/ - -// isArray -type LoadBalancerGetErrorsAttributeType = *[]LoadBalancerError -type LoadBalancerGetErrorsArgType = []LoadBalancerError -type LoadBalancerGetErrorsRetType = []LoadBalancerError - -func getLoadBalancerGetErrorsAttributeTypeOk(arg LoadBalancerGetErrorsAttributeType) (ret LoadBalancerGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetErrorsAttributeType(arg *LoadBalancerGetErrorsAttributeType, val LoadBalancerGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for externalAddress -*/ - -// isNotNullableString -type LoadBalancerGetExternalAddressAttributeType = *string - -func getLoadBalancerGetExternalAddressAttributeTypeOk(arg LoadBalancerGetExternalAddressAttributeType) (ret LoadBalancerGetExternalAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetExternalAddressAttributeType(arg *LoadBalancerGetExternalAddressAttributeType, val LoadBalancerGetExternalAddressRetType) { - *arg = &val -} - -type LoadBalancerGetExternalAddressArgType = string -type LoadBalancerGetExternalAddressRetType = string - -/* - types and functions for listeners -*/ - -// isArray -type LoadBalancerGetListenersAttributeType = *[]Listener -type LoadBalancerGetListenersArgType = []Listener -type LoadBalancerGetListenersRetType = []Listener - -func getLoadBalancerGetListenersAttributeTypeOk(arg LoadBalancerGetListenersAttributeType) (ret LoadBalancerGetListenersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetListenersAttributeType(arg *LoadBalancerGetListenersAttributeType, val LoadBalancerGetListenersRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -type LoadBalancerGetNameAttributeType = *string - -func getLoadBalancerGetNameAttributeTypeOk(arg LoadBalancerGetNameAttributeType) (ret LoadBalancerGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetNameAttributeType(arg *LoadBalancerGetNameAttributeType, val LoadBalancerGetNameRetType) { - *arg = &val -} - -type LoadBalancerGetNameArgType = string -type LoadBalancerGetNameRetType = string - -/* - types and functions for networks -*/ - -// isArray -type LoadBalancerGetNetworksAttributeType = *[]Network -type LoadBalancerGetNetworksArgType = []Network -type LoadBalancerGetNetworksRetType = []Network - -func getLoadBalancerGetNetworksAttributeTypeOk(arg LoadBalancerGetNetworksAttributeType) (ret LoadBalancerGetNetworksRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetNetworksAttributeType(arg *LoadBalancerGetNetworksAttributeType, val LoadBalancerGetNetworksRetType) { - *arg = &val -} - -/* - types and functions for options -*/ - -// isModel -type LoadBalancerGetOptionsAttributeType = *LoadBalancerOptions -type LoadBalancerGetOptionsArgType = LoadBalancerOptions -type LoadBalancerGetOptionsRetType = LoadBalancerOptions - -func getLoadBalancerGetOptionsAttributeTypeOk(arg LoadBalancerGetOptionsAttributeType) (ret LoadBalancerGetOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetOptionsAttributeType(arg *LoadBalancerGetOptionsAttributeType, val LoadBalancerGetOptionsRetType) { - *arg = &val -} - -/* - types and functions for planId -*/ - -// isNotNullableString -type LoadBalancerGetPlanIdAttributeType = *string - -func getLoadBalancerGetPlanIdAttributeTypeOk(arg LoadBalancerGetPlanIdAttributeType) (ret LoadBalancerGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetPlanIdAttributeType(arg *LoadBalancerGetPlanIdAttributeType, val LoadBalancerGetPlanIdRetType) { - *arg = &val -} - -type LoadBalancerGetPlanIdArgType = string -type LoadBalancerGetPlanIdRetType = string - -/* - types and functions for privateAddress -*/ - -// isNotNullableString -type LoadBalancerGetPrivateAddressAttributeType = *string - -func getLoadBalancerGetPrivateAddressAttributeTypeOk(arg LoadBalancerGetPrivateAddressAttributeType) (ret LoadBalancerGetPrivateAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetPrivateAddressAttributeType(arg *LoadBalancerGetPrivateAddressAttributeType, val LoadBalancerGetPrivateAddressRetType) { - *arg = &val -} - -type LoadBalancerGetPrivateAddressArgType = string -type LoadBalancerGetPrivateAddressRetType = string - -/* - types and functions for status -*/ - -// isEnum - -// LoadBalancerStatus the model 'LoadBalancer' -// value type for enums -type LoadBalancerStatus string - -// List of Status -const ( - LOADBALANCERSTATUS_UNSPECIFIED LoadBalancerStatus = "STATUS_UNSPECIFIED" - LOADBALANCERSTATUS_PENDING LoadBalancerStatus = "STATUS_PENDING" - LOADBALANCERSTATUS_READY LoadBalancerStatus = "STATUS_READY" - LOADBALANCERSTATUS_ERROR LoadBalancerStatus = "STATUS_ERROR" - LOADBALANCERSTATUS_TERMINATING LoadBalancerStatus = "STATUS_TERMINATING" -) - -// All allowed values of LoadBalancer enum -var AllowedLoadBalancerStatusEnumValues = []LoadBalancerStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", -} - -func (v *LoadBalancerStatus) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson LoadBalancerStatus - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := LoadBalancerStatus(value) - for _, existing := range AllowedLoadBalancerStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid LoadBalancer", value) -} - -// NewLoadBalancerStatusFromValue returns a pointer to a valid LoadBalancerStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewLoadBalancerStatusFromValue(v LoadBalancerStatus) (*LoadBalancerStatus, error) { - ev := LoadBalancerStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LoadBalancerStatus: valid values are %v", v, AllowedLoadBalancerStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v LoadBalancerStatus) IsValid() bool { - for _, existing := range AllowedLoadBalancerStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusStatus value -func (v LoadBalancerStatus) Ptr() *LoadBalancerStatus { - return &v -} - -type NullableLoadBalancerStatus struct { - value *LoadBalancerStatus - isSet bool -} - -func (v NullableLoadBalancerStatus) Get() *LoadBalancerStatus { - return v.value -} - -func (v *NullableLoadBalancerStatus) Set(val *LoadBalancerStatus) { - v.value = val - v.isSet = true -} - -func (v NullableLoadBalancerStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadBalancerStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadBalancerStatus(val *LoadBalancerStatus) *NullableLoadBalancerStatus { - return &NullableLoadBalancerStatus{value: val, isSet: true} -} - -func (v NullableLoadBalancerStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadBalancerStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type LoadBalancerGetStatusAttributeType = *LoadBalancerStatus -type LoadBalancerGetStatusArgType = LoadBalancerStatus -type LoadBalancerGetStatusRetType = LoadBalancerStatus - -func getLoadBalancerGetStatusAttributeTypeOk(arg LoadBalancerGetStatusAttributeType) (ret LoadBalancerGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetStatusAttributeType(arg *LoadBalancerGetStatusAttributeType, val LoadBalancerGetStatusRetType) { - *arg = &val -} - -/* - types and functions for targetPools -*/ - -// isArray -type LoadBalancerGetTargetPoolsAttributeType = *[]TargetPool -type LoadBalancerGetTargetPoolsArgType = []TargetPool -type LoadBalancerGetTargetPoolsRetType = []TargetPool - -func getLoadBalancerGetTargetPoolsAttributeTypeOk(arg LoadBalancerGetTargetPoolsAttributeType) (ret LoadBalancerGetTargetPoolsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetTargetPoolsAttributeType(arg *LoadBalancerGetTargetPoolsAttributeType, val LoadBalancerGetTargetPoolsRetType) { - *arg = &val -} - -/* - types and functions for version -*/ - -// isNotNullableString -type LoadBalancerGetVersionAttributeType = *string - -func getLoadBalancerGetVersionAttributeTypeOk(arg LoadBalancerGetVersionAttributeType) (ret LoadBalancerGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerGetVersionAttributeType(arg *LoadBalancerGetVersionAttributeType, val LoadBalancerGetVersionRetType) { - *arg = &val -} - -type LoadBalancerGetVersionArgType = string -type LoadBalancerGetVersionRetType = string - -// LoadBalancer struct for LoadBalancer -type LoadBalancer struct { - // Reports all errors a application load balancer has. - Errors LoadBalancerGetErrorsAttributeType `json:"errors,omitempty"` - // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress LoadBalancerGetExternalAddressAttributeType `json:"externalAddress,omitempty"` - // There is a maximum listener count of 20. - Listeners LoadBalancerGetListenersAttributeType `json:"listeners,omitempty"` - // Application Load Balancer name. Not changeable after creation. - Name LoadBalancerGetNameAttributeType `json:"name,omitempty"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks LoadBalancerGetNetworksAttributeType `json:"networks,omitempty"` - Options LoadBalancerGetOptionsAttributeType `json:"options,omitempty"` - // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId LoadBalancerGetPlanIdAttributeType `json:"planId,omitempty"` - // Transient private application load balancer IP address that can change any time. - PrivateAddress LoadBalancerGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` - Status LoadBalancerGetStatusAttributeType `json:"status,omitempty"` - // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools LoadBalancerGetTargetPoolsAttributeType `json:"targetPools,omitempty"` - // Application 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 application load balancer resource that changes during updates of the load balancers. On updates this field specified the application 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 application 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 application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version LoadBalancerGetVersionAttributeType `json:"version,omitempty"` -} - -// NewLoadBalancer instantiates a new LoadBalancer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res LoadBalancerGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetErrorsOk() (ret LoadBalancerGetErrorsRetType, ok bool) { - return getLoadBalancerGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetErrors(v LoadBalancerGetErrorsRetType) { - setLoadBalancerGetErrorsAttributeType(&o.Errors, v) -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *LoadBalancer) GetExternalAddress() (res LoadBalancerGetExternalAddressRetType) { - res, _ = o.GetExternalAddressOk() - return -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetExternalAddressOk() (ret LoadBalancerGetExternalAddressRetType, ok bool) { - return getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress) -} - -// HasExternalAddress returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetExternalAddress(v LoadBalancerGetExternalAddressRetType) { - setLoadBalancerGetExternalAddressAttributeType(&o.ExternalAddress, v) -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *LoadBalancer) GetListeners() (res LoadBalancerGetListenersRetType) { - res, _ = o.GetListenersOk() - return -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetListenersOk() (ret LoadBalancerGetListenersRetType, ok bool) { - return getLoadBalancerGetListenersAttributeTypeOk(o.Listeners) -} - -// HasListeners returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetListeners(v LoadBalancerGetListenersRetType) { - setLoadBalancerGetListenersAttributeType(&o.Listeners, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *LoadBalancer) GetName() (res LoadBalancerGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetNameOk() (ret LoadBalancerGetNameRetType, ok bool) { - return getLoadBalancerGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetName(v LoadBalancerGetNameRetType) { - setLoadBalancerGetNameAttributeType(&o.Name, v) -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *LoadBalancer) GetNetworks() (res LoadBalancerGetNetworksRetType) { - res, _ = o.GetNetworksOk() - return -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetNetworksOk() (ret LoadBalancerGetNetworksRetType, ok bool) { - return getLoadBalancerGetNetworksAttributeTypeOk(o.Networks) -} - -// HasNetworks returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetNetworks(v LoadBalancerGetNetworksRetType) { - setLoadBalancerGetNetworksAttributeType(&o.Networks, v) -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *LoadBalancer) GetOptions() (res LoadBalancerGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetOptionsOk() (ret LoadBalancerGetOptionsRetType, ok bool) { - return getLoadBalancerGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetOptions(v LoadBalancerGetOptionsRetType) { - setLoadBalancerGetOptionsAttributeType(&o.Options, v) -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *LoadBalancer) GetPlanId() (res LoadBalancerGetPlanIdRetType) { - res, _ = o.GetPlanIdOk() - return -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetPlanIdOk() (ret LoadBalancerGetPlanIdRetType, ok bool) { - return getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId) -} - -// HasPlanId returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetPlanId(v LoadBalancerGetPlanIdRetType) { - setLoadBalancerGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *LoadBalancer) GetPrivateAddress() (res LoadBalancerGetPrivateAddressRetType) { - res, _ = o.GetPrivateAddressOk() - return -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetPrivateAddressOk() (ret LoadBalancerGetPrivateAddressRetType, ok bool) { - return getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress) -} - -// HasPrivateAddress returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetPrivateAddress(v LoadBalancerGetPrivateAddressRetType) { - setLoadBalancerGetPrivateAddressAttributeType(&o.PrivateAddress, v) -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *LoadBalancer) GetStatus() (res LoadBalancerGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetStatusOk() (ret LoadBalancerGetStatusRetType, ok bool) { - return getLoadBalancerGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetStatus(v LoadBalancerGetStatusRetType) { - setLoadBalancerGetStatusAttributeType(&o.Status, v) -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *LoadBalancer) GetTargetPools() (res LoadBalancerGetTargetPoolsRetType) { - res, _ = o.GetTargetPoolsOk() - return -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetTargetPoolsOk() (ret LoadBalancerGetTargetPoolsRetType, ok bool) { - return getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools) -} - -// HasTargetPools returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetTargetPools(v LoadBalancerGetTargetPoolsRetType) { - setLoadBalancerGetTargetPoolsAttributeType(&o.TargetPools, v) -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *LoadBalancer) GetVersion() (res LoadBalancerGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetVersionOk() (ret LoadBalancerGetVersionRetType, ok bool) { - return getLoadBalancerGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -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. -func (o *LoadBalancer) SetVersion(v LoadBalancerGetVersionRetType) { - setLoadBalancerGetVersionAttributeType(&o.Version, v) -} - -func (o LoadBalancer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadBalancerGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { - toSerialize["ExternalAddress"] = val - } - if val, ok := getLoadBalancerGetListenersAttributeTypeOk(o.Listeners); ok { - toSerialize["Listeners"] = val - } - if val, ok := getLoadBalancerGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getLoadBalancerGetNetworksAttributeTypeOk(o.Networks); ok { - toSerialize["Networks"] = val - } - if val, ok := getLoadBalancerGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val - } - if val, ok := getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { - toSerialize["PrivateAddress"] = val - } - if val, ok := getLoadBalancerGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { - toSerialize["TargetPools"] = val - } - if val, ok := getLoadBalancerGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - 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/lbapplication/model_load_balancer_error.go b/services/lbapplication/model_load_balancer_error.go deleted file mode 100644 index f76648702..000000000 --- a/services/lbapplication/model_load_balancer_error.go +++ /dev/null @@ -1,296 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" - "fmt" -) - -// checks if the LoadBalancerError type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancerError{} - -/* - types and functions for description -*/ - -// isNotNullableString -type LoadBalancerErrorGetDescriptionAttributeType = *string - -func getLoadBalancerErrorGetDescriptionAttributeTypeOk(arg LoadBalancerErrorGetDescriptionAttributeType) (ret LoadBalancerErrorGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerErrorGetDescriptionAttributeType(arg *LoadBalancerErrorGetDescriptionAttributeType, val LoadBalancerErrorGetDescriptionRetType) { - *arg = &val -} - -type LoadBalancerErrorGetDescriptionArgType = string -type LoadBalancerErrorGetDescriptionRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// LoadBalancerErrorTypes The error type specifies which part of the application 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 application load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error. -// value type for enums -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" - 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" -) - -// All allowed values of LoadBalancerError enum -var AllowedLoadBalancerErrorTypesEnumValues = []LoadBalancerErrorTypes{ - "TYPE_UNSPECIFIED", - "TYPE_INTERNAL", - "TYPE_QUOTA_SECGROUP_EXCEEDED", - "TYPE_QUOTA_SECGROUPRULE_EXCEEDED", - "TYPE_PORT_NOT_CONFIGURED", - "TYPE_FIP_NOT_CONFIGURED", - "TYPE_TARGET_NOT_ACTIVE", - "TYPE_METRICS_MISCONFIGURED", - "TYPE_LOGS_MISCONFIGURED", -} - -func (v *LoadBalancerErrorTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson LoadBalancerErrorTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := LoadBalancerErrorTypes(value) - for _, existing := range AllowedLoadBalancerErrorTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid LoadBalancerError", value) -} - -// NewLoadBalancerErrorTypesFromValue returns a pointer to a valid LoadBalancerErrorTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewLoadBalancerErrorTypesFromValue(v LoadBalancerErrorTypes) (*LoadBalancerErrorTypes, error) { - ev := LoadBalancerErrorTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LoadBalancerErrorTypes: valid values are %v", v, AllowedLoadBalancerErrorTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v LoadBalancerErrorTypes) IsValid() bool { - for _, existing := range AllowedLoadBalancerErrorTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -func (v LoadBalancerErrorTypes) Ptr() *LoadBalancerErrorTypes { - return &v -} - -type NullableLoadBalancerErrorTypes struct { - value *LoadBalancerErrorTypes - isSet bool -} - -func (v NullableLoadBalancerErrorTypes) Get() *LoadBalancerErrorTypes { - return v.value -} - -func (v *NullableLoadBalancerErrorTypes) Set(val *LoadBalancerErrorTypes) { - v.value = val - v.isSet = true -} - -func (v NullableLoadBalancerErrorTypes) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadBalancerErrorTypes) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadBalancerErrorTypes(val *LoadBalancerErrorTypes) *NullableLoadBalancerErrorTypes { - return &NullableLoadBalancerErrorTypes{value: val, isSet: true} -} - -func (v NullableLoadBalancerErrorTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadBalancerErrorTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type LoadBalancerErrorGetTypeAttributeType = *LoadBalancerErrorTypes -type LoadBalancerErrorGetTypeArgType = LoadBalancerErrorTypes -type LoadBalancerErrorGetTypeRetType = LoadBalancerErrorTypes - -func getLoadBalancerErrorGetTypeAttributeTypeOk(arg LoadBalancerErrorGetTypeAttributeType) (ret LoadBalancerErrorGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerErrorGetTypeAttributeType(arg *LoadBalancerErrorGetTypeAttributeType, val LoadBalancerErrorGetTypeRetType) { - *arg = &val -} - -// LoadBalancerError struct for LoadBalancerError -type LoadBalancerError struct { - // The error description contains additional helpful user information to fix the error state of the application 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. - Description LoadBalancerErrorGetDescriptionAttributeType `json:"description,omitempty"` - // The error type specifies which part of the application 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 application load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error. - Type LoadBalancerErrorGetTypeAttributeType `json:"type,omitempty"` -} - -// NewLoadBalancerError instantiates a new LoadBalancerError object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res LoadBalancerErrorGetDescriptionRetType) { - res, _ = o.GetDescriptionOk() - return -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerError) GetDescriptionOk() (ret LoadBalancerErrorGetDescriptionRetType, ok bool) { - return getLoadBalancerErrorGetDescriptionAttributeTypeOk(o.Description) -} - -// HasDescription returns a boolean if a field has been set. -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. -func (o *LoadBalancerError) SetDescription(v LoadBalancerErrorGetDescriptionRetType) { - setLoadBalancerErrorGetDescriptionAttributeType(&o.Description, v) -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *LoadBalancerError) GetType() (res LoadBalancerErrorGetTypeRetType) { - res, _ = o.GetTypeOk() - return -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerError) GetTypeOk() (ret LoadBalancerErrorGetTypeRetType, ok bool) { - return getLoadBalancerErrorGetTypeAttributeTypeOk(o.Type) -} - -// HasType returns a boolean if a field has been set. -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. -func (o *LoadBalancerError) SetType(v LoadBalancerErrorGetTypeRetType) { - setLoadBalancerErrorGetTypeAttributeType(&o.Type, v) -} - -func (o LoadBalancerError) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadBalancerErrorGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getLoadBalancerErrorGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_load_balancer_error_test.go b/services/lbapplication/model_load_balancer_error_test.go deleted file mode 100644 index c9abad7aa..000000000 --- a/services/lbapplication/model_load_balancer_error_test.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "testing" -) - -// isEnum - -func TestLoadBalancerErrorTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"TYPE_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"TYPE_INTERNAL"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"TYPE_QUOTA_SECGROUP_EXCEEDED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"TYPE_QUOTA_SECGROUPRULE_EXCEEDED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"TYPE_PORT_NOT_CONFIGURED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 6`, - args: args{ - src: []byte(`"TYPE_FIP_NOT_CONFIGURED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 7`, - args: args{ - src: []byte(`"TYPE_TARGET_NOT_ACTIVE"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 8`, - args: args{ - src: []byte(`"TYPE_METRICS_MISCONFIGURED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 9`, - args: args{ - src: []byte(`"TYPE_LOGS_MISCONFIGURED"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := LoadBalancerErrorTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/lbapplication/model_load_balancer_options.go b/services/lbapplication/model_load_balancer_options.go deleted file mode 100644 index 519c4636c..000000000 --- a/services/lbapplication/model_load_balancer_options.go +++ /dev/null @@ -1,269 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the LoadBalancerOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancerOptions{} - -/* - types and functions for accessControl -*/ - -// isModel -type LoadBalancerOptionsGetAccessControlAttributeType = *LoadbalancerOptionAccessControl -type LoadBalancerOptionsGetAccessControlArgType = LoadbalancerOptionAccessControl -type LoadBalancerOptionsGetAccessControlRetType = LoadbalancerOptionAccessControl - -func getLoadBalancerOptionsGetAccessControlAttributeTypeOk(arg LoadBalancerOptionsGetAccessControlAttributeType) (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerOptionsGetAccessControlAttributeType(arg *LoadBalancerOptionsGetAccessControlAttributeType, val LoadBalancerOptionsGetAccessControlRetType) { - *arg = &val -} - -/* - types and functions for ephemeralAddress -*/ - -// isBoolean -type LoadBalancerOptionsgetEphemeralAddressAttributeType = *bool -type LoadBalancerOptionsgetEphemeralAddressArgType = bool -type LoadBalancerOptionsgetEphemeralAddressRetType = bool - -func getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(arg LoadBalancerOptionsgetEphemeralAddressAttributeType) (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerOptionsgetEphemeralAddressAttributeType(arg *LoadBalancerOptionsgetEphemeralAddressAttributeType, val LoadBalancerOptionsgetEphemeralAddressRetType) { - *arg = &val -} - -/* - types and functions for observability -*/ - -// isModel -type LoadBalancerOptionsGetObservabilityAttributeType = *LoadbalancerOptionObservability -type LoadBalancerOptionsGetObservabilityArgType = LoadbalancerOptionObservability -type LoadBalancerOptionsGetObservabilityRetType = LoadbalancerOptionObservability - -func getLoadBalancerOptionsGetObservabilityAttributeTypeOk(arg LoadBalancerOptionsGetObservabilityAttributeType) (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerOptionsGetObservabilityAttributeType(arg *LoadBalancerOptionsGetObservabilityAttributeType, val LoadBalancerOptionsGetObservabilityRetType) { - *arg = &val -} - -/* - types and functions for privateNetworkOnly -*/ - -// isBoolean -type LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType = *bool -type LoadBalancerOptionsgetPrivateNetworkOnlyArgType = bool -type LoadBalancerOptionsgetPrivateNetworkOnlyRetType = bool - -func getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(arg LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType) (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(arg *LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType, val LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { - *arg = &val -} - -// LoadBalancerOptions Defines any optional functionality you want to have enabled on your application load balancer. -type LoadBalancerOptions struct { - AccessControl LoadBalancerOptionsGetAccessControlAttributeType `json:"accessControl,omitempty"` - EphemeralAddress LoadBalancerOptionsgetEphemeralAddressAttributeType `json:"ephemeralAddress,omitempty"` - Observability LoadBalancerOptionsGetObservabilityAttributeType `json:"observability,omitempty"` - // Application Load Balancer is accessible only via a private network ip address. Not changeable after creation. - PrivateNetworkOnly LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType `json:"privateNetworkOnly,omitempty"` -} - -// NewLoadBalancerOptions instantiates a new LoadBalancerOptions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res LoadBalancerOptionsGetAccessControlRetType) { - res, _ = o.GetAccessControlOk() - return -} - -// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetAccessControlOk() (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) { - return getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl) -} - -// HasAccessControl returns a boolean if a field has been set. -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. -func (o *LoadBalancerOptions) SetAccessControl(v LoadBalancerOptionsGetAccessControlRetType) { - setLoadBalancerOptionsGetAccessControlAttributeType(&o.AccessControl, v) -} - -// GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetEphemeralAddress() (res LoadBalancerOptionsgetEphemeralAddressRetType) { - res, _ = o.GetEphemeralAddressOk() - return -} - -// GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetEphemeralAddressOk() (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) { - return getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress) -} - -// HasEphemeralAddress returns a boolean if a field has been set. -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. -func (o *LoadBalancerOptions) SetEphemeralAddress(v LoadBalancerOptionsgetEphemeralAddressRetType) { - setLoadBalancerOptionsgetEphemeralAddressAttributeType(&o.EphemeralAddress, v) -} - -// GetObservability returns the Observability field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetObservability() (res LoadBalancerOptionsGetObservabilityRetType) { - res, _ = o.GetObservabilityOk() - return -} - -// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetObservabilityOk() (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) { - return getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability) -} - -// HasObservability returns a boolean if a field has been set. -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. -func (o *LoadBalancerOptions) SetObservability(v LoadBalancerOptionsGetObservabilityRetType) { - setLoadBalancerOptionsGetObservabilityAttributeType(&o.Observability, v) -} - -// GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetPrivateNetworkOnly() (res LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { - res, _ = o.GetPrivateNetworkOnlyOk() - return -} - -// GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) { - return getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly) -} - -// HasPrivateNetworkOnly returns a boolean if a field has been set. -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. -func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { - setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(&o.PrivateNetworkOnly, v) -} - -func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl); ok { - toSerialize["AccessControl"] = val - } - if val, ok := getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress); ok { - toSerialize["EphemeralAddress"] = val - } - if val, ok := getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability); ok { - toSerialize["Observability"] = val - } - if val, ok := getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly); ok { - toSerialize["PrivateNetworkOnly"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_load_balancer_options_test.go b/services/lbapplication/model_load_balancer_options_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_load_balancer_options_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_load_balancer_test.go b/services/lbapplication/model_load_balancer_test.go deleted file mode 100644 index 9ce7ad118..000000000 --- a/services/lbapplication/model_load_balancer_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "testing" -) - -// isEnum - -func TestLoadBalancerStatus_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"STATUS_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"STATUS_PENDING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"STATUS_READY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"STATUS_ERROR"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"STATUS_TERMINATING"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := LoadBalancerStatus("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/lbapplication/model_loadbalancer_option_access_control.go b/services/lbapplication/model_loadbalancer_option_access_control.go deleted file mode 100644 index 9f2f40caf..000000000 --- a/services/lbapplication/model_loadbalancer_option_access_control.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionAccessControl type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionAccessControl{} - -/* - types and functions for allowedSourceRanges -*/ - -// isArray -type LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType = *[]string -type LoadbalancerOptionAccessControlGetAllowedSourceRangesArgType = []string -type LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType = []string - -func getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(arg LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType) (ret LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType(arg *LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType, val LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { - *arg = &val -} - -// LoadbalancerOptionAccessControl Use this option to limit the IP ranges that can use the application load balancer. -type LoadbalancerOptionAccessControl struct { - // Application Load Balancer is accessible only from an IP address in this range - AllowedSourceRanges LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType `json:"allowedSourceRanges,omitempty"` -} - -// NewLoadbalancerOptionAccessControl instantiates a new LoadbalancerOptionAccessControl object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { - res, _ = o.GetAllowedSourceRangesOk() - return -} - -// GetAllowedSourceRangesOk returns a tuple with the AllowedSourceRanges field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() (ret LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType, ok bool) { - return getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(o.AllowedSourceRanges) -} - -// HasAllowedSourceRanges returns a boolean if a field has been set. -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. -func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { - setLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType(&o.AllowedSourceRanges, v) -} - -func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(o.AllowedSourceRanges); ok { - toSerialize["AllowedSourceRanges"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_loadbalancer_option_access_control_test.go b/services/lbapplication/model_loadbalancer_option_access_control_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_loadbalancer_option_access_control_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_loadbalancer_option_logs.go b/services/lbapplication/model_loadbalancer_option_logs.go deleted file mode 100644 index 4313f7774..000000000 --- a/services/lbapplication/model_loadbalancer_option_logs.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionLogs type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionLogs{} - -/* - types and functions for credentialsRef -*/ - -// isNotNullableString -type LoadbalancerOptionLogsGetCredentialsRefAttributeType = *string - -func getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionLogsGetCredentialsRefAttributeType) (ret LoadbalancerOptionLogsGetCredentialsRefRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadbalancerOptionLogsGetCredentialsRefAttributeType(arg *LoadbalancerOptionLogsGetCredentialsRefAttributeType, val LoadbalancerOptionLogsGetCredentialsRefRetType) { - *arg = &val -} - -type LoadbalancerOptionLogsGetCredentialsRefArgType = string -type LoadbalancerOptionLogsGetCredentialsRefRetType = string - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -type LoadbalancerOptionLogsGetPushUrlAttributeType = *string - -func getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionLogsGetPushUrlAttributeType) (ret LoadbalancerOptionLogsGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadbalancerOptionLogsGetPushUrlAttributeType(arg *LoadbalancerOptionLogsGetPushUrlAttributeType, val LoadbalancerOptionLogsGetPushUrlRetType) { - *arg = &val -} - -type LoadbalancerOptionLogsGetPushUrlArgType = string -type LoadbalancerOptionLogsGetPushUrlRetType = string - -// 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 Application Load Balancer. - CredentialsRef LoadbalancerOptionLogsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` - // The ARGUS/Loki remote write Push URL you want the logs to be shipped to. - PushUrl LoadbalancerOptionLogsGetPushUrlAttributeType `json:"pushUrl,omitempty"` -} - -// NewLoadbalancerOptionLogs instantiates a new LoadbalancerOptionLogs object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res LoadbalancerOptionLogsGetCredentialsRefRetType) { - res, _ = o.GetCredentialsRefOk() - return -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (ret LoadbalancerOptionLogsGetCredentialsRefRetType, ok bool) { - return getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(o.CredentialsRef) -} - -// HasCredentialsRef returns a boolean if a field has been set. -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. -func (o *LoadbalancerOptionLogs) SetCredentialsRef(v LoadbalancerOptionLogsGetCredentialsRefRetType) { - setLoadbalancerOptionLogsGetCredentialsRefAttributeType(&o.CredentialsRef, v) -} - -// GetPushUrl returns the PushUrl field value if set, zero value otherwise. -func (o *LoadbalancerOptionLogs) GetPushUrl() (res LoadbalancerOptionLogsGetPushUrlRetType) { - res, _ = o.GetPushUrlOk() - return -} - -// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionLogs) GetPushUrlOk() (ret LoadbalancerOptionLogsGetPushUrlRetType, ok bool) { - return getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// HasPushUrl returns a boolean if a field has been set. -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. -func (o *LoadbalancerOptionLogs) SetPushUrl(v LoadbalancerOptionLogsGetPushUrlRetType) { - setLoadbalancerOptionLogsGetPushUrlAttributeType(&o.PushUrl, v) -} - -func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { - toSerialize["CredentialsRef"] = val - } - if val, ok := getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(o.PushUrl); ok { - toSerialize["PushUrl"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_loadbalancer_option_logs_test.go b/services/lbapplication/model_loadbalancer_option_logs_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_loadbalancer_option_logs_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_loadbalancer_option_metrics.go b/services/lbapplication/model_loadbalancer_option_metrics.go deleted file mode 100644 index 3126a773f..000000000 --- a/services/lbapplication/model_loadbalancer_option_metrics.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionMetrics{} - -/* - types and functions for credentialsRef -*/ - -// isNotNullableString -type LoadbalancerOptionMetricsGetCredentialsRefAttributeType = *string - -func getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionMetricsGetCredentialsRefAttributeType) (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(arg *LoadbalancerOptionMetricsGetCredentialsRefAttributeType, val LoadbalancerOptionMetricsGetCredentialsRefRetType) { - *arg = &val -} - -type LoadbalancerOptionMetricsGetCredentialsRefArgType = string -type LoadbalancerOptionMetricsGetCredentialsRefRetType = string - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -type LoadbalancerOptionMetricsGetPushUrlAttributeType = *string - -func getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionMetricsGetPushUrlAttributeType) (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadbalancerOptionMetricsGetPushUrlAttributeType(arg *LoadbalancerOptionMetricsGetPushUrlAttributeType, val LoadbalancerOptionMetricsGetPushUrlRetType) { - *arg = &val -} - -type LoadbalancerOptionMetricsGetPushUrlArgType = string -type LoadbalancerOptionMetricsGetPushUrlRetType = string - -// 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 Application Load Balancer. - CredentialsRef LoadbalancerOptionMetricsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` - // The ARGUS/Prometheus remote write Push URL you want the metrics to be shipped to. - PushUrl LoadbalancerOptionMetricsGetPushUrlAttributeType `json:"pushUrl,omitempty"` -} - -// NewLoadbalancerOptionMetrics instantiates a new LoadbalancerOptionMetrics object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res LoadbalancerOptionMetricsGetCredentialsRefRetType) { - res, _ = o.GetCredentialsRefOk() - return -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) { - return getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef) -} - -// HasCredentialsRef returns a boolean if a field has been set. -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. -func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v LoadbalancerOptionMetricsGetCredentialsRefRetType) { - setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(&o.CredentialsRef, v) -} - -// GetPushUrl returns the PushUrl field value if set, zero value otherwise. -func (o *LoadbalancerOptionMetrics) GetPushUrl() (res LoadbalancerOptionMetricsGetPushUrlRetType) { - res, _ = o.GetPushUrlOk() - return -} - -// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) { - return getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// HasPushUrl returns a boolean if a field has been set. -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. -func (o *LoadbalancerOptionMetrics) SetPushUrl(v LoadbalancerOptionMetricsGetPushUrlRetType) { - setLoadbalancerOptionMetricsGetPushUrlAttributeType(&o.PushUrl, v) -} - -func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { - toSerialize["CredentialsRef"] = val - } - if val, ok := getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl); ok { - toSerialize["PushUrl"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_loadbalancer_option_metrics_test.go b/services/lbapplication/model_loadbalancer_option_metrics_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_loadbalancer_option_metrics_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_loadbalancer_option_observability.go b/services/lbapplication/model_loadbalancer_option_observability.go deleted file mode 100644 index 02cab0c87..000000000 --- a/services/lbapplication/model_loadbalancer_option_observability.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionObservability type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionObservability{} - -/* - types and functions for logs -*/ - -// isModel -type LoadbalancerOptionObservabilityGetLogsAttributeType = *LoadbalancerOptionLogs -type LoadbalancerOptionObservabilityGetLogsArgType = LoadbalancerOptionLogs -type LoadbalancerOptionObservabilityGetLogsRetType = LoadbalancerOptionLogs - -func getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(arg LoadbalancerOptionObservabilityGetLogsAttributeType) (ret LoadbalancerOptionObservabilityGetLogsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadbalancerOptionObservabilityGetLogsAttributeType(arg *LoadbalancerOptionObservabilityGetLogsAttributeType, val LoadbalancerOptionObservabilityGetLogsRetType) { - *arg = &val -} - -/* - types and functions for metrics -*/ - -// isModel -type LoadbalancerOptionObservabilityGetMetricsAttributeType = *LoadbalancerOptionMetrics -type LoadbalancerOptionObservabilityGetMetricsArgType = LoadbalancerOptionMetrics -type LoadbalancerOptionObservabilityGetMetricsRetType = LoadbalancerOptionMetrics - -func getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(arg LoadbalancerOptionObservabilityGetMetricsAttributeType) (ret LoadbalancerOptionObservabilityGetMetricsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLoadbalancerOptionObservabilityGetMetricsAttributeType(arg *LoadbalancerOptionObservabilityGetMetricsAttributeType, val LoadbalancerOptionObservabilityGetMetricsRetType) { - *arg = &val -} - -// LoadbalancerOptionObservability We offer Application Load Balancer metrics observability via ARGUS or external solutions. Not changeable after creation. -type LoadbalancerOptionObservability struct { - Logs LoadbalancerOptionObservabilityGetLogsAttributeType `json:"logs,omitempty"` - Metrics LoadbalancerOptionObservabilityGetMetricsAttributeType `json:"metrics,omitempty"` -} - -// NewLoadbalancerOptionObservability instantiates a new LoadbalancerOptionObservability object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res LoadbalancerOptionObservabilityGetLogsRetType) { - res, _ = o.GetLogsOk() - return -} - -// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionObservability) GetLogsOk() (ret LoadbalancerOptionObservabilityGetLogsRetType, ok bool) { - return getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(o.Logs) -} - -// HasLogs returns a boolean if a field has been set. -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. -func (o *LoadbalancerOptionObservability) SetLogs(v LoadbalancerOptionObservabilityGetLogsRetType) { - setLoadbalancerOptionObservabilityGetLogsAttributeType(&o.Logs, v) -} - -// GetMetrics returns the Metrics field value if set, zero value otherwise. -func (o *LoadbalancerOptionObservability) GetMetrics() (res LoadbalancerOptionObservabilityGetMetricsRetType) { - res, _ = o.GetMetricsOk() - return -} - -// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionObservability) GetMetricsOk() (ret LoadbalancerOptionObservabilityGetMetricsRetType, ok bool) { - return getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(o.Metrics) -} - -// HasMetrics returns a boolean if a field has been set. -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. -func (o *LoadbalancerOptionObservability) SetMetrics(v LoadbalancerOptionObservabilityGetMetricsRetType) { - setLoadbalancerOptionObservabilityGetMetricsAttributeType(&o.Metrics, v) -} - -func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(o.Logs); ok { - toSerialize["Logs"] = val - } - if val, ok := getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(o.Metrics); ok { - toSerialize["Metrics"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_loadbalancer_option_observability_test.go b/services/lbapplication/model_loadbalancer_option_observability_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_loadbalancer_option_observability_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_matcher.go b/services/lbapplication/model_matcher.go deleted file mode 100644 index 7f01d60d2..000000000 --- a/services/lbapplication/model_matcher.go +++ /dev/null @@ -1,369 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the Matcher type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Matcher{} - -/* - types and functions for cookiePersistence -*/ - -// isModel -type MatcherGetCookiePersistenceAttributeType = *CookiePersistence -type MatcherGetCookiePersistenceArgType = CookiePersistence -type MatcherGetCookiePersistenceRetType = CookiePersistence - -func getMatcherGetCookiePersistenceAttributeTypeOk(arg MatcherGetCookiePersistenceAttributeType) (ret MatcherGetCookiePersistenceRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setMatcherGetCookiePersistenceAttributeType(arg *MatcherGetCookiePersistenceAttributeType, val MatcherGetCookiePersistenceRetType) { - *arg = &val -} - -/* - types and functions for headers -*/ - -// isArray -type MatcherGetHeadersAttributeType = *[]Header -type MatcherGetHeadersArgType = []Header -type MatcherGetHeadersRetType = []Header - -func getMatcherGetHeadersAttributeTypeOk(arg MatcherGetHeadersAttributeType) (ret MatcherGetHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setMatcherGetHeadersAttributeType(arg *MatcherGetHeadersAttributeType, val MatcherGetHeadersRetType) { - *arg = &val -} - -/* - types and functions for pathPrefix -*/ - -// isNotNullableString -type MatcherGetPathPrefixAttributeType = *string - -func getMatcherGetPathPrefixAttributeTypeOk(arg MatcherGetPathPrefixAttributeType) (ret MatcherGetPathPrefixRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setMatcherGetPathPrefixAttributeType(arg *MatcherGetPathPrefixAttributeType, val MatcherGetPathPrefixRetType) { - *arg = &val -} - -type MatcherGetPathPrefixArgType = string -type MatcherGetPathPrefixRetType = string - -/* - types and functions for queryParameters -*/ - -// isArray -type MatcherGetQueryParametersAttributeType = *[]QueryParameters -type MatcherGetQueryParametersArgType = []QueryParameters -type MatcherGetQueryParametersRetType = []QueryParameters - -func getMatcherGetQueryParametersAttributeTypeOk(arg MatcherGetQueryParametersAttributeType) (ret MatcherGetQueryParametersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setMatcherGetQueryParametersAttributeType(arg *MatcherGetQueryParametersAttributeType, val MatcherGetQueryParametersRetType) { - *arg = &val -} - -/* - types and functions for targetPool -*/ - -// isNotNullableString -type MatcherGetTargetPoolAttributeType = *string - -func getMatcherGetTargetPoolAttributeTypeOk(arg MatcherGetTargetPoolAttributeType) (ret MatcherGetTargetPoolRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setMatcherGetTargetPoolAttributeType(arg *MatcherGetTargetPoolAttributeType, val MatcherGetTargetPoolRetType) { - *arg = &val -} - -type MatcherGetTargetPoolArgType = string -type MatcherGetTargetPoolRetType = string - -/* - types and functions for webSocket -*/ - -// isBoolean -type MatchergetWebSocketAttributeType = *bool -type MatchergetWebSocketArgType = bool -type MatchergetWebSocketRetType = bool - -func getMatchergetWebSocketAttributeTypeOk(arg MatchergetWebSocketAttributeType) (ret MatchergetWebSocketRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setMatchergetWebSocketAttributeType(arg *MatchergetWebSocketAttributeType, val MatchergetWebSocketRetType) { - *arg = &val -} - -// Matcher struct for Matcher -type Matcher struct { - CookiePersistence MatcherGetCookiePersistenceAttributeType `json:"cookiePersistence,omitempty"` - // Headers for the matcher - Headers MatcherGetHeadersAttributeType `json:"headers,omitempty"` - // Path prefix for the matcher - PathPrefix MatcherGetPathPrefixAttributeType `json:"pathPrefix,omitempty"` - // Query Parameters for the matcher - QueryParameters MatcherGetQueryParametersAttributeType `json:"queryParameters,omitempty"` - // Reference target pool by target pool name. - TargetPool MatcherGetTargetPoolAttributeType `json:"targetPool,omitempty"` - // If enabled, when client sends an HTTP request with and Upgrade header, indicating the desire to establish a Websocket connection, if backend server supports WebSocket, it responds with HTTP 101 status code, switching protocols from HTTP to WebSocket. Hence the client and the server can exchange data in real-time using one long-lived TCP connection. - WebSocket MatchergetWebSocketAttributeType `json:"webSocket,omitempty"` -} - -// NewMatcher instantiates a new Matcher object -// This constructor will assign default values to properties that have it defined, -// 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 NewMatcher() *Matcher { - this := Matcher{} - return &this -} - -// NewMatcherWithDefaults instantiates a new Matcher object -// This 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 NewMatcherWithDefaults() *Matcher { - this := Matcher{} - return &this -} - -// GetCookiePersistence returns the CookiePersistence field value if set, zero value otherwise. -func (o *Matcher) GetCookiePersistence() (res MatcherGetCookiePersistenceRetType) { - res, _ = o.GetCookiePersistenceOk() - return -} - -// GetCookiePersistenceOk returns a tuple with the CookiePersistence field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Matcher) GetCookiePersistenceOk() (ret MatcherGetCookiePersistenceRetType, ok bool) { - return getMatcherGetCookiePersistenceAttributeTypeOk(o.CookiePersistence) -} - -// HasCookiePersistence returns a boolean if a field has been set. -func (o *Matcher) HasCookiePersistence() bool { - _, ok := o.GetCookiePersistenceOk() - return ok -} - -// SetCookiePersistence gets a reference to the given CookiePersistence and assigns it to the CookiePersistence field. -func (o *Matcher) SetCookiePersistence(v MatcherGetCookiePersistenceRetType) { - setMatcherGetCookiePersistenceAttributeType(&o.CookiePersistence, v) -} - -// GetHeaders returns the Headers field value if set, zero value otherwise. -func (o *Matcher) GetHeaders() (res MatcherGetHeadersRetType) { - res, _ = o.GetHeadersOk() - return -} - -// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Matcher) GetHeadersOk() (ret MatcherGetHeadersRetType, ok bool) { - return getMatcherGetHeadersAttributeTypeOk(o.Headers) -} - -// HasHeaders returns a boolean if a field has been set. -func (o *Matcher) HasHeaders() bool { - _, ok := o.GetHeadersOk() - return ok -} - -// SetHeaders gets a reference to the given []Header and assigns it to the Headers field. -func (o *Matcher) SetHeaders(v MatcherGetHeadersRetType) { - setMatcherGetHeadersAttributeType(&o.Headers, v) -} - -// GetPathPrefix returns the PathPrefix field value if set, zero value otherwise. -func (o *Matcher) GetPathPrefix() (res MatcherGetPathPrefixRetType) { - res, _ = o.GetPathPrefixOk() - return -} - -// GetPathPrefixOk returns a tuple with the PathPrefix field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Matcher) GetPathPrefixOk() (ret MatcherGetPathPrefixRetType, ok bool) { - return getMatcherGetPathPrefixAttributeTypeOk(o.PathPrefix) -} - -// HasPathPrefix returns a boolean if a field has been set. -func (o *Matcher) HasPathPrefix() bool { - _, ok := o.GetPathPrefixOk() - return ok -} - -// SetPathPrefix gets a reference to the given string and assigns it to the PathPrefix field. -func (o *Matcher) SetPathPrefix(v MatcherGetPathPrefixRetType) { - setMatcherGetPathPrefixAttributeType(&o.PathPrefix, v) -} - -// GetQueryParameters returns the QueryParameters field value if set, zero value otherwise. -func (o *Matcher) GetQueryParameters() (res MatcherGetQueryParametersRetType) { - res, _ = o.GetQueryParametersOk() - return -} - -// GetQueryParametersOk returns a tuple with the QueryParameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Matcher) GetQueryParametersOk() (ret MatcherGetQueryParametersRetType, ok bool) { - return getMatcherGetQueryParametersAttributeTypeOk(o.QueryParameters) -} - -// HasQueryParameters returns a boolean if a field has been set. -func (o *Matcher) HasQueryParameters() bool { - _, ok := o.GetQueryParametersOk() - return ok -} - -// SetQueryParameters gets a reference to the given []QueryParameters and assigns it to the QueryParameters field. -func (o *Matcher) SetQueryParameters(v MatcherGetQueryParametersRetType) { - setMatcherGetQueryParametersAttributeType(&o.QueryParameters, v) -} - -// GetTargetPool returns the TargetPool field value if set, zero value otherwise. -func (o *Matcher) GetTargetPool() (res MatcherGetTargetPoolRetType) { - res, _ = o.GetTargetPoolOk() - return -} - -// GetTargetPoolOk returns a tuple with the TargetPool field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Matcher) GetTargetPoolOk() (ret MatcherGetTargetPoolRetType, ok bool) { - return getMatcherGetTargetPoolAttributeTypeOk(o.TargetPool) -} - -// HasTargetPool returns a boolean if a field has been set. -func (o *Matcher) HasTargetPool() bool { - _, ok := o.GetTargetPoolOk() - return ok -} - -// SetTargetPool gets a reference to the given string and assigns it to the TargetPool field. -func (o *Matcher) SetTargetPool(v MatcherGetTargetPoolRetType) { - setMatcherGetTargetPoolAttributeType(&o.TargetPool, v) -} - -// GetWebSocket returns the WebSocket field value if set, zero value otherwise. -func (o *Matcher) GetWebSocket() (res MatchergetWebSocketRetType) { - res, _ = o.GetWebSocketOk() - return -} - -// GetWebSocketOk returns a tuple with the WebSocket field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Matcher) GetWebSocketOk() (ret MatchergetWebSocketRetType, ok bool) { - return getMatchergetWebSocketAttributeTypeOk(o.WebSocket) -} - -// HasWebSocket returns a boolean if a field has been set. -func (o *Matcher) HasWebSocket() bool { - _, ok := o.GetWebSocketOk() - return ok -} - -// SetWebSocket gets a reference to the given bool and assigns it to the WebSocket field. -func (o *Matcher) SetWebSocket(v MatchergetWebSocketRetType) { - setMatchergetWebSocketAttributeType(&o.WebSocket, v) -} - -func (o Matcher) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getMatcherGetCookiePersistenceAttributeTypeOk(o.CookiePersistence); ok { - toSerialize["CookiePersistence"] = val - } - if val, ok := getMatcherGetHeadersAttributeTypeOk(o.Headers); ok { - toSerialize["Headers"] = val - } - if val, ok := getMatcherGetPathPrefixAttributeTypeOk(o.PathPrefix); ok { - toSerialize["PathPrefix"] = val - } - if val, ok := getMatcherGetQueryParametersAttributeTypeOk(o.QueryParameters); ok { - toSerialize["QueryParameters"] = val - } - if val, ok := getMatcherGetTargetPoolAttributeTypeOk(o.TargetPool); ok { - toSerialize["TargetPool"] = val - } - if val, ok := getMatchergetWebSocketAttributeTypeOk(o.WebSocket); ok { - toSerialize["WebSocket"] = val - } - return toSerialize, nil -} - -type NullableMatcher struct { - value *Matcher - isSet bool -} - -func (v NullableMatcher) Get() *Matcher { - return v.value -} - -func (v *NullableMatcher) Set(val *Matcher) { - v.value = val - v.isSet = true -} - -func (v NullableMatcher) IsSet() bool { - return v.isSet -} - -func (v *NullableMatcher) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMatcher(val *Matcher) *NullableMatcher { - return &NullableMatcher{value: val, isSet: true} -} - -func (v NullableMatcher) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMatcher) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/lbapplication/model_matcher_test.go b/services/lbapplication/model_matcher_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_matcher_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_network.go b/services/lbapplication/model_network.go deleted file mode 100644 index 8117a672b..000000000 --- a/services/lbapplication/model_network.go +++ /dev/null @@ -1,286 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" - "fmt" -) - -// checks if the Network type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Network{} - -/* - types and functions for networkId -*/ - -// isNotNullableString -type NetworkGetNetworkIdAttributeType = *string - -func getNetworkGetNetworkIdAttributeTypeOk(arg NetworkGetNetworkIdAttributeType) (ret NetworkGetNetworkIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setNetworkGetNetworkIdAttributeType(arg *NetworkGetNetworkIdAttributeType, val NetworkGetNetworkIdRetType) { - *arg = &val -} - -type NetworkGetNetworkIdArgType = string -type NetworkGetNetworkIdRetType = string - -/* - types and functions for role -*/ - -// isEnum - -// NetworkRole The role defines how the Application Load Balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. -// value type for enums -type NetworkRole string - -// List of Role -const ( - NETWORKROLE_UNSPECIFIED NetworkRole = "ROLE_UNSPECIFIED" - NETWORKROLE_LISTENERS_AND_TARGETS NetworkRole = "ROLE_LISTENERS_AND_TARGETS" - NETWORKROLE_LISTENERS NetworkRole = "ROLE_LISTENERS" - NETWORKROLE_TARGETS NetworkRole = "ROLE_TARGETS" -) - -// All allowed values of Network enum -var AllowedNetworkRoleEnumValues = []NetworkRole{ - "ROLE_UNSPECIFIED", - "ROLE_LISTENERS_AND_TARGETS", - "ROLE_LISTENERS", - "ROLE_TARGETS", -} - -func (v *NetworkRole) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson NetworkRole - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := NetworkRole(value) - for _, existing := range AllowedNetworkRoleEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Network", value) -} - -// NewNetworkRoleFromValue returns a pointer to a valid NetworkRole -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewNetworkRoleFromValue(v NetworkRole) (*NetworkRole, error) { - ev := NetworkRole(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for NetworkRole: valid values are %v", v, AllowedNetworkRoleEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v NetworkRole) IsValid() bool { - for _, existing := range AllowedNetworkRoleEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to RoleRole value -func (v NetworkRole) Ptr() *NetworkRole { - return &v -} - -type NullableNetworkRole struct { - value *NetworkRole - isSet bool -} - -func (v NullableNetworkRole) Get() *NetworkRole { - return v.value -} - -func (v *NullableNetworkRole) Set(val *NetworkRole) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkRole) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkRole) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkRole(val *NetworkRole) *NullableNetworkRole { - return &NullableNetworkRole{value: val, isSet: true} -} - -func (v NullableNetworkRole) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkRole) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NetworkGetRoleAttributeType = *NetworkRole -type NetworkGetRoleArgType = NetworkRole -type NetworkGetRoleRetType = NetworkRole - -func getNetworkGetRoleAttributeTypeOk(arg NetworkGetRoleAttributeType) (ret NetworkGetRoleRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setNetworkGetRoleAttributeType(arg *NetworkGetRoleAttributeType, val NetworkGetRoleRetType) { - *arg = &val -} - -// Network struct for Network -type Network struct { - // Openstack network ID - NetworkId NetworkGetNetworkIdAttributeType `json:"networkId,omitempty"` - // The role defines how the Application Load Balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. - Role NetworkGetRoleAttributeType `json:"role,omitempty"` -} - -// NewNetwork instantiates a new Network object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res NetworkGetNetworkIdRetType) { - res, _ = o.GetNetworkIdOk() - return -} - -// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetNetworkIdOk() (ret NetworkGetNetworkIdRetType, ok bool) { - return getNetworkGetNetworkIdAttributeTypeOk(o.NetworkId) -} - -// HasNetworkId returns a boolean if a field has been set. -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. -func (o *Network) SetNetworkId(v NetworkGetNetworkIdRetType) { - setNetworkGetNetworkIdAttributeType(&o.NetworkId, v) -} - -// GetRole returns the Role field value if set, zero value otherwise. -func (o *Network) GetRole() (res NetworkGetRoleRetType) { - res, _ = o.GetRoleOk() - return -} - -// GetRoleOk returns a tuple with the Role field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetRoleOk() (ret NetworkGetRoleRetType, ok bool) { - return getNetworkGetRoleAttributeTypeOk(o.Role) -} - -// HasRole returns a boolean if a field has been set. -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. -func (o *Network) SetRole(v NetworkGetRoleRetType) { - setNetworkGetRoleAttributeType(&o.Role, v) -} - -func (o Network) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNetworkGetNetworkIdAttributeTypeOk(o.NetworkId); ok { - toSerialize["NetworkId"] = val - } - if val, ok := getNetworkGetRoleAttributeTypeOk(o.Role); ok { - toSerialize["Role"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_network_test.go b/services/lbapplication/model_network_test.go deleted file mode 100644 index 67bd98abf..000000000 --- a/services/lbapplication/model_network_test.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "testing" -) - -// isEnum - -func TestNetworkRole_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"ROLE_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"ROLE_LISTENERS_AND_TARGETS"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"ROLE_LISTENERS"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"ROLE_TARGETS"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := NetworkRole("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/lbapplication/model_plan_details.go b/services/lbapplication/model_plan_details.go deleted file mode 100644 index 66dcf8fea..000000000 --- a/services/lbapplication/model_plan_details.go +++ /dev/null @@ -1,324 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the PlanDetails type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PlanDetails{} - -/* - types and functions for description -*/ - -// isNotNullableString -type PlanDetailsGetDescriptionAttributeType = *string - -func getPlanDetailsGetDescriptionAttributeTypeOk(arg PlanDetailsGetDescriptionAttributeType) (ret PlanDetailsGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setPlanDetailsGetDescriptionAttributeType(arg *PlanDetailsGetDescriptionAttributeType, val PlanDetailsGetDescriptionRetType) { - *arg = &val -} - -type PlanDetailsGetDescriptionArgType = string -type PlanDetailsGetDescriptionRetType = string - -/* - types and functions for flavorName -*/ - -// isNotNullableString -type PlanDetailsGetFlavorNameAttributeType = *string - -func getPlanDetailsGetFlavorNameAttributeTypeOk(arg PlanDetailsGetFlavorNameAttributeType) (ret PlanDetailsGetFlavorNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setPlanDetailsGetFlavorNameAttributeType(arg *PlanDetailsGetFlavorNameAttributeType, val PlanDetailsGetFlavorNameRetType) { - *arg = &val -} - -type PlanDetailsGetFlavorNameArgType = string -type PlanDetailsGetFlavorNameRetType = string - -/* - types and functions for maxConnections -*/ - -// isInteger -type PlanDetailsGetMaxConnectionsAttributeType = *int64 -type PlanDetailsGetMaxConnectionsArgType = int64 -type PlanDetailsGetMaxConnectionsRetType = int64 - -func getPlanDetailsGetMaxConnectionsAttributeTypeOk(arg PlanDetailsGetMaxConnectionsAttributeType) (ret PlanDetailsGetMaxConnectionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setPlanDetailsGetMaxConnectionsAttributeType(arg *PlanDetailsGetMaxConnectionsAttributeType, val PlanDetailsGetMaxConnectionsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -type PlanDetailsGetNameAttributeType = *string - -func getPlanDetailsGetNameAttributeTypeOk(arg PlanDetailsGetNameAttributeType) (ret PlanDetailsGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setPlanDetailsGetNameAttributeType(arg *PlanDetailsGetNameAttributeType, val PlanDetailsGetNameRetType) { - *arg = &val -} - -type PlanDetailsGetNameArgType = string -type PlanDetailsGetNameRetType = string - -/* - types and functions for planId -*/ - -// isNotNullableString -type PlanDetailsGetPlanIdAttributeType = *string - -func getPlanDetailsGetPlanIdAttributeTypeOk(arg PlanDetailsGetPlanIdAttributeType) (ret PlanDetailsGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setPlanDetailsGetPlanIdAttributeType(arg *PlanDetailsGetPlanIdAttributeType, val PlanDetailsGetPlanIdRetType) { - *arg = &val -} - -type PlanDetailsGetPlanIdArgType = string -type PlanDetailsGetPlanIdRetType = string - -// PlanDetails struct for PlanDetails -type PlanDetails struct { - // Description - Description PlanDetailsGetDescriptionAttributeType `json:"description,omitempty"` - // Flavor Name - FlavorName PlanDetailsGetFlavorNameAttributeType `json:"flavorName,omitempty"` - // Maximum number of concurrent connections per application load balancer VM instance. - MaxConnections PlanDetailsGetMaxConnectionsAttributeType `json:"maxConnections,omitempty"` - // Service Plan Name - Name PlanDetailsGetNameAttributeType `json:"name,omitempty"` - // Service Plan Identifier - PlanId PlanDetailsGetPlanIdAttributeType `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() (res PlanDetailsGetDescriptionRetType) { - res, _ = o.GetDescriptionOk() - return -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetDescriptionOk() (ret PlanDetailsGetDescriptionRetType, ok bool) { - return getPlanDetailsGetDescriptionAttributeTypeOk(o.Description) -} - -// HasDescription returns a boolean if a field has been set. -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. -func (o *PlanDetails) SetDescription(v PlanDetailsGetDescriptionRetType) { - setPlanDetailsGetDescriptionAttributeType(&o.Description, v) -} - -// GetFlavorName returns the FlavorName field value if set, zero value otherwise. -func (o *PlanDetails) GetFlavorName() (res PlanDetailsGetFlavorNameRetType) { - res, _ = o.GetFlavorNameOk() - return -} - -// GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetFlavorNameOk() (ret PlanDetailsGetFlavorNameRetType, ok bool) { - return getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName) -} - -// HasFlavorName returns a boolean if a field has been set. -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. -func (o *PlanDetails) SetFlavorName(v PlanDetailsGetFlavorNameRetType) { - setPlanDetailsGetFlavorNameAttributeType(&o.FlavorName, v) -} - -// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise. -func (o *PlanDetails) GetMaxConnections() (res PlanDetailsGetMaxConnectionsRetType) { - res, _ = o.GetMaxConnectionsOk() - return -} - -// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetMaxConnectionsOk() (ret PlanDetailsGetMaxConnectionsRetType, ok bool) { - return getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections) -} - -// HasMaxConnections returns a boolean if a field has been set. -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. -func (o *PlanDetails) SetMaxConnections(v PlanDetailsGetMaxConnectionsRetType) { - setPlanDetailsGetMaxConnectionsAttributeType(&o.MaxConnections, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PlanDetails) GetName() (res PlanDetailsGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetNameOk() (ret PlanDetailsGetNameRetType, ok bool) { - return getPlanDetailsGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -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. -func (o *PlanDetails) SetName(v PlanDetailsGetNameRetType) { - setPlanDetailsGetNameAttributeType(&o.Name, v) -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *PlanDetails) GetPlanId() (res PlanDetailsGetPlanIdRetType) { - res, _ = o.GetPlanIdOk() - return -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetPlanIdOk() (ret PlanDetailsGetPlanIdRetType, ok bool) { - return getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId) -} - -// HasPlanId returns a boolean if a field has been set. -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. -func (o *PlanDetails) SetPlanId(v PlanDetailsGetPlanIdRetType) { - setPlanDetailsGetPlanIdAttributeType(&o.PlanId, v) -} - -func (o PlanDetails) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPlanDetailsGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName); ok { - toSerialize["FlavorName"] = val - } - if val, ok := getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections); ok { - toSerialize["MaxConnections"] = val - } - if val, ok := getPlanDetailsGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - 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/lbapplication/model_plan_details_test.go b/services/lbapplication/model_plan_details_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_plan_details_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_protocol_options_https.go b/services/lbapplication/model_protocol_options_https.go deleted file mode 100644 index f6baa4058..000000000 --- a/services/lbapplication/model_protocol_options_https.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the ProtocolOptionsHTTPS type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ProtocolOptionsHTTPS{} - -/* - types and functions for certificateConfig -*/ - -// isModel -type ProtocolOptionsHTTPSGetCertificateConfigAttributeType = *CertificateConfig -type ProtocolOptionsHTTPSGetCertificateConfigArgType = CertificateConfig -type ProtocolOptionsHTTPSGetCertificateConfigRetType = CertificateConfig - -func getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(arg ProtocolOptionsHTTPSGetCertificateConfigAttributeType) (ret ProtocolOptionsHTTPSGetCertificateConfigRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setProtocolOptionsHTTPSGetCertificateConfigAttributeType(arg *ProtocolOptionsHTTPSGetCertificateConfigAttributeType, val ProtocolOptionsHTTPSGetCertificateConfigRetType) { - *arg = &val -} - -// ProtocolOptionsHTTPS ProtocolOptionsHTTPS options to be configured for the PROTOCOL_HTTPS protocol. -type ProtocolOptionsHTTPS struct { - CertificateConfig ProtocolOptionsHTTPSGetCertificateConfigAttributeType `json:"certificateConfig,omitempty"` -} - -// NewProtocolOptionsHTTPS instantiates a new ProtocolOptionsHTTPS object -// This constructor will assign default values to properties that have it defined, -// 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 NewProtocolOptionsHTTPS() *ProtocolOptionsHTTPS { - this := ProtocolOptionsHTTPS{} - return &this -} - -// NewProtocolOptionsHTTPSWithDefaults instantiates a new ProtocolOptionsHTTPS object -// This 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 NewProtocolOptionsHTTPSWithDefaults() *ProtocolOptionsHTTPS { - this := ProtocolOptionsHTTPS{} - return &this -} - -// GetCertificateConfig returns the CertificateConfig field value if set, zero value otherwise. -func (o *ProtocolOptionsHTTPS) GetCertificateConfig() (res ProtocolOptionsHTTPSGetCertificateConfigRetType) { - res, _ = o.GetCertificateConfigOk() - return -} - -// GetCertificateConfigOk returns a tuple with the CertificateConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ProtocolOptionsHTTPS) GetCertificateConfigOk() (ret ProtocolOptionsHTTPSGetCertificateConfigRetType, ok bool) { - return getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(o.CertificateConfig) -} - -// HasCertificateConfig returns a boolean if a field has been set. -func (o *ProtocolOptionsHTTPS) HasCertificateConfig() bool { - _, ok := o.GetCertificateConfigOk() - return ok -} - -// SetCertificateConfig gets a reference to the given CertificateConfig and assigns it to the CertificateConfig field. -func (o *ProtocolOptionsHTTPS) SetCertificateConfig(v ProtocolOptionsHTTPSGetCertificateConfigRetType) { - setProtocolOptionsHTTPSGetCertificateConfigAttributeType(&o.CertificateConfig, v) -} - -func (o ProtocolOptionsHTTPS) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(o.CertificateConfig); ok { - toSerialize["CertificateConfig"] = val - } - return toSerialize, nil -} - -type NullableProtocolOptionsHTTPS struct { - value *ProtocolOptionsHTTPS - isSet bool -} - -func (v NullableProtocolOptionsHTTPS) Get() *ProtocolOptionsHTTPS { - return v.value -} - -func (v *NullableProtocolOptionsHTTPS) Set(val *ProtocolOptionsHTTPS) { - v.value = val - v.isSet = true -} - -func (v NullableProtocolOptionsHTTPS) IsSet() bool { - return v.isSet -} - -func (v *NullableProtocolOptionsHTTPS) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableProtocolOptionsHTTPS(val *ProtocolOptionsHTTPS) *NullableProtocolOptionsHTTPS { - return &NullableProtocolOptionsHTTPS{value: val, isSet: true} -} - -func (v NullableProtocolOptionsHTTPS) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableProtocolOptionsHTTPS) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/lbapplication/model_protocol_options_https_test.go b/services/lbapplication/model_protocol_options_https_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_protocol_options_https_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_query_parameters.go b/services/lbapplication/model_query_parameters.go deleted file mode 100644 index 2f5bc5fbd..000000000 --- a/services/lbapplication/model_query_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the QueryParameters type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QueryParameters{} - -/* - types and functions for exactMatch -*/ - -// isNotNullableString -type QueryParametersGetExactMatchAttributeType = *string - -func getQueryParametersGetExactMatchAttributeTypeOk(arg QueryParametersGetExactMatchAttributeType) (ret QueryParametersGetExactMatchRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setQueryParametersGetExactMatchAttributeType(arg *QueryParametersGetExactMatchAttributeType, val QueryParametersGetExactMatchRetType) { - *arg = &val -} - -type QueryParametersGetExactMatchArgType = string -type QueryParametersGetExactMatchRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -type QueryParametersGetNameAttributeType = *string - -func getQueryParametersGetNameAttributeTypeOk(arg QueryParametersGetNameAttributeType) (ret QueryParametersGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setQueryParametersGetNameAttributeType(arg *QueryParametersGetNameAttributeType, val QueryParametersGetNameRetType) { - *arg = &val -} - -type QueryParametersGetNameArgType = string -type QueryParametersGetNameRetType = string - -// QueryParameters struct for QueryParameters -type QueryParameters struct { - // Exact match for the parameter value - ExactMatch QueryParametersGetExactMatchAttributeType `json:"exactMatch,omitempty"` - // Parameter name - Name QueryParametersGetNameAttributeType `json:"name,omitempty"` -} - -// NewQueryParameters instantiates a new QueryParameters object -// This constructor will assign default values to properties that have it defined, -// 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 NewQueryParameters() *QueryParameters { - this := QueryParameters{} - return &this -} - -// NewQueryParametersWithDefaults instantiates a new QueryParameters object -// This 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 NewQueryParametersWithDefaults() *QueryParameters { - this := QueryParameters{} - return &this -} - -// GetExactMatch returns the ExactMatch field value if set, zero value otherwise. -func (o *QueryParameters) GetExactMatch() (res QueryParametersGetExactMatchRetType) { - res, _ = o.GetExactMatchOk() - return -} - -// GetExactMatchOk returns a tuple with the ExactMatch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryParameters) GetExactMatchOk() (ret QueryParametersGetExactMatchRetType, ok bool) { - return getQueryParametersGetExactMatchAttributeTypeOk(o.ExactMatch) -} - -// HasExactMatch returns a boolean if a field has been set. -func (o *QueryParameters) HasExactMatch() bool { - _, ok := o.GetExactMatchOk() - return ok -} - -// SetExactMatch gets a reference to the given string and assigns it to the ExactMatch field. -func (o *QueryParameters) SetExactMatch(v QueryParametersGetExactMatchRetType) { - setQueryParametersGetExactMatchAttributeType(&o.ExactMatch, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *QueryParameters) GetName() (res QueryParametersGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryParameters) GetNameOk() (ret QueryParametersGetNameRetType, ok bool) { - return getQueryParametersGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -func (o *QueryParameters) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *QueryParameters) SetName(v QueryParametersGetNameRetType) { - setQueryParametersGetNameAttributeType(&o.Name, v) -} - -func (o QueryParameters) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getQueryParametersGetExactMatchAttributeTypeOk(o.ExactMatch); ok { - toSerialize["ExactMatch"] = val - } - if val, ok := getQueryParametersGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -type NullableQueryParameters struct { - value *QueryParameters - isSet bool -} - -func (v NullableQueryParameters) Get() *QueryParameters { - return v.value -} - -func (v *NullableQueryParameters) Set(val *QueryParameters) { - v.value = val - v.isSet = true -} - -func (v NullableQueryParameters) IsSet() bool { - return v.isSet -} - -func (v *NullableQueryParameters) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableQueryParameters(val *QueryParameters) *NullableQueryParameters { - return &NullableQueryParameters{value: val, isSet: true} -} - -func (v NullableQueryParameters) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableQueryParameters) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/lbapplication/model_query_parameters_test.go b/services/lbapplication/model_query_parameters_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_query_parameters_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_rule.go b/services/lbapplication/model_rule.go deleted file mode 100644 index f42ac6da4..000000000 --- a/services/lbapplication/model_rule.go +++ /dev/null @@ -1,176 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the Rule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Rule{} - -/* - types and functions for host -*/ - -// isNotNullableString -type RuleGetHostAttributeType = *string - -func getRuleGetHostAttributeTypeOk(arg RuleGetHostAttributeType) (ret RuleGetHostRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRuleGetHostAttributeType(arg *RuleGetHostAttributeType, val RuleGetHostRetType) { - *arg = &val -} - -type RuleGetHostArgType = string -type RuleGetHostRetType = string - -/* - types and functions for http -*/ - -// isModel -type RuleGetHttpAttributeType = *HTTPConfig -type RuleGetHttpArgType = HTTPConfig -type RuleGetHttpRetType = HTTPConfig - -func getRuleGetHttpAttributeTypeOk(arg RuleGetHttpAttributeType) (ret RuleGetHttpRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRuleGetHttpAttributeType(arg *RuleGetHttpAttributeType, val RuleGetHttpRetType) { - *arg = &val -} - -// Rule struct for Rule -type Rule struct { - // Host for the rule - Host RuleGetHostAttributeType `json:"host,omitempty"` - Http RuleGetHttpAttributeType `json:"http,omitempty"` -} - -// NewRule instantiates a new Rule object -// This constructor will assign default values to properties that have it defined, -// 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 NewRule() *Rule { - this := Rule{} - return &this -} - -// NewRuleWithDefaults instantiates a new Rule object -// This 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 NewRuleWithDefaults() *Rule { - this := Rule{} - return &this -} - -// GetHost returns the Host field value if set, zero value otherwise. -func (o *Rule) GetHost() (res RuleGetHostRetType) { - res, _ = o.GetHostOk() - return -} - -// GetHostOk returns a tuple with the Host field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetHostOk() (ret RuleGetHostRetType, ok bool) { - return getRuleGetHostAttributeTypeOk(o.Host) -} - -// HasHost returns a boolean if a field has been set. -func (o *Rule) HasHost() bool { - _, ok := o.GetHostOk() - return ok -} - -// SetHost gets a reference to the given string and assigns it to the Host field. -func (o *Rule) SetHost(v RuleGetHostRetType) { - setRuleGetHostAttributeType(&o.Host, v) -} - -// GetHttp returns the Http field value if set, zero value otherwise. -func (o *Rule) GetHttp() (res RuleGetHttpRetType) { - res, _ = o.GetHttpOk() - return -} - -// GetHttpOk returns a tuple with the Http field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetHttpOk() (ret RuleGetHttpRetType, ok bool) { - return getRuleGetHttpAttributeTypeOk(o.Http) -} - -// HasHttp returns a boolean if a field has been set. -func (o *Rule) HasHttp() bool { - _, ok := o.GetHttpOk() - return ok -} - -// SetHttp gets a reference to the given HTTPConfig and assigns it to the Http field. -func (o *Rule) SetHttp(v RuleGetHttpRetType) { - setRuleGetHttpAttributeType(&o.Http, v) -} - -func (o Rule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRuleGetHostAttributeTypeOk(o.Host); ok { - toSerialize["Host"] = val - } - if val, ok := getRuleGetHttpAttributeTypeOk(o.Http); ok { - toSerialize["Http"] = val - } - return toSerialize, nil -} - -type NullableRule struct { - value *Rule - isSet bool -} - -func (v NullableRule) Get() *Rule { - return v.value -} - -func (v *NullableRule) Set(val *Rule) { - v.value = val - v.isSet = true -} - -func (v NullableRule) IsSet() bool { - return v.isSet -} - -func (v *NullableRule) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRule(val *Rule) *NullableRule { - return &NullableRule{value: val, isSet: true} -} - -func (v NullableRule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/lbapplication/model_rule_test.go b/services/lbapplication/model_rule_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_rule_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_status.go b/services/lbapplication/model_status.go deleted file mode 100644 index 52e6bb151..000000000 --- a/services/lbapplication/model_status.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the Status type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Status{} - -/* - types and functions for code -*/ - -// isInteger -type StatusGetCodeAttributeType = *int64 -type StatusGetCodeArgType = int64 -type StatusGetCodeRetType = int64 - -func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret StatusGetCodeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGetCodeRetType) { - *arg = &val -} - -/* - types and functions for details -*/ - -// isArray -type StatusGetDetailsAttributeType = *[]GoogleProtobufAny -type StatusGetDetailsArgType = []GoogleProtobufAny -type StatusGetDetailsRetType = []GoogleProtobufAny - -func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret StatusGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val StatusGetDetailsRetType) { - *arg = &val -} - -/* - types and functions for message -*/ - -// isNotNullableString -type StatusGetMessageAttributeType = *string - -func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret StatusGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setStatusGetMessageAttributeType(arg *StatusGetMessageAttributeType, val StatusGetMessageRetType) { - *arg = &val -} - -type StatusGetMessageArgType = string -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). -type Status struct { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - // Can be cast to int32 without loss of precision. - Code StatusGetCodeAttributeType `json:"code,omitempty"` - // A list of messages that carry the error details. There is a common set of message types for APIs to use. - Details StatusGetDetailsAttributeType `json:"details,omitempty"` - // A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - Message StatusGetMessageAttributeType `json:"message,omitempty"` -} - -// NewStatus instantiates a new Status object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res StatusGetCodeRetType) { - res, _ = o.GetCodeOk() - return -} - -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status) GetCodeOk() (ret StatusGetCodeRetType, ok bool) { - return getStatusGetCodeAttributeTypeOk(o.Code) -} - -// HasCode returns a boolean if a field has been set. -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. -func (o *Status) SetCode(v StatusGetCodeRetType) { - setStatusGetCodeAttributeType(&o.Code, v) -} - -// GetDetails returns the Details field value if set, zero value otherwise. -func (o *Status) GetDetails() (res StatusGetDetailsRetType) { - res, _ = o.GetDetailsOk() - return -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status) GetDetailsOk() (ret StatusGetDetailsRetType, ok bool) { - return getStatusGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails returns a boolean if a field has been set. -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. -func (o *Status) SetDetails(v StatusGetDetailsRetType) { - setStatusGetDetailsAttributeType(&o.Details, v) -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *Status) GetMessage() (res StatusGetMessageRetType) { - res, _ = o.GetMessageOk() - return -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status) GetMessageOk() (ret StatusGetMessageRetType, ok bool) { - return getStatusGetMessageAttributeTypeOk(o.Message) -} - -// HasMessage returns a boolean if a field has been set. -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. -func (o *Status) SetMessage(v StatusGetMessageRetType) { - setStatusGetMessageAttributeType(&o.Message, v) -} - -func (o Status) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getStatusGetCodeAttributeTypeOk(o.Code); ok { - toSerialize["Code"] = val - } - if val, ok := getStatusGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getStatusGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_status_test.go b/services/lbapplication/model_status_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_status_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_target.go b/services/lbapplication/model_target.go deleted file mode 100644 index 9f6a11f25..000000000 --- a/services/lbapplication/model_target.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the Target type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Target{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -type TargetGetDisplayNameAttributeType = *string - -func getTargetGetDisplayNameAttributeTypeOk(arg TargetGetDisplayNameAttributeType) (ret TargetGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setTargetGetDisplayNameAttributeType(arg *TargetGetDisplayNameAttributeType, val TargetGetDisplayNameRetType) { - *arg = &val -} - -type TargetGetDisplayNameArgType = string -type TargetGetDisplayNameRetType = string - -/* - types and functions for ip -*/ - -// isNotNullableString -type TargetGetIpAttributeType = *string - -func getTargetGetIpAttributeTypeOk(arg TargetGetIpAttributeType) (ret TargetGetIpRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setTargetGetIpAttributeType(arg *TargetGetIpAttributeType, val TargetGetIpRetType) { - *arg = &val -} - -type TargetGetIpArgType = string -type TargetGetIpRetType = string - -// Target struct for Target -type Target struct { - // Target name - DisplayName TargetGetDisplayNameAttributeType `json:"displayName,omitempty"` - // Target IP. Must by unique within a target pool. - Ip TargetGetIpAttributeType `json:"ip,omitempty"` -} - -// NewTarget instantiates a new Target object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res TargetGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Target) GetDisplayNameOk() (ret TargetGetDisplayNameRetType, ok bool) { - return getTargetGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -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. -func (o *Target) SetDisplayName(v TargetGetDisplayNameRetType) { - setTargetGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetIp returns the Ip field value if set, zero value otherwise. -func (o *Target) GetIp() (res TargetGetIpRetType) { - res, _ = o.GetIpOk() - return -} - -// GetIpOk returns a tuple with the Ip field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Target) GetIpOk() (ret TargetGetIpRetType, ok bool) { - return getTargetGetIpAttributeTypeOk(o.Ip) -} - -// HasIp returns a boolean if a field has been set. -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. -func (o *Target) SetIp(v TargetGetIpRetType) { - setTargetGetIpAttributeType(&o.Ip, v) -} - -func (o Target) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getTargetGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getTargetGetIpAttributeTypeOk(o.Ip); ok { - toSerialize["Ip"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_target_pool.go b/services/lbapplication/model_target_pool.go deleted file mode 100644 index 5ba5d14df..000000000 --- a/services/lbapplication/model_target_pool.go +++ /dev/null @@ -1,272 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the TargetPool type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TargetPool{} - -/* - types and functions for activeHealthCheck -*/ - -// isModel -type TargetPoolGetActiveHealthCheckAttributeType = *ActiveHealthCheck -type TargetPoolGetActiveHealthCheckArgType = ActiveHealthCheck -type TargetPoolGetActiveHealthCheckRetType = ActiveHealthCheck - -func getTargetPoolGetActiveHealthCheckAttributeTypeOk(arg TargetPoolGetActiveHealthCheckAttributeType) (ret TargetPoolGetActiveHealthCheckRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setTargetPoolGetActiveHealthCheckAttributeType(arg *TargetPoolGetActiveHealthCheckAttributeType, val TargetPoolGetActiveHealthCheckRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -type TargetPoolGetNameAttributeType = *string - -func getTargetPoolGetNameAttributeTypeOk(arg TargetPoolGetNameAttributeType) (ret TargetPoolGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setTargetPoolGetNameAttributeType(arg *TargetPoolGetNameAttributeType, val TargetPoolGetNameRetType) { - *arg = &val -} - -type TargetPoolGetNameArgType = string -type TargetPoolGetNameRetType = string - -/* - types and functions for targetPort -*/ - -// isInteger -type TargetPoolGetTargetPortAttributeType = *int64 -type TargetPoolGetTargetPortArgType = int64 -type TargetPoolGetTargetPortRetType = int64 - -func getTargetPoolGetTargetPortAttributeTypeOk(arg TargetPoolGetTargetPortAttributeType) (ret TargetPoolGetTargetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setTargetPoolGetTargetPortAttributeType(arg *TargetPoolGetTargetPortAttributeType, val TargetPoolGetTargetPortRetType) { - *arg = &val -} - -/* - types and functions for targets -*/ - -// isArray -type TargetPoolGetTargetsAttributeType = *[]Target -type TargetPoolGetTargetsArgType = []Target -type TargetPoolGetTargetsRetType = []Target - -func getTargetPoolGetTargetsAttributeTypeOk(arg TargetPoolGetTargetsAttributeType) (ret TargetPoolGetTargetsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setTargetPoolGetTargetsAttributeType(arg *TargetPoolGetTargetsAttributeType, val TargetPoolGetTargetsRetType) { - *arg = &val -} - -// TargetPool struct for TargetPool -type TargetPool struct { - ActiveHealthCheck TargetPoolGetActiveHealthCheckAttributeType `json:"activeHealthCheck,omitempty"` - // Target pool name - Name TargetPoolGetNameAttributeType `json:"name,omitempty"` - // The number identifying the port where each target listens for traffic. - TargetPort TargetPoolGetTargetPortAttributeType `json:"targetPort,omitempty"` - // List of all targets which will be used in the pool. Limited to 250. - Targets TargetPoolGetTargetsAttributeType `json:"targets,omitempty"` -} - -// NewTargetPool instantiates a new TargetPool object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res TargetPoolGetActiveHealthCheckRetType) { - res, _ = o.GetActiveHealthCheckOk() - return -} - -// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetActiveHealthCheckOk() (ret TargetPoolGetActiveHealthCheckRetType, ok bool) { - return getTargetPoolGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck) -} - -// HasActiveHealthCheck returns a boolean if a field has been set. -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. -func (o *TargetPool) SetActiveHealthCheck(v TargetPoolGetActiveHealthCheckRetType) { - setTargetPoolGetActiveHealthCheckAttributeType(&o.ActiveHealthCheck, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *TargetPool) GetName() (res TargetPoolGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetNameOk() (ret TargetPoolGetNameRetType, ok bool) { - return getTargetPoolGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -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. -func (o *TargetPool) SetName(v TargetPoolGetNameRetType) { - setTargetPoolGetNameAttributeType(&o.Name, v) -} - -// GetTargetPort returns the TargetPort field value if set, zero value otherwise. -func (o *TargetPool) GetTargetPort() (res TargetPoolGetTargetPortRetType) { - res, _ = o.GetTargetPortOk() - return -} - -// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetTargetPortOk() (ret TargetPoolGetTargetPortRetType, ok bool) { - return getTargetPoolGetTargetPortAttributeTypeOk(o.TargetPort) -} - -// HasTargetPort returns a boolean if a field has been set. -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. -func (o *TargetPool) SetTargetPort(v TargetPoolGetTargetPortRetType) { - setTargetPoolGetTargetPortAttributeType(&o.TargetPort, v) -} - -// GetTargets returns the Targets field value if set, zero value otherwise. -func (o *TargetPool) GetTargets() (res TargetPoolGetTargetsRetType) { - res, _ = o.GetTargetsOk() - return -} - -// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetTargetsOk() (ret TargetPoolGetTargetsRetType, ok bool) { - return getTargetPoolGetTargetsAttributeTypeOk(o.Targets) -} - -// HasTargets returns a boolean if a field has been set. -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. -func (o *TargetPool) SetTargets(v TargetPoolGetTargetsRetType) { - setTargetPoolGetTargetsAttributeType(&o.Targets, v) -} - -func (o TargetPool) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getTargetPoolGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck); ok { - toSerialize["ActiveHealthCheck"] = val - } - if val, ok := getTargetPoolGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getTargetPoolGetTargetPortAttributeTypeOk(o.TargetPort); ok { - toSerialize["TargetPort"] = val - } - if val, ok := getTargetPoolGetTargetsAttributeTypeOk(o.Targets); ok { - toSerialize["Targets"] = val - } - 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/lbapplication/model_target_pool_test.go b/services/lbapplication/model_target_pool_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_target_pool_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_target_test.go b/services/lbapplication/model_target_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_target_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_update_credentials_payload.go b/services/lbapplication/model_update_credentials_payload.go deleted file mode 100644 index bf08e876e..000000000 --- a/services/lbapplication/model_update_credentials_payload.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the UpdateCredentialsPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateCredentialsPayload{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -type UpdateCredentialsPayloadGetDisplayNameAttributeType = *string - -func getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg UpdateCredentialsPayloadGetDisplayNameAttributeType) (ret UpdateCredentialsPayloadGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateCredentialsPayloadGetDisplayNameAttributeType(arg *UpdateCredentialsPayloadGetDisplayNameAttributeType, val UpdateCredentialsPayloadGetDisplayNameRetType) { - *arg = &val -} - -type UpdateCredentialsPayloadGetDisplayNameArgType = string -type UpdateCredentialsPayloadGetDisplayNameRetType = string - -/* - types and functions for password -*/ - -// isNotNullableString -type UpdateCredentialsPayloadGetPasswordAttributeType = *string - -func getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(arg UpdateCredentialsPayloadGetPasswordAttributeType) (ret UpdateCredentialsPayloadGetPasswordRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateCredentialsPayloadGetPasswordAttributeType(arg *UpdateCredentialsPayloadGetPasswordAttributeType, val UpdateCredentialsPayloadGetPasswordRetType) { - *arg = &val -} - -type UpdateCredentialsPayloadGetPasswordArgType = string -type UpdateCredentialsPayloadGetPasswordRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -type UpdateCredentialsPayloadGetUsernameAttributeType = *string - -func getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(arg UpdateCredentialsPayloadGetUsernameAttributeType) (ret UpdateCredentialsPayloadGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateCredentialsPayloadGetUsernameAttributeType(arg *UpdateCredentialsPayloadGetUsernameAttributeType, val UpdateCredentialsPayloadGetUsernameRetType) { - *arg = &val -} - -type UpdateCredentialsPayloadGetUsernameArgType = string -type UpdateCredentialsPayloadGetUsernameRetType = string - -// UpdateCredentialsPayload struct for UpdateCredentialsPayload -type UpdateCredentialsPayload struct { - // Credential name - DisplayName UpdateCredentialsPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"` - // A valid password used for an existing ARGUS instance, which is used during basic auth. - Password UpdateCredentialsPayloadGetPasswordAttributeType `json:"password,omitempty"` - // A valid username used for an existing ARGUS instance, which is used during basic auth. - Username UpdateCredentialsPayloadGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewUpdateCredentialsPayload instantiates a new UpdateCredentialsPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res UpdateCredentialsPayloadGetDisplayNameRetType) { - res, _ = o.GetDisplayNameOk() - return -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetDisplayNameOk() (ret UpdateCredentialsPayloadGetDisplayNameRetType, ok bool) { - return getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// HasDisplayName returns a boolean if a field has been set. -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. -func (o *UpdateCredentialsPayload) SetDisplayName(v UpdateCredentialsPayloadGetDisplayNameRetType) { - setUpdateCredentialsPayloadGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *UpdateCredentialsPayload) GetPassword() (res UpdateCredentialsPayloadGetPasswordRetType) { - res, _ = o.GetPasswordOk() - return -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetPasswordOk() (ret UpdateCredentialsPayloadGetPasswordRetType, ok bool) { - return getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password) -} - -// HasPassword returns a boolean if a field has been set. -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. -func (o *UpdateCredentialsPayload) SetPassword(v UpdateCredentialsPayloadGetPasswordRetType) { - setUpdateCredentialsPayloadGetPasswordAttributeType(&o.Password, v) -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *UpdateCredentialsPayload) GetUsername() (res UpdateCredentialsPayloadGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetUsernameOk() (ret UpdateCredentialsPayloadGetUsernameRetType, ok bool) { - return getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername returns a boolean if a field has been set. -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. -func (o *UpdateCredentialsPayload) SetUsername(v UpdateCredentialsPayloadGetUsernameRetType) { - setUpdateCredentialsPayloadGetUsernameAttributeType(&o.Username, v) -} - -func (o UpdateCredentialsPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password); ok { - toSerialize["Password"] = val - } - if val, ok := getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_update_credentials_payload_test.go b/services/lbapplication/model_update_credentials_payload_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_update_credentials_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_update_credentials_response.go b/services/lbapplication/model_update_credentials_response.go deleted file mode 100644 index d82b8cff4..000000000 --- a/services/lbapplication/model_update_credentials_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the UpdateCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateCredentialsResponse{} - -/* - types and functions for credential -*/ - -// isModel -type UpdateCredentialsResponseGetCredentialAttributeType = *CredentialsResponse -type UpdateCredentialsResponseGetCredentialArgType = CredentialsResponse -type UpdateCredentialsResponseGetCredentialRetType = CredentialsResponse - -func getUpdateCredentialsResponseGetCredentialAttributeTypeOk(arg UpdateCredentialsResponseGetCredentialAttributeType) (ret UpdateCredentialsResponseGetCredentialRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateCredentialsResponseGetCredentialAttributeType(arg *UpdateCredentialsResponseGetCredentialAttributeType, val UpdateCredentialsResponseGetCredentialRetType) { - *arg = &val -} - -// UpdateCredentialsResponse struct for UpdateCredentialsResponse -type UpdateCredentialsResponse struct { - Credential UpdateCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` -} - -// NewUpdateCredentialsResponse instantiates a new UpdateCredentialsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res UpdateCredentialsResponseGetCredentialRetType) { - res, _ = o.GetCredentialOk() - return -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCredentialsResponse) GetCredentialOk() (ret UpdateCredentialsResponseGetCredentialRetType, ok bool) { - return getUpdateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) -} - -// HasCredential returns a boolean if a field has been set. -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. -func (o *UpdateCredentialsResponse) SetCredential(v UpdateCredentialsResponseGetCredentialRetType) { - setUpdateCredentialsResponseGetCredentialAttributeType(&o.Credential, v) -} - -func (o UpdateCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { - toSerialize["Credential"] = val - } - return toSerialize, nil -} - -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/lbapplication/model_update_credentials_response_test.go b/services/lbapplication/model_update_credentials_response_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_update_credentials_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/model_update_load_balancer_payload.go b/services/lbapplication/model_update_load_balancer_payload.go deleted file mode 100644 index 77fe4aa5c..000000000 --- a/services/lbapplication/model_update_load_balancer_payload.go +++ /dev/null @@ -1,722 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" - "fmt" -) - -// checks if the UpdateLoadBalancerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateLoadBalancerPayload{} - -/* - types and functions for errors -*/ - -// isArray -type UpdateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError -type UpdateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError -type UpdateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError - -func getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetErrorsAttributeType) (ret UpdateLoadBalancerPayloadGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetErrorsAttributeType(arg *UpdateLoadBalancerPayloadGetErrorsAttributeType, val UpdateLoadBalancerPayloadGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for externalAddress -*/ - -// isNotNullableString -type UpdateLoadBalancerPayloadGetExternalAddressAttributeType = *string - -func getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg UpdateLoadBalancerPayloadGetExternalAddressAttributeType) (ret UpdateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(arg *UpdateLoadBalancerPayloadGetExternalAddressAttributeType, val UpdateLoadBalancerPayloadGetExternalAddressRetType) { - *arg = &val -} - -type UpdateLoadBalancerPayloadGetExternalAddressArgType = string -type UpdateLoadBalancerPayloadGetExternalAddressRetType = string - -/* - types and functions for listeners -*/ - -// isArray -type UpdateLoadBalancerPayloadGetListenersAttributeType = *[]Listener -type UpdateLoadBalancerPayloadGetListenersArgType = []Listener -type UpdateLoadBalancerPayloadGetListenersRetType = []Listener - -func getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(arg UpdateLoadBalancerPayloadGetListenersAttributeType) (ret UpdateLoadBalancerPayloadGetListenersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetListenersAttributeType(arg *UpdateLoadBalancerPayloadGetListenersAttributeType, val UpdateLoadBalancerPayloadGetListenersRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -type UpdateLoadBalancerPayloadGetNameAttributeType = *string - -func getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(arg UpdateLoadBalancerPayloadGetNameAttributeType) (ret UpdateLoadBalancerPayloadGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetNameAttributeType(arg *UpdateLoadBalancerPayloadGetNameAttributeType, val UpdateLoadBalancerPayloadGetNameRetType) { - *arg = &val -} - -type UpdateLoadBalancerPayloadGetNameArgType = string -type UpdateLoadBalancerPayloadGetNameRetType = string - -/* - types and functions for networks -*/ - -// isArray -type UpdateLoadBalancerPayloadGetNetworksAttributeType = *[]Network -type UpdateLoadBalancerPayloadGetNetworksArgType = []Network -type UpdateLoadBalancerPayloadGetNetworksRetType = []Network - -func getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg UpdateLoadBalancerPayloadGetNetworksAttributeType) (ret UpdateLoadBalancerPayloadGetNetworksRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetNetworksAttributeType(arg *UpdateLoadBalancerPayloadGetNetworksAttributeType, val UpdateLoadBalancerPayloadGetNetworksRetType) { - *arg = &val -} - -/* - types and functions for options -*/ - -// isModel -type UpdateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions -type UpdateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions -type UpdateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions - -func getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetOptionsAttributeType) (ret UpdateLoadBalancerPayloadGetOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetOptionsAttributeType(arg *UpdateLoadBalancerPayloadGetOptionsAttributeType, val UpdateLoadBalancerPayloadGetOptionsRetType) { - *arg = &val -} - -/* - types and functions for planId -*/ - -// isNotNullableString -type UpdateLoadBalancerPayloadGetPlanIdAttributeType = *string - -func getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg UpdateLoadBalancerPayloadGetPlanIdAttributeType) (ret UpdateLoadBalancerPayloadGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetPlanIdAttributeType(arg *UpdateLoadBalancerPayloadGetPlanIdAttributeType, val UpdateLoadBalancerPayloadGetPlanIdRetType) { - *arg = &val -} - -type UpdateLoadBalancerPayloadGetPlanIdArgType = string -type UpdateLoadBalancerPayloadGetPlanIdRetType = string - -/* - types and functions for privateAddress -*/ - -// isNotNullableString -type UpdateLoadBalancerPayloadGetPrivateAddressAttributeType = *string - -func getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg UpdateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret UpdateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *UpdateLoadBalancerPayloadGetPrivateAddressAttributeType, val UpdateLoadBalancerPayloadGetPrivateAddressRetType) { - *arg = &val -} - -type UpdateLoadBalancerPayloadGetPrivateAddressArgType = string -type UpdateLoadBalancerPayloadGetPrivateAddressRetType = string - -/* - types and functions for status -*/ - -// isEnum - -// UpdateLoadBalancerPayloadStatus the model 'UpdateLoadBalancerPayload' -// value type for enums -type UpdateLoadBalancerPayloadStatus string - -// List of Status -const ( - UPDATELOADBALANCERPAYLOADSTATUS_UNSPECIFIED UpdateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED" - UPDATELOADBALANCERPAYLOADSTATUS_PENDING UpdateLoadBalancerPayloadStatus = "STATUS_PENDING" - UPDATELOADBALANCERPAYLOADSTATUS_READY UpdateLoadBalancerPayloadStatus = "STATUS_READY" - UPDATELOADBALANCERPAYLOADSTATUS_ERROR UpdateLoadBalancerPayloadStatus = "STATUS_ERROR" - UPDATELOADBALANCERPAYLOADSTATUS_TERMINATING UpdateLoadBalancerPayloadStatus = "STATUS_TERMINATING" -) - -// All allowed values of UpdateLoadBalancerPayload enum -var AllowedUpdateLoadBalancerPayloadStatusEnumValues = []UpdateLoadBalancerPayloadStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", -} - -func (v *UpdateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson UpdateLoadBalancerPayloadStatus - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := UpdateLoadBalancerPayloadStatus(value) - for _, existing := range AllowedUpdateLoadBalancerPayloadStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid UpdateLoadBalancerPayload", value) -} - -// NewUpdateLoadBalancerPayloadStatusFromValue returns a pointer to a valid UpdateLoadBalancerPayloadStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewUpdateLoadBalancerPayloadStatusFromValue(v UpdateLoadBalancerPayloadStatus) (*UpdateLoadBalancerPayloadStatus, error) { - ev := UpdateLoadBalancerPayloadStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for UpdateLoadBalancerPayloadStatus: valid values are %v", v, AllowedUpdateLoadBalancerPayloadStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v UpdateLoadBalancerPayloadStatus) IsValid() bool { - for _, existing := range AllowedUpdateLoadBalancerPayloadStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusStatus value -func (v UpdateLoadBalancerPayloadStatus) Ptr() *UpdateLoadBalancerPayloadStatus { - return &v -} - -type NullableUpdateLoadBalancerPayloadStatus struct { - value *UpdateLoadBalancerPayloadStatus - isSet bool -} - -func (v NullableUpdateLoadBalancerPayloadStatus) Get() *UpdateLoadBalancerPayloadStatus { - return v.value -} - -func (v *NullableUpdateLoadBalancerPayloadStatus) Set(val *UpdateLoadBalancerPayloadStatus) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateLoadBalancerPayloadStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateLoadBalancerPayloadStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateLoadBalancerPayloadStatus(val *UpdateLoadBalancerPayloadStatus) *NullableUpdateLoadBalancerPayloadStatus { - return &NullableUpdateLoadBalancerPayloadStatus{value: val, isSet: true} -} - -func (v NullableUpdateLoadBalancerPayloadStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type UpdateLoadBalancerPayloadGetStatusAttributeType = *UpdateLoadBalancerPayloadStatus -type UpdateLoadBalancerPayloadGetStatusArgType = UpdateLoadBalancerPayloadStatus -type UpdateLoadBalancerPayloadGetStatusRetType = UpdateLoadBalancerPayloadStatus - -func getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(arg UpdateLoadBalancerPayloadGetStatusAttributeType) (ret UpdateLoadBalancerPayloadGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetStatusAttributeType(arg *UpdateLoadBalancerPayloadGetStatusAttributeType, val UpdateLoadBalancerPayloadGetStatusRetType) { - *arg = &val -} - -/* - types and functions for targetPools -*/ - -// isArray -type UpdateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool -type UpdateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool -type UpdateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool - -func getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret UpdateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *UpdateLoadBalancerPayloadGetTargetPoolsAttributeType, val UpdateLoadBalancerPayloadGetTargetPoolsRetType) { - *arg = &val -} - -/* - types and functions for version -*/ - -// isNotNullableString -type UpdateLoadBalancerPayloadGetVersionAttributeType = *string - -func getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(arg UpdateLoadBalancerPayloadGetVersionAttributeType) (ret UpdateLoadBalancerPayloadGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateLoadBalancerPayloadGetVersionAttributeType(arg *UpdateLoadBalancerPayloadGetVersionAttributeType, val UpdateLoadBalancerPayloadGetVersionRetType) { - *arg = &val -} - -type UpdateLoadBalancerPayloadGetVersionArgType = string -type UpdateLoadBalancerPayloadGetVersionRetType = string - -// UpdateLoadBalancerPayload struct for UpdateLoadBalancerPayload -type UpdateLoadBalancerPayload struct { - // Reports all errors a application load balancer has. - Errors UpdateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` - // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress UpdateLoadBalancerPayloadGetExternalAddressAttributeType `json:"externalAddress,omitempty"` - // There is a maximum listener count of 20. - Listeners UpdateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` - // Application Load Balancer name. Not changeable after creation. - Name UpdateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks UpdateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"` - Options UpdateLoadBalancerPayloadGetOptionsAttributeType `json:"options,omitempty"` - // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId UpdateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"` - // Transient private application load balancer IP address that can change any time. - PrivateAddress UpdateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` - Status UpdateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"` - // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools UpdateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"` - // Application 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 application load balancer resource that changes during updates of the load balancers. On updates this field specified the application 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 application 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 application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version UpdateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"` -} - -// NewUpdateLoadBalancerPayload instantiates a new UpdateLoadBalancerPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res UpdateLoadBalancerPayloadGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetErrorsOk() (ret UpdateLoadBalancerPayloadGetErrorsRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetErrors(v UpdateLoadBalancerPayloadGetErrorsRetType) { - setUpdateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v) -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetExternalAddress() (res UpdateLoadBalancerPayloadGetExternalAddressRetType) { - res, _ = o.GetExternalAddressOk() - return -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetExternalAddressOk() (ret UpdateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress) -} - -// HasExternalAddress returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetExternalAddress(v UpdateLoadBalancerPayloadGetExternalAddressRetType) { - setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, v) -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetListeners() (res UpdateLoadBalancerPayloadGetListenersRetType) { - res, _ = o.GetListenersOk() - return -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetListenersOk() (ret UpdateLoadBalancerPayloadGetListenersRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners) -} - -// HasListeners returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetListeners(v UpdateLoadBalancerPayloadGetListenersRetType) { - setUpdateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetName() (res UpdateLoadBalancerPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetNameOk() (ret UpdateLoadBalancerPayloadGetNameRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetName(v UpdateLoadBalancerPayloadGetNameRetType) { - setUpdateLoadBalancerPayloadGetNameAttributeType(&o.Name, v) -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetNetworks() (res UpdateLoadBalancerPayloadGetNetworksRetType) { - res, _ = o.GetNetworksOk() - return -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetNetworksOk() (ret UpdateLoadBalancerPayloadGetNetworksRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks) -} - -// HasNetworks returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetNetworks(v UpdateLoadBalancerPayloadGetNetworksRetType) { - setUpdateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v) -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetOptions() (res UpdateLoadBalancerPayloadGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetOptionsOk() (ret UpdateLoadBalancerPayloadGetOptionsRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetOptions(v UpdateLoadBalancerPayloadGetOptionsRetType) { - setUpdateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v) -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetPlanId() (res UpdateLoadBalancerPayloadGetPlanIdRetType) { - res, _ = o.GetPlanIdOk() - return -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetPlanIdOk() (ret UpdateLoadBalancerPayloadGetPlanIdRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId) -} - -// HasPlanId returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetPlanId(v UpdateLoadBalancerPayloadGetPlanIdRetType) { - setUpdateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetPrivateAddress() (res UpdateLoadBalancerPayloadGetPrivateAddressRetType) { - res, _ = o.GetPrivateAddressOk() - return -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetPrivateAddressOk() (ret UpdateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress) -} - -// HasPrivateAddress returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v UpdateLoadBalancerPayloadGetPrivateAddressRetType) { - setUpdateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v) -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetStatus() (res UpdateLoadBalancerPayloadGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetStatusOk() (ret UpdateLoadBalancerPayloadGetStatusRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetStatus(v UpdateLoadBalancerPayloadGetStatusRetType) { - setUpdateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v) -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetTargetPools() (res UpdateLoadBalancerPayloadGetTargetPoolsRetType) { - res, _ = o.GetTargetPoolsOk() - return -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetTargetPoolsOk() (ret UpdateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools) -} - -// HasTargetPools returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetTargetPools(v UpdateLoadBalancerPayloadGetTargetPoolsRetType) { - setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v) -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetVersion() (res UpdateLoadBalancerPayloadGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetVersionOk() (ret UpdateLoadBalancerPayloadGetVersionRetType, ok bool) { - return getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -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. -func (o *UpdateLoadBalancerPayload) SetVersion(v UpdateLoadBalancerPayloadGetVersionRetType) { - setUpdateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v) -} - -func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { - toSerialize["ExternalAddress"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok { - toSerialize["Listeners"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok { - toSerialize["Networks"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { - toSerialize["PrivateAddress"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { - toSerialize["TargetPools"] = val - } - if val, ok := getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - 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/lbapplication/model_update_load_balancer_payload_test.go b/services/lbapplication/model_update_load_balancer_payload_test.go deleted file mode 100644 index ebdf81263..000000000 --- a/services/lbapplication/model_update_load_balancer_payload_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "testing" -) - -// isEnum - -func TestUpdateLoadBalancerPayloadStatus_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"STATUS_UNSPECIFIED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"STATUS_PENDING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"STATUS_READY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"STATUS_ERROR"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"STATUS_TERMINATING"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := UpdateLoadBalancerPayloadStatus("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/lbapplication/model_update_target_pool_payload.go b/services/lbapplication/model_update_target_pool_payload.go deleted file mode 100644 index ec8ddeeb5..000000000 --- a/services/lbapplication/model_update_target_pool_payload.go +++ /dev/null @@ -1,272 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" -) - -// checks if the UpdateTargetPoolPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateTargetPoolPayload{} - -/* - types and functions for activeHealthCheck -*/ - -// isModel -type UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType = *ActiveHealthCheck -type UpdateTargetPoolPayloadGetActiveHealthCheckArgType = ActiveHealthCheck -type UpdateTargetPoolPayloadGetActiveHealthCheckRetType = ActiveHealthCheck - -func getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(arg UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType) (ret UpdateTargetPoolPayloadGetActiveHealthCheckRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateTargetPoolPayloadGetActiveHealthCheckAttributeType(arg *UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType, val UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -type UpdateTargetPoolPayloadGetNameAttributeType = *string - -func getUpdateTargetPoolPayloadGetNameAttributeTypeOk(arg UpdateTargetPoolPayloadGetNameAttributeType) (ret UpdateTargetPoolPayloadGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateTargetPoolPayloadGetNameAttributeType(arg *UpdateTargetPoolPayloadGetNameAttributeType, val UpdateTargetPoolPayloadGetNameRetType) { - *arg = &val -} - -type UpdateTargetPoolPayloadGetNameArgType = string -type UpdateTargetPoolPayloadGetNameRetType = string - -/* - types and functions for targetPort -*/ - -// isInteger -type UpdateTargetPoolPayloadGetTargetPortAttributeType = *int64 -type UpdateTargetPoolPayloadGetTargetPortArgType = int64 -type UpdateTargetPoolPayloadGetTargetPortRetType = int64 - -func getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(arg UpdateTargetPoolPayloadGetTargetPortAttributeType) (ret UpdateTargetPoolPayloadGetTargetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateTargetPoolPayloadGetTargetPortAttributeType(arg *UpdateTargetPoolPayloadGetTargetPortAttributeType, val UpdateTargetPoolPayloadGetTargetPortRetType) { - *arg = &val -} - -/* - types and functions for targets -*/ - -// isArray -type UpdateTargetPoolPayloadGetTargetsAttributeType = *[]Target -type UpdateTargetPoolPayloadGetTargetsArgType = []Target -type UpdateTargetPoolPayloadGetTargetsRetType = []Target - -func getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(arg UpdateTargetPoolPayloadGetTargetsAttributeType) (ret UpdateTargetPoolPayloadGetTargetsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateTargetPoolPayloadGetTargetsAttributeType(arg *UpdateTargetPoolPayloadGetTargetsAttributeType, val UpdateTargetPoolPayloadGetTargetsRetType) { - *arg = &val -} - -// UpdateTargetPoolPayload struct for UpdateTargetPoolPayload -type UpdateTargetPoolPayload struct { - ActiveHealthCheck UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType `json:"activeHealthCheck,omitempty"` - // Target pool name - Name UpdateTargetPoolPayloadGetNameAttributeType `json:"name,omitempty"` - // The number identifying the port where each target listens for traffic. - TargetPort UpdateTargetPoolPayloadGetTargetPortAttributeType `json:"targetPort,omitempty"` - // List of all targets which will be used in the pool. Limited to 250. - Targets UpdateTargetPoolPayloadGetTargetsAttributeType `json:"targets,omitempty"` -} - -// NewUpdateTargetPoolPayload instantiates a new UpdateTargetPoolPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -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() (res UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { - res, _ = o.GetActiveHealthCheckOk() - return -} - -// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetActiveHealthCheckOk() (ret UpdateTargetPoolPayloadGetActiveHealthCheckRetType, ok bool) { - return getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck) -} - -// HasActiveHealthCheck returns a boolean if a field has been set. -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. -func (o *UpdateTargetPoolPayload) SetActiveHealthCheck(v UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { - setUpdateTargetPoolPayloadGetActiveHealthCheckAttributeType(&o.ActiveHealthCheck, v) -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetName() (res UpdateTargetPoolPayloadGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetNameOk() (ret UpdateTargetPoolPayloadGetNameRetType, ok bool) { - return getUpdateTargetPoolPayloadGetNameAttributeTypeOk(o.Name) -} - -// HasName returns a boolean if a field has been set. -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. -func (o *UpdateTargetPoolPayload) SetName(v UpdateTargetPoolPayloadGetNameRetType) { - setUpdateTargetPoolPayloadGetNameAttributeType(&o.Name, v) -} - -// GetTargetPort returns the TargetPort field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetTargetPort() (res UpdateTargetPoolPayloadGetTargetPortRetType) { - res, _ = o.GetTargetPortOk() - return -} - -// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetTargetPortOk() (ret UpdateTargetPoolPayloadGetTargetPortRetType, ok bool) { - return getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(o.TargetPort) -} - -// HasTargetPort returns a boolean if a field has been set. -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. -func (o *UpdateTargetPoolPayload) SetTargetPort(v UpdateTargetPoolPayloadGetTargetPortRetType) { - setUpdateTargetPoolPayloadGetTargetPortAttributeType(&o.TargetPort, v) -} - -// GetTargets returns the Targets field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetTargets() (res UpdateTargetPoolPayloadGetTargetsRetType) { - res, _ = o.GetTargetsOk() - return -} - -// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetTargetsOk() (ret UpdateTargetPoolPayloadGetTargetsRetType, ok bool) { - return getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(o.Targets) -} - -// HasTargets returns a boolean if a field has been set. -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. -func (o *UpdateTargetPoolPayload) SetTargets(v UpdateTargetPoolPayloadGetTargetsRetType) { - setUpdateTargetPoolPayloadGetTargetsAttributeType(&o.Targets, v) -} - -func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck); ok { - toSerialize["ActiveHealthCheck"] = val - } - if val, ok := getUpdateTargetPoolPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(o.TargetPort); ok { - toSerialize["TargetPort"] = val - } - if val, ok := getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(o.Targets); ok { - toSerialize["Targets"] = val - } - 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/lbapplication/model_update_target_pool_payload_test.go b/services/lbapplication/model_update_target_pool_payload_test.go deleted file mode 100644 index fa5a475f3..000000000 --- a/services/lbapplication/model_update_target_pool_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication diff --git a/services/lbapplication/utils.go b/services/lbapplication/utils.go deleted file mode 100644 index c2d4cc282..000000000 --- a/services/lbapplication/utils.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This service, lb-application, is no longer maintained. Please use the alb service, version v2beta2 instead 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 application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 1beta.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package lbapplication - -import ( - "encoding/json" - "math/rand" - "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 NullableValue[T any] struct { - value *T - isSet bool -} - -func (v NullableValue[T]) Get() *T { - return v.value -} - -func (v *NullableValue[T]) Set(val *T) { - v.value = val - v.isSet = true -} - -func (v NullableValue[T]) IsSet() bool { - return v.isSet -} - -func (v *NullableValue[T]) Unset() { - v.value = nil - v.isSet = false -} - -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 v.value.MarshalJSON() -} - -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 - } - if t, ok := i.(interface{ IsSet() bool }); ok { - return !t.IsSet() - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} - -const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - -// randString returns a random string with a specified length. It panics if n <= 0. -func randString(n int) string { - b := make([]byte, n) - for i := range b { - b[i] = letterRunes[rand.Intn(len(letterRunes))] - } - return string(b) -}